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 Intrinsics for 64 Bit Atomics #477

Open
tgymnich opened this issue Nov 6, 2024 · 3 comments
Open

Add Intrinsics for 64 Bit Atomics #477

tgymnich opened this issue Nov 6, 2024 · 3 comments

Comments

@tgymnich
Copy link
Member

tgymnich commented Nov 6, 2024

https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf

64 bit atomics are supported on M3 and up with some support on M2.
For this to be usable we need to figure out how to guard this feature to M2 or M3 and up by checking for the MetalGPUFamily.

@tgymnich tgymnich changed the title Add intrinsics for 64 bit atomics Add intrinsics for 64 bit Integers and Float Atomics Nov 6, 2024
@tgymnich tgymnich changed the title Add intrinsics for 64 bit Integers and Float Atomics Add intrinsics for 64 bit Atomics Nov 6, 2024
@tgymnich tgymnich changed the title Add intrinsics for 64 bit Atomics Add Intrinsics for 64 Bit Atomics Nov 6, 2024
@maleadt
Copy link
Member

maleadt commented Nov 6, 2024

For this to be usable we need to figure out how to guard this feature to M2 or M3 and up by checking for the MetalGPUFamily.

That's pretty hard, for kernel-level functionality. We could expose it similarly to the Metal and AIR version, but then all we can do is emit an exception (and thus a run-time error, which are currently still invisible until #416 is finished). Maybe it'd be worth trying to pick those up in the GPUCompiler validator? Seems hacky; in Julia those things are typically postponed until run-time.

@tgymnich
Copy link
Member Author

tgymnich commented Nov 6, 2024

We could also check in the compiler for the intrinsics and report back. Just like @printf does it.

@maleadt
Copy link
Member

maleadt commented Nov 7, 2024

We could also check in the compiler for the intrinsics and report back.

Slowly making Julia a static language 😛 I agree it's better for the user, though.

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

No branches or pull requests

2 participants