Add portable PTX export and verified modern LLVM cleanup - #409
Closed
brandonros wants to merge 64 commits into
Closed
brandonros wants to merge 64 commits into
brandonros wants to merge 64 commits into
Conversation
brandonros
force-pushed
the
poc/portable-ptx-export
branch
from
September 14, 2026 02:44
c0a80ec to
94b808a
Compare
brandonros
force-pushed
the
poc/portable-ptx-export
branch
from
September 14, 2026 03:00
94b808a to
059beda
Compare
…d point [skip ci]
brandonros
force-pushed
the
poc/portable-ptx-export
branch
from
September 14, 2026 03:33
059beda to
d2104a0
Compare
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.
Depends on #408 (LLVM 21.1.8 / CUDA 13.3). This draft targets upstream
main, so its current diff includes that prerequisite. After #408 merges, rebase this branch onto upstreammainto leave only the export and optimization changes.Add a GPU-independent Rust-to-PTX exporter, restore default merged-module GlobalDCE on the modern backend, and expose optional verified cleanup pipelines. Include retention regressions, modern NVVM shuffle wrappers, guarded-select fixtures, and tools for inspecting PTX/SASS and comparing mining workloads.
The exporter, feature gates, intrinsic assembly, scripts, and CI caches use LLVM 21. Existing experimental
Llvm19Cleanup/llvm19_*API names remain for caller compatibility. Checked-in LLVM 19 measurements remain historical evidence; they do not establish LLVM 21 correctness or runtime performance.The native stack is maintained in the fork: brandonros#3 → brandonros#4. The top fork PR provides the incremental diff above the LLVM upgrade. Both upstream PRs use these same branch heads.
Validation: all nine Python unit tests, offline Cargo metadata with
ptx_export/llvm21, touched Rust formatting checks, and whitespace checks pass. Full Linux LLVM 21/CUDA compilation and GPU numerical validation of the combined branch remain pending. Optional scalar cleanup and inlining remain disabled by default.