[deprecated] How to make your cat lose weight in 4 easy steps

Note: all versions of oclHashcat have been replaced by a unified OpenCL CPU/GPU version, now known simply as hashcat. Since modern hashcat dynamically compiles the kernels that it needs, the kernel removal technique described here is no longer necessary (unless you are running the legacy oclHashcat for some reason).

Foreword

Every new compute capability increases the number of kernels required for oclhc, which in turn increases its size. There are currently 11 compute capabilities for Nvidia, and they have to be multiplied by the number of supported hashes and by two (for 32 bit and 64 bit OS). A simple batch script can be made to delete obsolete kernels and free space.

Identify the compute capability of your GPU

There are multiple ways to identify the compute capability of your GPU. A reliable and easy way would be to launch CudaExample500.bat and look at the “Device #1” string oclhc prints. In this example a GTX Titan and a 64 bit OS are used, so it should be “Device #1: Kernel ./kernels/4318/m00500.sm_35.64.ptx”. This means that GTX Titan's compute capability is sm_35, which is the only architecture that should be kept.

Copy the batch script

The batch script, found below, should be copied and placed into kernels\4318 folder inside oclhc, in a “delete.bat” file.

del *.32.ptx

del *.sm_10.64.ptx
del *.sm_11.64.ptx
del *.sm_12.64.ptx
del *.sm_13.64.ptx
del *.sm_20.64.ptx
del *.sm_21.64.ptx
del *.sm_30.64.ptx
del *.sm_35.64.ptx
del *.sm_37.64.ptx
del *.sm_50.64.ptx
del *.sm_52.64.ptx

Modify the batch script

Now, the batch script above deletes all 32 bit kernels and all 64 bit kernels. The line “del *.sm_35.64.ptx” should be removed from the file for the aforementioned example.

Run the batch file

Once all is done, run the batch file and it will delete all obsolete kernels.

Notes

  1. If there are several different GPUs of the same vendor, kernels for all those GPUs should be kept.
  2. The script was designed for a 64 bit OS.
Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain