Repository navigation
Support PTX ISA 9.5 - #194
Draft
AntonOresten wants to merge 2 commits into
Draft
AntonOresten wants to merge 2 commits into
AntonOresten wants to merge 2 commits into
Conversation
PTX 9.5 redefines fabric.wait.sync_restrict::reads as a no-op, so add the replacement fabric.submit.commit_group / fabric.wait.sync_restrict::read N wrappers and document the old one as inert. tensormap.query.alloc_class_large rendered under the tensormap.replace sink contract without its .pred destination; it is now typed-wrapper-only with Bool-returning wrappers for generic, .global and .shared::cta pointers. Add %locality_domain_id and %locality_domain_supplemental_sm to the special-register ledger, raise the parser's known ISA to 9.5 (9.5 adds no targets or .target options), and update SURFACE.toml to the 9.5 section numbering, including raw-only trace.mark. No 9.5 form is assembled yet: CUDACore maps its newest toolchain to PTX 9.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
ptxas 13.5 rejects a 32-bit .shared::cta address for
tensormap.query.alloc_class_large ("Arguments mismatch for instruction
'mov'") while accepting a 64-bit one, so the shared wrapper now passes it
as `l`, as the tensormap.replace chain already does.
test/ptxas/ptx_isa_9_5.jl assembles every bound 9.5 form at its ISA floor
and pins the floor with a ptxas rejection below it. It skips until the
managed compiler supports ISA 9.5; CUDACore main maps ptxas 13.5 to 9.5
(JuliaGPU/CUDA.jl#3526) but no release carries it yet. Against CUDACore
main with CUDA_Compiler_jll 13.5 the host and ptxas suites pass
(245092 tests). SURFACE.toml and the wrapper docs now describe the
assembly evidence.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings PTX.jl's reviewed surface up to PTX ISA 9.5 (CUDA 13.5).
What changes
Fixes
fabric.wait.sync_restrict::readsas having no effect, so the existing wrapper no longer makes it safe to reuse a source.shared::ctabuffer. This adds wrappers for the replacement pair,fabric.submit.commit_groupandfabric.wait.sync_restrict::read N(N passed asVal, baked into the asm). The old wrapper is kept for source compatibility, and its comment and docs now say it does nothing.tensormap.query.alloc_class_large. Before this change it rendered under thetensormap.replacesink contract with no.preddestination. It is now typed-wrapper-only (a newTYPED_WRAPPER_ONLY_RULESentry,prefix = (:query,)), withBool-returning wrappers for generic,.globaland.shared::ctapointers..constand.paramare left unwrapped and fail loudly.tensormap.queryshared address width. ptxas 13.5 rejects a 32-bit.shared::ctaaddress for the query ("Arguments mismatch for instruction 'mov'") and accepts a 64-bit one;tensormap.replaceandmbarrieraccept 32-bit. The.shared::ctawrapper passes it asl, as thetensormap.replacechain already does.%locality_domain_idand%locality_domain_supplemental_sm(9.5, sm_100+) were rejected as unknown. They are now in the ledger, so the inventory goes from 151 to 153.Version and inventory
.targetoptions, so the future-version header test now uses.version 9.6.SURFACE.toml:spcompressis now §9.7.10.31,spdecompress§9.7.10.32).tensormapentry becomesstrict, since it now has a typed-wrapper-only subfamily.trace.mark. Its event label needs a module-level.metadata_section, which an inline-asm call can't declare.sin/cos.approx.2pi.ftz.f32,fence.alias.sync_restrict::read.release.sys,cp.async.bulk.wait_group.sync_restrict::proxy::async N, andtensormap.replacewith.alloc_class.docs/src/wrappers.mdgets a short section on the 9.5 additions.Evidence
New
test/host/ptx_isa_9_5.jlchecks the asm text and constraints, theBool/UInt32result types, the typed-wrapper misses, and the chain forms. The ledger and inventory pins are updated (special registers, the typed-wrapper-only rule set, module headers).Compiling to PTX through LLVM emits the expected 9.5 syntax:
tensormap.query.alloc_class_large.global.b1024 %p1, [%rd1];,fabric.wait.sync_restrict::read 1;,mov.u32 %r1, %locality_domain_id;.Full test suite: 246,547 of 246,548 assertions passed locally on GB10. The one failure was a special-register count pin in
test/host/codegen.jl; it is fixed in this PR and that file passes on rerun. 5 of 176 test files are skipped by target routing.New
test/ptxas/ptx_isa_9_5.jlassembles every bound 9.5 form at its ISA floor and pins the floor with a ptxas rejection one target below: the locality registers, the fabric submit-group pair and thesync_restrict::proxy::asyncbulk wait at sm_100 (rejected at sm_90); the read-only alias release fence at sm_90 (rejected at sm_80);sin/cos.approx.2piat sm_75;tensormap.queryat sm_90a, sm_100f, sm_110f and sm_120f (rejected at sm_90 and sm_100); and thetensormap.replace.alloc_classforms at sm_90a, sm_100f and sm_120f.Against CUDACore from CUDA.jl
main(Support CUDA 13.5 and cuDNN 9.28. JuliaGPU/CUDA.jl#3526 maps ptxas 13.5 to PTX 9.5) withCUDA_Compiler_jll13.5.37, the host and ptxas suites pass: 245,092 tests across 84 files. The GPU runtime tier has not been run on 13.5.Not covered: 9.5 assembly in CI
The registered CUDACore (6.5.1) still maps the newest toolchain to PTX 9.4, so CI emits
.version 9.4andtest/ptxas/ptx_isa_9_5.jlskips (one@test_skip). Once a CUDACore release includes #3526, bumpingtest/LocalPreferences.tomlto 13.5 turns it on. Bumping it before then gains nothing, because 6.5.1 also restrictsCUDA_Runtime_jllto 0.25.Spec changes that need no code
tensormap.replaceon.global_addresswithout.alloc_classnow resets the allocation class to Small. PTX.jl never emitstensormap.replaceitself..override::global_addressis now set by a device attribute instead of a fixed 128 KiB. Nothing in PTX.jl hard-codes 128 KiB..tile,.L2::cache_hint, optionalattributeOverrideInfo). Those forms are still unimplemented here.ldmatrixregister-count formula,(T,2k)→(T,2)in the canonical layouts, typos) and already matches PTX.jl.🤖 Generated with Claude Code