Skip to content

[REFACTOR][TIRx] Declare dynamic shared memory with a CUDA leaf op - #20563

Merged
tlopex merged 1 commit into
apache:mainfrom
tqchen:cuda-dyn-smem-bytes-leaf
Oct 6, 2026
Merged

tlopex merged 1 commit into
apache:mainfrom
tqchen:cuda-dyn-smem-bytes-leaf

Conversation

@tqchen

@tqchen tqchen commented Oct 6, 2026

Copy link
Copy Markdown
Member

Replace the dynamic shared-memory size attribute with T.cuda.dyn_smem_bytes(bytes), a CUDA declaration whose signature requires an integer constant. SMEMPool.commit() emits the declaration, and host/device splitting collects its byte count for the runtime launch before removing it from the device body.

Preserve pool high-water accounting, explicit-size precedence, allocation-extent fallback, and dynamic shared-memory launch argument ordering. Migrate direct declaration sites to the CUDA spelling.

Replace the dyn_smem_bytes attribute marker with a typed CUDA declaration. Collect the byte count for the host launch and remove the declaration from the device body while preserving pool accounting and allocation-extent fallback.
@tlopex
tlopex merged commit e1d85f6 into apache:main Oct 6, 2026
8 checks passed
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.

2 participants