1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-05 06:12:35 +00:00
hashcat/OpenCL/inc_comp_multi_iba.cl
Jens Steube 4b93a6e93c Add support for detecting unified GPU memory on CUDA and HIP (previously available only for OpenCL and Metal).
Do not adjust kernel-accel or scrypt-tmto for GPUs with unified memory, typically integrated GPUs in CPUs (APUs).
Redesign the "4-buffer" strategy to avoid overallocation from naive division by four, which can significantly increase memory usage for high scrypt configurations (e.g., 256k:8:1).
Update the scrypt B[] access pattern to match the new "4-buffer" design.
Allow user-specified kernel-accel and scrypt-tmto values, individually or both, via command line and tuning database. Any unspecified parameters are adjusted automatically.
Permit user-defined combinations of scrypt-tmto and kernel-accel even if they may exceed available memory.
2025-06-17 13:32:57 +02:00

20 lines
716 B
Common Lisp

for (int digest_pos = 0; digest_pos < DIGESTS_CNT; digest_pos++)
{
const u32 final_hash_pos = DIGESTS_OFFSET_HOST + digest_pos;
GLOBAL_AS const digest_t *digest = digests_buf + final_hash_pos;
const int invalid_bits = count_bits_32 (digest->digest_buf[0], r0)
+ count_bits_32 (digest->digest_buf[1], r1)
+ count_bits_32 (digest->digest_buf[2], r2)
+ count_bits_32 (digest->digest_buf[3], r3);
if (invalid_bits > invalid_bits_accept) continue;
if (hc_atomic_inc (&hashes_shown[final_hash_pos]) == 0)
{
mark_hash (plains_buf, d_return_buf, SALT_POS_HOST, DIGESTS_CNT, digest_pos, final_hash_pos, gid, il_pos, 0, 0);
}
}