mirror of
https://github.com/openwall/john.git
synced 2026-12-03 20:43:49 +07:00
[GH-ISSUE #1831] Implement a function to get a very rough "speed index" for an OpenCL device #1215
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#1215
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @magnumripper on GitHub (Oct 14, 2015).
Original GitHub issue: https://github.com/openwall/john/issues/1831
Originally assigned to: @magnumripper on GitHub.
See #1829 and https://github.com/magnumripper/JohnTheRipper/issues/1822#issuecomment-147900124
This doesn't have to be fully proper, just a best-effort guess.
I'd rather not make a hard-coded list. I hate them. My initial idea was to execute a simple test kernel (eg. one that takes 300ms on a very weak device) and profile it.
However, here's food for thought:
We can always get "index1" (clock x cores) but "index2" would be much better (clock x cores x SP's). The problem is we don't always know the SP figure (it actually comes from more or less a hard-coded list, doh). In this list, the "native vector width" for 'int' is used as SP count for CPUs.
@magnumripper commented on GitHub (Oct 14, 2015):
We could use index2 if available, and fall-back to index1 if we don't know number of SP's.
Or we could always calculate index2, using SP=x1 if unknown. BTW I think it actually is 1 for all unknowns in the sample table above.
Come to think of it, these two alternatives are the same thing, LOL.
@magnumripper commented on GitHub (Oct 14, 2015):
Simply using
index2 / 100(for the fastest formats, eg. NT) would mean a mask_int_cand_target of 33054 for Titan X but only 5040 for Juniper. That sounds pretty sane, doesn't it? Assuming SP of x1 It would be only 192 for HD 4000 but that's probably fine too.@magnumripper commented on GitHub (Oct 14, 2015):
I ended up using
index2 / 300for the fastest formats. Seems to work like a champ.@magnumripper commented on GitHub (Oct 14, 2015):
This function can be used for other things too. For example, we could vary the number of calls to (and iterations in) a "split kernel" depending on how much pow(d)er we have, reducing overhead for flagship devices.