Jens Steube
c87a87f992
Improvements to SCRYPT autotuning strategy
...
General:
The logic for calculating the SCRYPT workload has been moved
from module_extra_buffer_size() to module_extra_tuningdb_block().
Previously, this function just returned values from a static
tuning file. Now, it actually computes tuning values on the fly
based on the device's resources and SCRYPT parameters. This
was always possible, it just wasn't used that way until now.
After running the calculation, the calculated kernel_accel value
is injected into the tuning database as if it had come from a
file. The tmto value is stored internally.
Users can still override kernel-threads, kernel-accel, and
scrypt-tmto via the command line or via tuningdb file.
module_extra_tuningdb_block():
This is now where kernel_accel and tmto are automatically
calculated.
The logic for accel and tmto is now separated and more
flexible. Whether the user is using defaults, tuningdb entries, or
manual command line overrides, the code logic will try to make
smart choices based on what's actually available on the device.
First, it tries to find a kernel_accel value that fits into
available memory. It starts with a base value and simulates
tmto=1 or 2 (which is typical good on GPU).
It also leaves room for other buffers (like pws[], tmps[], etc.).
If the result is close to the actual processor count,
it gets clamped.
This value is then added to the tuning database, so hashcat can pick
it up during startup.
Once that's set, it derives tmto using available memory, thread
count, and the actual SCRYPT parameters.
module_extra_buffer_size():
This function now just returns the size of the SCRYPT B[] buffer,
based on the tmto that was already calculated.
kernel_threads:
Defaults are now set to 32 threads in most cases. On AMD GPUs,
64 threads might give a slight performance bump, but 32 is more
consistent and reliable.
For very memory-heavy algorithms (like Ethereum Wallet), it
scales down the thread count.
Here's a rough reference for other SCRYPT-based modes:
- 64 MiB: 16 threads
- 256 MiB: 4 threads
Tuning files:
All built-in tuningdb entries have been removed, because they
shouldn’t be needed anymore. But you can still add custom entries
if needed. There’s even a commented-out example in the tuningdb
file for mode 22700.
Free memory handling:
Getting the actual amount of free GPU memory is critical for
this to work right. Unfortunately, none of the common GPGPU APIs
give reliable numbers. We now query low-level interfaces like
SYSFS (AMD) and NVML (NVIDIA). Support for those APIs is in
place already, except for ADL, which still needs to be added.
Because of this, hwmon support (which handles those low-level
queries) can no longer be disabled.
2025-06-09 11:02:34 +02:00
Jens Steube
ed6e967425
Add experimental SCRYPT N-parameter auto-discovery
...
Remove existing tuningdb entries due to salsa_r() core
refactor. Update tuningdb engine to prefer file entries,
when available, over automatic discovery.
Improve memory-free detection per device, default
--backend-device-keepfree is now set to 0.
Old brute-force OpenCL behavior can be restored using
--backend-device-keepfree 100.
2025-06-08 07:32:32 +02:00
Gabriele Gristina
12f1fe56aa
OpenCL Backend: added workaround to set device_available_memory from CUDA/HIP alias device
2025-06-07 20:22:01 +02:00
Gabriele Gristina
378abf6957
Metal Backend: added workaround to set the true Processor value in Metal devices on Apple Intel
2025-06-07 17:52:34 +02:00
Jens Steube
d60658102b
Added option --backend-devices-keepfree to configure X percentage of device memory available to keep free
2025-06-04 10:13:29 +02:00
Jens Steube
bf110ee10f
Merge branch 'master' into asahi-fix
2025-06-03 14:59:04 +02:00
Jens Steube
b02b1b5033
- Add code to recognize Microsofts OpenCL D3D12 platform
...
- Skip memory-free detection on MS OpenCL platform to avoid crashes
- Improve salt usage of 70100/70200, use decoder/kernels from 8900
- Add REPLACE bridge type support (eg. BRIDGE_TYPE_REPLACE_LOOP)
- Switch 70000, 70100 and 70200 to BRIDGE_TYPE_REPLACE_LOOP
- Add synchronization barriers on d2h copy when using bridges
- Improve speed status display updates when using bridges
- Set AMD_DIRECT_DISPATCH=0 to reduce CPU burning loop on AMD backends
- Set benchmark/selftest hash on 70100/70200 to 16:8:1
2025-06-02 06:59:36 +02:00
Jens Steube
22c25b3ea1
Fix cross-compiler target in makefiles
...
Do not show timeout patch warnings in virtualized mode
2025-06-01 06:39:55 +02:00
Jens Steube
ceb5ff5641
The Assimilation Bridge (Framework)
2025-05-29 15:38:13 +02:00
Jens Steube
f9822fe569
Merge pull request #4185 from matrix/deep_comp_aux_workaround
...
workaround for issue #3914
2025-05-25 08:14:23 +02:00
Gabriele Gristina
55f53ba076
assigned -H to --hash-info
2025-05-11 17:16:03 +02:00
Jens Steube
b0c7765e88
- Backport code from hipDllPath to hiprtcDllPath
...
- Fix some compiler warning
- Remove some unused code
- We will add changes to docs/ and user-notifications on versioning later
2025-05-11 14:08:04 +02:00
Jens Steube
d10ffbb461
Change amdhip64.dll installation path detection strategy
2025-05-10 12:11:40 +00:00
Gabriele Gristina
6568c5988b
fix #3914
2025-04-18 14:17:21 +02:00
Code Curiously
5b26392adb
Fix RAM usage bug for Linux Apple Silicon #4125
2024-12-01 19:20:26 +00:00
wizardsd
0ba76629c0
Fixed a host buffer overflow bug when copying rules from host to device
2024-11-07 12:47:36 +03:00
Mathias
d756a6617c
Update backend.c
...
Fixes hiprtcCompileProgram(): HIPRTC_ERROR_COMPILATION on AMD 6900XT.
```bash
hiprtcCompileProgram(): HIPRTC_ERROR_COMPILATION
ld.lld: error: undefined hidden symbol: __ockl_get_group_id
>>> referenced by /home/mathias/.local/share/hashcat/comgr-69ec34/input/shared_kernel.o:(gpu_decompress)
>>> referenced by /home/mathias/.local/share/hashcat/comgr-69ec34/input/shared_kernel.o:(gpu_decompress)
>>> referenced by /home/mathias/.local/share/hashcat/comgr-69ec34/input/shared_kernel.o:(gpu_memset)
>>> referenced 7 more times
ld.lld: error: undefined hidden symbol: __ockl_get_local_size
>>> referenced by /home/mathias/.local/share/hashcat/comgr-69ec34/input/shared_kernel.o:(gpu_decompress)
>>> referenced by /home/mathias/.local/share/hashcat/comgr-69ec34/input/shared_kernel.o:(gpu_decompress)
>>> referenced by /home/mathias/.local/share/hashcat/comgr-69ec34/input/shared_kernel.o:(gpu_memset)
>>> referenced 7 more times
ld.lld: error: undefined hidden symbol: __ockl_get_local_id
>>> referenced by /home/mathias/.local/share/hashcat/comgr-69ec34/input/shared_kernel.o:(gpu_decompress)
>>> referenced by /home/mathias/.local/share/hashcat/comgr-69ec34/input/shared_kernel.o:(gpu_decompress)
>>> referenced by /home/mathias/.local/share/hashcat/comgr-69ec34/input/shared_kernel.o:(gpu_memset)
>>> referenced 7 more times
* Device #1 : Kernel /usr/local/share/hashcat/OpenCL/shared.cl build failed.
* Device #1 : Kernel /usr/local/share/hashcat/OpenCL/shared.cl build failed.
```
2024-10-29 15:35:10 +01:00
fse-a
f8c0899670
Increased-virtual-backend-limit
...
Increased the virtual backend limit.
2024-01-25 10:27:38 +01:00
Sergey Popov
c7923fe8ba
Fix RAM usage for Intel iGPUs
2023-11-24 23:03:00 +02:00
jsteube
c59b4bffd5
Add note on how to get CUDA running on WSL2
2023-09-27 08:14:51 +00:00
jsteube
0d0a07012c
Do not show HIPRTC notice if HIP is not installed. In that case we can assume the system doesn't have an AMD GPU
2023-09-26 08:52:46 +00:00
Rosen Penev
ae07d65f34
clang-tidy: remove useless casts
...
Now that const was fixed, pointless casts can be removed.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-08-20 21:10:34 -07:00
Rosen Penev
795674c939
fix some const-qual warnings
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-08-20 20:55:54 -07:00
Rosen Penev
a59e030d7f
fix MinGW compilation
...
HC_API_CALL needs to be placed not just on the declaration.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-08-11 23:16:27 -07:00
jsteube
96b05b2630
AMD Driver: Updated requirements for AMD Windows drivers to "AMD Adrenalin Edition" (23.7.2 or later) and "AMD HIP SDK" (23.Q3 or later)
2023-08-05 15:58:22 +00:00
justpretending
b2f14f2f5d
Fix some typos
2023-07-27 23:11:55 +07:00
jsteube
ab932815ea
Fixed out-of-boundary read in autotune.c when a fast hash defines a kernel_loops_min value that is higher than the actual number of amplifiers provided by the user
2023-07-04 09:40:39 +00:00
Gabriele Gristina
ef81520158
Metal Backend: disable Metal devices only if at least one OpenCL device is active
2023-06-14 21:11:42 +02:00
Jens Steube
32517211a5
Merge pull request #3760 from matrix/check_invalid_kern_type
...
do not allow negative kern_type
2023-06-14 03:25:35 +02:00
Gabriele Gristina
eb276f12f6
do not allow negative kern_type
2023-06-07 21:06:57 +02:00
Gabriele Gristina
737989b7cf
Metal Backend: allow use of devices with Metal if runtime version is >= 200
2023-06-07 01:17:30 +02:00
Gabriele Gristina
36606addac
Help: show supported hash-modes only with -hh
2023-05-01 17:38:42 +02:00
jsteube
6785a32e7a
Added new feature (-Y) that creates N virtual instances for each device in your system at the cost of N times the device memory consumption
2023-04-16 12:04:34 +00:00
Jens Steube
b1ca2ca539
Only try to allocate memory on a opencl device if it actually has memory
2023-04-11 10:17:32 +00:00
jsteube
6ad36db9ba
Add some detailed information/warnings about dropped HIPRTC symbols in the current AMD Adrenalin driver
2023-03-29 20:16:36 +00:00
Dávid Bolvanský
29a461cb51
Respect quiet flag when printing Metal API warning
...
Fixes https://github.com/hashcat/hashcat/issues/3624
2023-03-28 00:05:46 +02:00
Royce Williams
ebe8741000
link to driver FAQ on CUDA failure
2023-03-07 12:27:30 -09:00
beschio
69a945ea75
fix Metal API advice
2023-02-04 22:47:10 +01:00
jsteube
3390159bb2
AMD Driver: Updated requirements for AMD Windows drivers to "AMD Adrenalin Edition" (Adrenalin 22.5.1 exactly)
2023-01-04 08:36:37 +00:00
jsteube
c6a7826d12
Do not show metal disabled warning in backend information mode
2023-01-03 13:59:59 +00:00
jsteube
9651d3025c
Fix error in backend.c if compiling on macOS
2022-12-31 16:04:35 +00:00
jsteube
b7925f1149
Add warning about automatically disabled Metal devices
2022-12-29 19:37:56 +00:00
jsteube
b228816067
Fix some missing newlines
2022-12-28 18:28:30 +00:00
Gabriele Gristina
15d74b7c1c
Disable Metal < 200, commented unused and deprecated code
2022-12-08 18:59:34 +01:00
Gabriele Gristina
0f63294b8a
Allow using Metal < 300 with --force
2022-12-08 17:37:50 +01:00
Jens Steube
a7dbd73612
Add Radeon Pro W5700X to more scrypt based hash-modes and fix some metal issues
2022-11-26 13:32:33 +01:00
Jens Steube
47b49d81de
Prepare fixes to enable scrypt cracking on macOS 13
2022-11-24 22:46:03 +01:00
Jens Steube
18fcf28d64
Apple Driver: Automatically enable GPU support on Apple OpenCL instead of CPU support
...
Apple Driver: Updated requirements to use Apple OpenCL API to macOS 13.0
2022-11-20 14:27:16 +01:00
jsteube
9a52ee6d01
Fix error message in backend.c and add missing new hash-mode entries in changes.txt
2022-11-18 09:47:17 +00:00
Jens Steube
66b22fa644
Add support for Metal > 300 and reject support for older version
2022-11-16 14:26:54 +01:00
Jens Steube
8f0d69ea9c
Always assume 8 compute unit for metal GPUs
2022-11-09 16:09:57 +01:00
Jens Steube
6d5d9a266f
AMD Driver: Updated requirements for AMD Windows drivers to "AMD Adrenalin Edition" (Adrenalin 22.5.1 or later)
2022-11-05 12:56:36 +01:00
Jens Steube
b8dd806944
Revert accidental removal of check to backend_devices_cnt
2022-11-01 19:39:03 +01:00
Jens Steube
eaf3de164b
Remove option "-flegacy-pass-manager" if HIP backend is used. Support was removed from LLVM 15. There's no alternative option available.
...
Fixes #3469
2022-11-01 19:36:03 +01:00
pelle
f456973928
Added error message describing workaround when detecting more than 64 backend devices.
2022-10-27 12:09:37 +02:00
Jens Steube
5aaf8e2c42
AMD Driver: Updated requirements for AMD Linux drivers to "AMDGPU" (21.50 or later) and "ROCm" (5.0 or later)
...
AMD Driver: Updated requirements for AMD Windows drivers to "AMD Adrenalin Edition" (Adrenalin 22.5.1 exactly)
2022-08-30 10:12:26 +02:00
Jens Steube
78ee811fa9
Use -flegacy-pass-manager for -m 501, -m 1600 and -m 6300 on AMD HIP for massive speed improvement
2022-08-12 16:20:14 +02:00
Jens Steube
3d898c5daf
AMD Driver: Updated requirements for AMD Linux drivers to ROCm 5.2.1 or later due to new HIP interface
2022-08-10 19:19:34 +02:00
Jens Steube
a841af000f
Fix updated HIP version handling
2022-04-22 13:28:33 +02:00
Jens Steube
4791cca0aa
AMD Driver: Updated requirements for AMD Linux drivers to ROCm 5.1.1 or later due to new HIP interface
...
AMD Driver: Updated requirements for AMD Windows drivers to Adrenalin 22.3.1 or later due to new HIP interface
2022-04-19 13:02:51 +02:00
Jens Steube
9a8f3ebcab
Update HIP version check on Linux and Windows
2022-04-18 18:07:40 +02:00
Jens Steube
c916ae821d
Fix HIP include folder usage on Windows
2022-04-16 18:32:21 +02:00
philsmd
a24d723d66
minor code style fixes
2022-03-31 19:19:16 +02:00
philsmd
b51f536ac5
sanity check for u32 cast for combs_cnt, bfs_cnt
2022-03-13 14:41:34 +01:00
philsmd
5d9d3c7eb7
sanity check for u32 cast for combs_cnt, bfs_cnt
2022-03-13 14:25:09 +01:00
philsmd
cd33a8a200
fixes #2560 : mention "main driver" within the error message
2022-03-09 18:15:54 +01:00
Will Crozier
edf7365cda
stdout mode: transfer indexes and compressed pw buffer from device in blocks, reducing overhead
2022-02-25 16:35:55 +00:00
Jens Steube
e9cb796528
Merge pull request #3186 from willcrozi/opencl-include-quoting
...
Improve handling of whitespace in kernel compiler include-path
2022-02-24 17:50:13 +01:00
Will Crozier
919ad5a1fd
warn/skip for AMD devices on Linux when OpenCL/HIP include-path has spaces
2022-02-20 20:14:57 +00:00
Giulio Garzia
c49238e9cd
OpenCL include-path workaround for Windows with AMD GPU
2022-02-20 17:55:16 +00:00
Gabriele Gristina
3156b487b7
Avoid quoting OpenCL include path when it's not required to
2022-02-20 17:55:16 +00:00
Gabriele Gristina
f890cd8134
Improved management of systems with multiple OpenCL platforms and show empty OpenCL platforms only in backend information mode
2022-02-19 21:17:56 +01:00
Gabriele Gristina
24de156ce8
Fixed backend active devices checks
2022-02-19 17:21:27 +01:00
Gabriele Gristina
fb12de4be6
fix style
2022-02-16 05:40:34 +01:00
Gabriele Gristina
7eb66e9936
Hardware Monitor: Add support for GPU device utilization readings using iokit on Apple Silicon (OpenCL and Metal)
2022-02-15 22:20:03 +01:00
Gabriele Gristina
3064c63c71
User Options: Change --backend-info/-I option type, from bool to int
2022-02-13 12:33:11 +01:00
Gabriele Gristina
b3d3b31c3e
Metal: added support for vectors up to 4
2022-02-10 21:53:08 +01:00
Jens Steube
be75e4b4ea
Rename STR() to M2S() to avoid future collisions and move from kernel source to command line parameter
2022-02-07 09:57:08 +01:00
Gabriele Gristina
7ac879f1e4
Fixed unused variable warning on Windows
2022-02-06 02:04:27 +01:00
Gabriele Gristina
829d49c8ba
resync src/backend.c
2022-02-06 01:17:19 +01:00
Gabriele Gristina
490702fcfa
Backends: added Metal host-code
2022-02-05 22:48:16 +01:00
Jens Steube
8293964097
Fix coding convention
2022-02-04 10:28:45 +01:00
Gabriele Gristina
cd363b32f6
Merge branch 'master' into metal_prepare_kernelIncludes_v2
2022-01-28 19:56:26 +01:00
Gabriele Gristina
01a28f80f7
Updated handling of POCL's known bugs
2022-01-22 22:40:18 +01:00
Gabriele Gristina
a1ced24564
Fixed bug on benchmark engine, add some unstable warnings, updated negative status code
2022-01-22 12:10:09 +01:00
Gabriele Gristina
2e4a136758
Refactored standard kernel includes in order to support Apple Metal runtime, updated backend, test units and status code
2022-01-18 22:52:14 +01:00
Gabriele Gristina
7650894e02
fixed bug in benchmark engine, updated negative status code
2022-01-11 04:58:30 +01:00
Jens Steube
dfd316c653
Merge pull request #3103 from matrix/backend_session_update_mp_rl
...
Removed hc_clSetKernelArg() call from backend_session_update_mp_rl()
2022-01-09 13:22:00 +01:00
Jens Steube
7a9a1b37d0
Merge pull request #3104 from matrix/backend_session_update_mp
...
Removed hc_clSetKernelArg() call from backend_session_update_mp()
2022-01-09 13:21:52 +01:00
Jens Steube
56ef2b4bde
Merge pull request #3102 from matrix/backend_cuda_restyle
...
CUDA Backend: moved functions to ext_cuda.c/ext_nvrtc.c and includes to ext_cuda.h/ext_nvrtc.h
2022-01-06 11:29:56 +01:00
Jens Steube
045ca5cb7a
Fixed method how OPTS_TYPE_AUX* kernels are called in association mode, for instance WPA/WPA2 kernels
2022-01-05 10:46:00 +01:00
Jens Steube
668d2179cd
Kernels: Refactored standard kernel declaration to use a structure holding u32/u64 attributes to reduce the number of attributes
2022-01-04 18:07:18 +01:00
Gabriele Gristina
994083eaf5
Removed hc_clSetKernelArg() call from backend_session_update_mp()
2022-01-03 18:28:19 +01:00
Gabriele Gristina
0f0cf1fe08
Removed hc_clSetKernelArg() call from backend_session_update_mp_rl()
2022-01-03 17:16:27 +01:00
Gabriele Gristina
f8ceb8785e
CUDA Backend: moved functions to ext_cuda.c/ext_nvrtc.c and includes to ext_cuda.h/ext_nvrtc.h
2022-01-03 16:29:15 +01:00
Gabriele Gristina
78c7ee2af6
HIP Backend: moved functions to ext_hip.c/ext_hiprtc.c and includes to ext_hip.h/ext_hiprtc.h
2022-01-02 19:12:41 +01:00
Gabriele Gristina
26b6054cab
OpenCL Backend: moved functions to ext_OpenCL.c and includes to ext_OpenCL.h
2021-12-28 21:55:05 +01:00
Gabriele Gristina
861e644057
OpenCL Backend: added workaround to make optimized kernels work on Apple Silicon
2021-12-24 17:30:49 +01:00
Jens Steube
df6e5480ca
Print module_extra_tuningdb_block undefined compute device warning only on GPU
2021-12-23 19:23:35 +01:00
Gabriele Gristina
3fd6dac523
Set default device-type to GPU with Apple M1
2021-12-14 00:37:17 +01:00