Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/test detection of RTX 4000 series cards #5403

Closed
solardiz opened this issue Dec 29, 2023 · 7 comments
Closed

Add/test detection of RTX 4000 series cards #5403

solardiz opened this issue Dec 29, 2023 · 7 comments

Comments

@solardiz
Copy link
Member

We should probably add a check to get_compute_capability() and maybe to get_processors_count() in opencl_common.c.

@solardiz solardiz added this to the Definitely 2.0.0 milestone Dec 29, 2023
@solardiz
Copy link
Member Author

Upon a closer look, that code inget_compute_capability() may be dead anyway? We check for if (!major) { before reaching the "Apple, VCL and some other environments" fallback code that checks device names. However, major is a pointer that is supposed to be non-NULL, or if it happens to actually be NULL then we'd crash on trying to assign values to *major. If this was broken for years, should we drop it? Also, it would be cleaner for that function itself to initialize *major and *minor to 0 rather than rely on each caller having done so (and simplify the callers).

We should still verify the logic of get_processors_count() for 4000 series cards - maybe it's correct as-is (the major >= 7 path does what's needed), or maybe we need to add a major check.

@solardiz
Copy link
Member Author

solardiz commented Jan 2, 2024

Upon a closer look, that code inget_compute_capability() may be dead anyway? We check for if (!major) { before reaching the "Apple, VCL and some other environments" fallback code that checks device names. However, major is a pointer that is supposed to be non-NULL

Looks like a bug introduced in 2021 with 8fa21b5, where @magnumripper added detection of a few more card series (IIRC on my suggestion), but apparently broke this all (and I did not catch that in my review). So now we need to decide between fixing that bug vs. dropping this legacy code.

solardiz added a commit to solardiz/john that referenced this issue Jan 2, 2024
@akirayamaoka32
Copy link

akirayamaoka32 commented May 15, 2024

Hi, what do i end up doing with my 4060 ti? I have tried adding a value of [Options:OpenCL] Device = 1/2. But john keeps using my CPU instead of GPU. And when adding --devices I get the following:
Refuse to run with the “--device” option when the format is neither OpenCL nor ZTEX

@claudioandre-br
Copy link
Member

I'm afraid this issue is not related to the problem you are facing now.

Hi, what do i end up doing with my 4060 ti? I have tried adding a value of [Options:OpenCL] Device = 1/2. But john keeps using my CPU instead of GPU. And when adding --devices I get the following: Refuse to run with the “--device” option when the format is neither OpenCL nor ZTEX

Does the format you are using exist in OpenCL? If so.

Could you open a new issue and add the command-line you are using and john's output. In order to see the message you are seeing, you are using a non-OpenCL format. E.g.

$ john ~/allTests.in --format=sha512crypt --device=1
Using default input encoding: UTF-8
The "--devices" option is valid only for OpenCL or ZTEX formats

The correct is --format=opencl or --format=sha512crypt-opencl (in my case)


Are you sure you have an OpenCL build and GPU drivers installed correctly?

# I have an OpenCL build
$ john --list=build-info
Version: 1.9.0-jumbo-1+bleeding-06049b7f0b 2024-04-20 19:39:50 +0200
Build: linux-gnu 64-bit x86_64 AVX2 AC OMP OPENCL
                                           ^^^^^^

# I don't have valid OpenCL devices
$ john --list=opencl-devices
Error: No OpenCL-capable platforms were detected by the installed OpenCL driver.
Error: No OpenCL-capable devices were detected by the installed OpenCL driver.

Is OpenCL working for you?

$ john --test=0 --format=opencl --device=1
No OpenCL devices found

@solardiz
Copy link
Member Author

I think we don't need to "fix" this issue because it was only in legacy code, which is unlikely to be needed on systems recent enough to have RTX 4000 cards. Indeed, we didn't even notice this code was broken for a long while (now fixed for older cards).

This issue also started attracting off-topic comments just because of the card name match. So let's close it.

For those finding this issue by searching for RTX 4000: we do support these cards just fine. We simply don't need the legacy custom code that was discussed here.

@solardiz solardiz closed this as not planned Won't fix, can't repro, duplicate, stale May 15, 2024
@akirayamaoka32
Copy link

I'm afraid this issue is not related to the problem you are facing now.

Hi, what do i end up doing with my 4060 ti? I have tried adding a value of [Options:OpenCL] Device = 1/2. But john keeps using my CPU instead of GPU. And when adding --devices I get the following: Refuse to run with the “--device” option when the format is neither OpenCL nor ZTEX

Does the format you are using exist in OpenCL? If so.

Could you open a new issue and add the command-line you are using and john's output. In order to see the message you are seeing, you are using a non-OpenCL format. E.g.

$ john ~/allTests.in --format=sha512crypt --device=1
Using default input encoding: UTF-8
The "--devices" option is valid only for OpenCL or ZTEX formats

The correct is --format=opencl or --format=sha512crypt-opencl (in my case)

Are you sure you have an OpenCL build and GPU drivers installed correctly?

# I have an OpenCL build
$ john --list=build-info
Version: 1.9.0-jumbo-1+bleeding-06049b7f0b 2024-04-20 19:39:50 +0200
Build: linux-gnu 64-bit x86_64 AVX2 AC OMP OPENCL
                                           ^^^^^^

# I don't have valid OpenCL devices
$ john --list=opencl-devices
Error: No OpenCL-capable platforms were detected by the installed OpenCL driver.
Error: No OpenCL-capable devices were detected by the installed OpenCL driver.

Is OpenCL working for you?

$ john --test=0 --format=opencl --device=1
No OpenCL devices found

I've checked everything, drivers, Opencl installation and John sees my GPU as device 2, but it doesn't want to work with the Керlr hash

@solardiz
Copy link
Member Author

it doesn't want to work with the Керlr hash

We have no OpenCL (and thus no GPU) support for Keplr. It uses scrypt at 128 MiB per hash, which would be quite slow on GPU anyway - with luck, it'd be similar speed to CPU.

Also, please stop adding to off-topic comments to this issue. If you want to report any issue related to Keplr, open a new GitHub issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants