Skip to content

Dynamic threadgroup memory#750

Draft
christiangnrd wants to merge 10 commits into
mainfrom
dynmem
Draft

Dynamic threadgroup memory#750
christiangnrd wants to merge 10 commits into
mainfrom
dynmem

Conversation

@christiangnrd
Copy link
Copy Markdown
Member

@christiangnrd christiangnrd commented Mar 1, 2026

Surprisingly it's somewhat functional. Only macOS 15+ since the global dynamic threadgroup memory is not available before then. This isn't the only way to get this dynamic threadgroup memory, but I tried this approach as my first attempt since it seemed the most similar to how static threadgroup memory is implemented.

The Metal interface takes an Integer or a Tuple of the size of the allocation, which is then aligned to the next multiple of 16.

Kernels silently fail under shader validation (which are caught in the tests since the output doesn't match expected results.

Close #701

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.35%. Comparing base (356e7d2) to head (a76f582).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #750      +/-   ##
==========================================
- Coverage   81.74%   81.35%   -0.40%     
==========================================
  Files          66       63       -3     
  Lines        3145     3138       -7     
==========================================
- Hits         2571     2553      -18     
- Misses        574      585      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@christiangnrd christiangnrd added help wanted Extra attention is needed kernels Things about kernels and how they are compiled. labels Mar 14, 2026
@christiangnrd christiangnrd force-pushed the dynmem branch 5 times, most recently from f5549c3 to c702088 Compare June 2, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed kernels Things about kernels and how they are compiled.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for dynamic shared memory

1 participant