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

Support for universal binaries containing Metal code #37

Closed
maleadt opened this issue Feb 16, 2023 · 0 comments · Fixed by #38
Closed

Support for universal binaries containing Metal code #37

maleadt opened this issue Feb 16, 2023 · 0 comments · Fixed by #38

Comments

@maleadt
Copy link
Collaborator

maleadt commented Feb 16, 2023

Obviously depends on #7, but in addition I'd like to be able to parse FAT binaries that contain GPU code. Example of such a binary attached (zipped because of GitHub restrictions): test.zip

❯ file test.bin
test.bin:  [applegpu_g13s:Mach-O 64-bit GPU executable applegpu_g13s] [air64_v25:MetalLib executable (MacOS), version 1.2.7]
test.bin (for architecture applegpu_g13s):	Mach-O 64-bit GPU executable applegpu_g13s
test.bin (for architecture air64_v25):	MetalLib executable (MacOS), version 1.2.7

An example parser of such binaries can be found at https://github.com/dougallj/applegpu/blob/98008ca1c6f413706e57465f8a4116021501196f/compiler_explorer_tools/metal-archive-extractor.cpp

Naively adding the new magic numbers and using #7 doesn't just work, so I'll have to take a closer look at the parser 🙂

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

Successfully merging a pull request may close this issue.

1 participant