Hi, On Mon, 05 Jul 2021 07:27:54 -0500 Katherine Cox-Buday <cox.katherin...@gmail.com> wrote:
> I have written up a blog post here[1] which describes my experience > with trying to use OpenCL on Guix. While researching this, I found a > few messages in IRC and on guix-help wondering how to get this to > work, so I hope this helps someone. > > As always, thanks to everyone involved in Guix. > > [1] > https://katherine.cox-buday.com/blog/2021/07/05/trying-opencl-on-guix-an-experience-report/ Thanks a lot for this writing. I have the exact same issue but for a very different use case. I wrote a free software utility that computes the sim-unlock code for a very old smartphone model (Galaxy SII, GT-I9100), and I want to push it in a free software project I somehow still maintain but we use Guix for the CI, and so we are blocked by the lack of OpenCL as well. Here is an example that works on Trisquel 11 (it even works within a Trisquel 11 chroot from Guix): > $ rm -rf ~/.local/share/hashcat/ > $ hashcat -d 1 -m 110 --hex-salt -a 3 \ > ef63bf26e2382917d96850ccf9632458ee6e6c77:0000000000000000 \ > ?d?d?d?d?d?d?d?d > [...] > ef63bf26e2382917d96850ccf9632458ee6e6c77:0000000000000000:50681318 > > Session..........: hashcat > Status...........: Cracked > Hash.Mode........: 110 (sha1($pass.$salt)) > Hash.Target......: > ef63bf26e2382917d96850ccf9632458ee6e6c77:0000000000000000 > Time.Started.....: Tue Mar 4 21:11:40 2025 (4 secs) > Time.Estimated...: Tue Mar 4 21:11:44 2025 (0 secs) > Kernel.Feature...: Pure Kernel Guess.Mask.......: ?d?d?d?d?d?d?d?d [8] > Guess.Queue......: 1/1 (100.00%) > Speed.#1.........: 17403.7 kH/s (6.89ms) @ Accel:64 Loops:1000 Thr:1 > Vec:4 Recovered........: 1/1 (100.00%) Digests > Progress.........: 70528000/100000000 (70.53%) > Rejected.........: 0/70528000 (0.00%) > Restore.Point....: 70400/100000 (70.40%) > Restore.Sub.#1...: Salt:0 Amplifier:0-1000 Iteration:0-1000 > Candidate.Engine.: Device Generator > Candidates.#1....: 12345128 -> 68860881 > Hardware.Mon.#1..: Util:100% > [...] > $ hashcat -d 1 -m 110 --hex-salt -a 3 \ > ef63bf26e2382917d96850ccf9632458ee6e6c77:0000000000000000 \ > ?d?d?d?d?d?d?d?d --show > ef63bf26e2382917d96850ccf9632458ee6e6c77:0000000000000000:50681318 The same fails on Guix: > $ rm -rf ~/.local/share/hashcat/ > $ hashcat -d 1 -m 110 --hex-salt -a 3 \ > ef63bf26e2382917d96850ccf9632458ee6e6c77:0000000000000000 \ > ?d?d?d?d?d?d?d?d > hashcat (v6.2.6) starting > > ATTENTION! No OpenCL, Metal, HIP or CUDA installation found. > [...] > $ hashcat -d 1 -m 110 --hex-salt -a 3 \ > ef63bf26e2382917d96850ccf9632458ee6e6c77:0000000000000000 \ > ?d?d?d?d?d?d?d?d --show > $ Note that the examples above use the CPU (-d 1) to do the bruteforce so at least it shows something that is really easily reproducible, it's also relatively fast (few seconds) on a ThinkPad X200. Unfortunately, beside that, I don't have much to bring to the table yet. In contrast, 'clinfo -l' is almost identical between Guix and the Trisquel chroot. Though hashcat -I looks very different. In Guix we have: > $ hashcat -I > hashcat (v6.2.6) starting in backend information mode > > ATTENTION! No OpenCL, Metal, HIP or CUDA installation found. > > You are probably missing the CUDA, HIP or OpenCL runtime installation. > > * AMD GPUs on Linux require this driver: > "AMDGPU" (21.50 or later) and "ROCm" (5.0 or later) > * Intel CPUs require this runtime: > "OpenCL Runtime for Intel Core and Intel Xeon Processors" (16.1.1 > or later) > * NVIDIA GPUs require this runtime and/or driver (both): > "NVIDIA Driver" (440.64 or later) > "CUDA Toolkit" (9.0 or later) And in the Trisquel chroot: > $ hashcat -I > hashcat (v6.2.5) starting in backend information mode > > clGetDeviceIDs(): CL_DEVICE_NOT_FOUND > > clGetDeviceIDs(): CL_DEVICE_NOT_FOUND > > OpenCL Info: > ============ > > OpenCL Platform ID #1 > Vendor..: The pocl project > Name....: Portable Computing Language > Version.: OpenCL 2.0 pocl 1.8 Linux, None+Asserts, RELOC, LLVM > 11.1.0, SLEEF, DISTRO, POCL_DEBUG > > Backend Device ID #1 > Type...........: CPU > Vendor.ID......: 128 > Vendor.........: GenuineIntel > Name...........: pthread-Intel(R) Core(TM)2 Duo CPU P8600 @ > 2.40GHz Version........: OpenCL 1.2 pocl HSTR: > pthread-x86_64-pc-linux-gnu-penryn Processor(s)...: 2 > Clock..........: 2400 > Memory.Total...: 5542 MB (limited to 1024 MB allocatable in one > block) Memory.Free....: 2739 MB > OpenCL.Version.: OpenCL C 1.2 pocl > Driver.Version.: 1.8 > > OpenCL Platform ID #2 > Vendor..: Mesa > Name....: Clover > Version.: OpenCL 1.1 Mesa 23.2.1-1ubuntu3.1~22.04.3 I'll try to find the time to use the tips you mentioned to try to make hashcat work, and try more things, like using Guix on top of Trisquel and Parabola, to see if at some point things start working. While any workaround might be nice and get things moving, the end I am interested in something that we can upstream in Guix without workarounds, like building some OpenCL environment that we package (both by providing a function that takes the backends as parameters and that create the packages, and by using that to provide good defaults). Also note that all that might take time. While the blog post also enabled me to dig into that code again and fix some issues I had, I've also other priorities as well within Guix, so I'll most likely allocate time here and there over long period of time. Denis.
pgpkPeIpxJnCL.pgp
Description: OpenPGP digital signature