hashcat Forum
--opencl-device-types vs. reported Device #? - Printable Version

+- hashcat Forum (https://hashcat.net/forum)
+-- Forum: Support (https://hashcat.net/forum/forum-3.html)
+--- Forum: hashcat (https://hashcat.net/forum/forum-45.html)
+--- Thread: --opencl-device-types vs. reported Device #? (/thread-5660.html)



--opencl-device-types vs. reported Device #? - Kgx Pnqvhm - 07-17-2016

Running hashcat64.exe --opencl-device-types 1 gets:

OpenCL Platform #1: NVIDIA Corporation
======================================
- Device #1: GeForce GTX 970, skipped

OpenCL Platform #2: Intel(R) Corporation
========================================
- Device #2: Intel(R) Core(TM) i3 CPU         550  @ 3.20GHz, 4061/16247 MB allocatable, 4MCU


While running hashcat64.exe --opencl-device-types 2 gets:

OpenCL Platform #1: NVIDIA Corporation
======================================
- Device #1: GeForce GTX 970, 1024/4096 MB allocatable, 13MCU

OpenCL Platform #2: Intel(R) Corporation
========================================
- Device #2: Intel(R) Core(TM) i3 CPU         550  @ 3.20GHz, skipped


Is the device numbering opposite, or does the command option do the opposite?


RE: --opencl-device-types vs. reported Device #? - philsmd - 07-17-2016

Please don't confuse OpenCL platforms (intel OpenCl CPU driver, Intel GPU driver, nvidia OpenCL GPU driver, AMD OpenCL CPU driver, AMD OpenCL GPU drivers, pocl opencl drivers, mesa...) with oclHashcat's devices types (selected by -D: CPU, GPU, FPGA, DSP, Co-Processor) or confuse it even with the selection of the device (-d) from a list of OpenCL devices.

This are all different concepts and it clearly says that the output is a list of different OpenCL platforms (OpenCL Platform #...), while you specified a selection of "device types" on the command line.

If in doubt, it should also be enough to just have a glance at the --help output: it even list and explains all the "device types" (the current output is):
Code:
- [ OpenCL Device Types ] -

  # | Device Type
===+=============
  1 | CPU
  2 | GPU
  3 | FPGA, DSP, Co-Processor

The list of platforms won't (and probably can't easily) be exactly ordered by the device types... these are different concepts and, for instance, you could have many platforms of the same device type etc.
Therefore, I don't think that devs should change the order of platforms as reported by the opencl driver (which depend, most importantly, on the ICD's available etc).

The only thing one could ask is "Why did oclHashcat's devs define opencl-device-type 1 as all CPU devices, while most opencl drivers ordering of platform IDs start with all GPU devices?" .... well, also this might depend on your hardware and probably other factors (like which - version - of opencl drivers you've installed etc).

I would just recommend that we shouldn't care about this ordering of platforms too much, but remember that:

1. by selecting the opencl device types you choose between CPU, GPU, FPGA (multiple choices possible),
2. the list of platforms depend on the drivers installed (can even be multiple drivers for a single device, like AMD OpenCL CPU driver and native OpenCL Intel driver for the same OpenCL-compatible CPU) and hence the ICDs found on the system ...
3. and ultimately the user can select (from the "filtered" list) the device with the --opencl-devices (-d) command line argument


RE: --opencl-device-types vs. reported Device #? - Kgx Pnqvhm - 07-17-2016

How is the "filtered list" option "--opencl-devices" used?

hashcat64.exe  --opencl-devices 1 gets:

OpenCL Platform #1: NVIDIA Corporation
======================================
- Device #1: GeForce GTX 970, 1024/4096 MB allocatable, 13MCU

OpenCL Platform #2: Intel(R) Corporation
========================================
- Device #2: Intel(R) Core(TM) i3 CPU         550  @ 3.20GHz, skipped


But hashcat64.exe --opencl-devices 2 gets neither:

OpenCL Platform #1: NVIDIA Corporation
======================================
- Device #1: GeForce GTX 970, skipped

OpenCL Platform #2: Intel(R) Corporation
========================================
- Device #2: Intel(R) Core(TM) i3 CPU         550  @ 3.20GHz, skipped


Note that the help file item for "--opencl-device-types" does not have the "see references below" warning seen on other items.

Edited: Maybe the "--opencl-platforms" option makes more sense?

hashcat64.exe --opencl-platforms 1 gets:

OpenCL Platform #1: NVIDIA Corporation, skipped

OpenCL Platform #2: Intel(R) Corporation
========================================
- Device #1: Intel(R) Core(TM) i3 CPU         550  @ 3.20GHz, 4061/16247 MB allocatable, 4MCU

While

hashcat64.exe --opencl-platforms 1 gets:

OpenCL Platform #1: NVIDIA Corporation
======================================
- Device #1: GeForce GTX 970, 1024/4096 MB allocatable, 13MCU

OpenCL Platform #2: Intel(R) Corporation, skipped

At least the numbers "match."


RE: --opencl-device-types vs. reported Device #? - atom - 07-17-2016

To make -d 2 useable you need to combine it with -D 1


RE: --opencl-device-types vs. reported Device #? - Kgx Pnqvhm - 07-17-2016

Now I see what you mean.

hashcat64.exe --opencl-platforms=2 --opencl-devices=1

OpenCL Platform #1: NVIDIA Corporation, skipped

OpenCL Platform #2: Intel(R) Corporation
========================================
- Device #1: Intel(R) Core(TM) i3 CPU 550 @ 3.20GHz, 4061/16247 MB allocatable, 4MCU

This shows that my CPU is finally acknowledged.

And I see why the --opencl-device-types 1 option is easier to use.