Conversation
this commit only adds work for the Apple Metal GPU backend. it tries to establish a common API for other backends to follow, but I dont have any other devices to test with
Member
|
I have a RTX 4060 Ti on Windows and integrated AMD graphics of a Ryzen 7 5700U on Linux. I'm not sure I can work on GPU implementations right now but if you make something I'll be happy to test it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #XXX
Changes:
-stop-afterflag. This flag was rather useless, I added it under the impression that maybe a few collisions would happen and you could pick out the correct key from the list, but that's nowhere near the case. When bruteforcing a PRUDPv1 access key, only 1 possibility exists so it will ALWAYS return 1 result. When bruteforcing a PRUDPv0 access key, there will be thousands of collisions, making it impossible to determine the original access key. Plus, it made the GPU code more complex. So instead, I just opted to remove that flag entirely and always only return the first valid access keybruteforcefolder, for organizational reasons. This lets us put all the CGO backend code alongside the bruteforcing code without cluttering the main foldercommonfolder for some common utilities shared between ROM scanning mode and bruteforcing mode-gpuflag. When set with-bruteforce, the program will try to select the first available GPU backend to run the bruteforcing on. If none are available, it falls back to the CPU backend. I tried to make this flag customizable, such as-gpudoing automatic scanning and-gpu=metalto manually set the backend, but the Go flag package makes that annoying when using interfaces like this is now.metalfile alongside the Objective-C code, but when the program was compiled it wouldn't actually bundle that source into the program. It would try to dynamically load the.metalfile, which would break when distributing the build. So I just embedded it manually. Unsure if there's a way around thatIn my tests I was able to get the Terraria game server access key in 5 seconds and the MK7 access key in 0.2 seconds when using the Metal backend.
Marked as a draft for now since I'm not very good at writing GPU code, and I only have a 2024 Mac Mini to test with. Other GPU backends should be added before this is merged. Also need to make sure builds work in CI, no idea if they will since iirc the Apple parts require Xcode?
@DaniElectra @shutterbug2000 do you guys have other GPUs to test with? Y'all seem like the type of people to have some