Skip to content

Fix support of float atomics in threadgroup memory.#2611

Closed
duburcqa wants to merge 1 commit into
KhronosGroup:mainfrom
Genesis-Embodied-AI:duburcqa/fix_metal_atomics_shared_mem
Closed

Fix support of float atomics in threadgroup memory.#2611
duburcqa wants to merge 1 commit into
KhronosGroup:mainfrom
Genesis-Embodied-AI:duburcqa/fix_metal_atomics_shared_mem

Conversation

@duburcqa

Copy link
Copy Markdown

No description provided.

@CLAassistant

CLAassistant commented Mar 29, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@duburcqa duburcqa closed this Mar 29, 2026
@duburcqa duburcqa reopened this Mar 29, 2026
@duburcqa duburcqa changed the title Fix Support of float atomics in threadgroup memory. Fix support of float atomics in threadgroup memory. Mar 29, 2026
Comment thread spirv_msl.cpp
expected_type = to_signed_basetype(type.width);

// Metal does not support float atomics in threadgroup memory. When the
// atomic result type is integer but the pointee type is float (CAS-based

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does SPIRV-Cross do that CAS emulation? I'm not aware of that. I'm really missing a test case here. Just uploading some failing .spv is fine. I can commit that on the side if it's a hassle to run the test suite. I'm not convinced this would work as-is.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking the time to review my PR. Actually I moved CAS emulation in Quadrants itself to avoid having to modify SPIRV-Cross, I'm just replacing the original float atomics and the correct instruction to never generate code that would need this feature, so I don't need any changes in SPIRV-Cross.

For reference: Genesis-Embodied-AI/quadrants@79ec049

@duburcqa duburcqa closed this Apr 21, 2026
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 this pull request may close these issues.

3 participants