Skip to content

Add portable PTX export and verified modern LLVM cleanup - #409

Closed
brandonros wants to merge 64 commits into
Rust-GPU:mainfrom
brandonros:poc/portable-ptx-export
Closed

brandonros wants to merge 64 commits into
Rust-GPU:mainfrom
brandonros:poc/portable-ptx-export

Conversation

@brandonros

Copy link
Copy Markdown
Contributor

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 upstream main to 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#3brandonros#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.

@brandonros
brandonros force-pushed the poc/portable-ptx-export branch from 94b808a to 059beda Compare September 14, 2026 03:00
@brandonros
brandonros force-pushed the poc/portable-ptx-export branch from 059beda to d2104a0 Compare September 14, 2026 03:33
@brandonros brandonros closed this Sep 16, 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.

1 participant