Repository navigation
Bump pliron to 823d9d8 and adopt upstream SyncScopeAttr - #1199
Merged
Merged
Conversation
Bump the pliron git pin 8447aa42 -> 823d9d8 in both manifests (workspace
and rustc-codegen-cuda, which must stay on the same rev) and refresh both
lockfiles.
Upstream pliron-llvm now models the synchronization scope of atomic ops
as a dedicated SyncScopeAttr (System / SingleThread / NamedScope) exposed
through a SyncScopeInterface, replacing the per-op optional StringAttr
(llvm_{rmw,cas,ld,st,fence}_syncscope) and the Option<String> constructor
parameters. That covers everything cuda-oxide's local LlvmSyncScope enum
existed for, so the local shim is deleted and all users migrate to the
upstream attribute:
- llvm-export: drop the LlvmSyncScope enum; the textual exporter reads
scopes via SyncScopeInterface::syncscope and formats them with
SyncScopeAttr::to_name (system scope stays unnamed).
- mir-lower: map NVVM scopes straight to SyncScopeAttr when building
atomicrmw/cmpxchg; fence emission keys off the NVVM scope directly.
- nvvm-transforms: legacy legalization matches on SyncScopeAttr instead
of Option<&str>; tests construct scopes through the attribute.
The upstream rename of llvm.insert_element/extract_element (op names
only, Rust types unchanged) and the other four commits in the range
(given_names rename, decontextualization utils, ScalarOrVector
interfaces, From<fmt::Error>) required no cuda-oxide changes.
Validated: cargo test --workspace (5287 passed, 0 failed), clippy clean
on touched crates, smoketest --compile-only 219/219, vecadd and
scoped_atomic_load_store executed on GPU; syncscope("device"/"block")
emission in generated .ll is unchanged.
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.
What this is
Bump pliron from
8447aa42to upstream master823d9d8(6 commits). One commit matters to us, and it lets us delete code:The SyncScope migration
Until now cuda-oxide carried a local syncscope extension because pliron modeled the scope as a free-form
Option<String>. Upstream's newSyncScopeAttris a strict superset of it, so per the framework-first rule the shim is gone:SyncScopeInterface; mir-lower buildsSyncScopeAttrdirectly; nvvm-transforms' legacy-atomic legalization matches on the attribute (SingleThread and unknown named scopes still rejected as unsupported, same as before).membarpath now keys off the NVVM-dialect scope enum directly instead of round-tripping through the deleted LLVM-level enum.9 files, +151/−157.
Regression sweep: every example, before vs after
All 219 examples rebuilt on main and on this branch, device IR compared:
atomics24 occurrences both sides,atomic_f164 both sides, same device/block mix.Validation
cargo test --workspace: 101 suites, 5287 tests, 0 failures (on the branch rebased onto current main).scripts/smoketest.sh --compile-onlyfrom a cold shared cache: 219/219 pass.llvm-export,mir-lower,nvvm-transforms).One behavior note for reviewers
Upstream's
SyncScopeInterface::syncscopepanics if the attribute is missing rather than returning aResult. Every cuda-oxide construction path goes through upstream constructors that always set it, and the interface verifier rejects IR without it, but rawOperationbuilders added in the future would hit the panic first.