Open pigmej opened 6 months ago
7900xtx reports:
2024-02-13T13:37:42.980+0100 INFO selecting 0 provider from 2 available {"module": "scrypt_ocl", "file": "scrypt-ocl\\src\\lib.rs", "line": 321}
2024-02-13T13:37:42.980+0100 INFO Using provider: [GPU] AMD Accelerated Parallel Processing/gfx1100 {"module": "scrypt_ocl", "file": "scrypt-ocl\\src\\lib.rs", "line": 334}
2024-02-13T13:37:42.980+0100 INFO device memory: 24560 MB, max_mem_alloc_size: 20876 MB, max_compute_units: 48, max_wg_size: 256 {"module": "scrypt_ocl", "file": "scrypt-ocl\\src\\lib.rs", "line": 152}
2024-02-13T13:37:43.763+0100 INFO preferred_wg_size_multiple: 32, kernel_wg_size: 256 {"module": "scrypt_ocl", "file": "scrypt-ocl\\src\\lib.rs", "line": 186}
2024-02-13T13:37:43.763+0100 INFO Using: global_work_size: 41728, local_work_size: 32 {"module": "scrypt_ocl", "file": "scrypt-ocl\\src\\lib.rs", "line": 199}
2024-02-13T13:37:43.763+0100 INFO Allocating buffer for input: 32 bytes {"module": "scrypt_ocl", "file": "scrypt-ocl\\src\\lib.rs", "line": 203}
2024-02-13T13:37:43.763+0100 INFO Allocating buffer for output: 1335296 bytes {"module": "scrypt_ocl", "file": "scrypt-ocl\\src\\lib.rs", "line": 211}
2024-02-13T13:37:43.763+0100 INFO Allocating buffer for lookup: 21877489664 bytes {"module": "scrypt_ocl", "file": "scrypt-ocl\\src\\lib.rs", "line": 219}
so it reports 48 CU while it have 96 actually.
Please note that the preferred_wg_size_multiple: 32
also suggests that the actual num is 96.
Please note that the 48CU is only used here as log message. The important part is max_mem_alloc_size
and global|local_work_size
On 7900xtx you can get more performance by setting LOOKUP_GAP
to 4 and that yields about 25% perf improvement.
I think for RDNA2 cards where we have high ram to CU ratio we're packing too much ram. In comparsion nvidia 4090 allows us to use 6GiB of ram (max_mem_alloc_size) while 7900xtx 21GiB.
From my understanding of RDNA2 architecture each RDNA2 (and newer) will report only half of CUs to the OpenCL.
(from the whitepaper)
The result is that it seems that the GPUs are underutilized.