Repository navigation
deps: bump pliron to master (no_std/hashbrown) + AttributeDict encapsulation sweep - #175
Merged
Merged
Conversation
Upstream pliron PR #114 makes the framework no_std-capable and switches its maps to hashbrown. hashbrown's get<Q: Hash + Equivalent<K>> no longer pins the key type, so the four call sites that reached into AttributeDict's inner map with `"literal".try_into().unwrap()` keys stopped inferring. Route them through AttributeDict::get::<T>, whose &Identifier parameter pins the key type and downcasts in one step. Both lockfiles move together: the isolated rustc-codegen-cuda workspace must stay on the same pliron rev as the root, or types stop unifying across the boundary.
The hashbrown inference break in the previous commit only bit call sites that bypassed AttributeDict's typed wrapper and poked at the public .0 field. Sweep every remaining keyed access onto the wrapper so no future map-internals change can reach us: - .0.insert(key, attr.into()) becomes .set(key, attr); set takes the typed attribute directly, so the AttrObj boxing disappears from call sites (mir-importer callee/mutable/gpu_kernel/cluster/launch bound stamps, mir-lower fastmath/nneg/overflow flag stamps). - .0.get + manual downcast_ref becomes .get::<ConcreteAttr>, which downcasts for us (llvm-export nneg read, kernel attr propagation). - .0.contains_key(&gpu_kernel) becomes .get::<StringAttr>(..) .is_some(), matching the type the importer actually stores. Whole-map operations stay on the public field because the wrapper has no equivalent yet: the print-side clone_skip_outlined + retain + is_empty in dialect-mir's MirFuncOp printer, and the keys() introspection in llvm-export's ops_test.
…akes &Context Upstream pliron relaxed the receiver context to a shared borrow; clippy's unnecessary_mut_passed flags the old call shape under -D warnings.
meefs
pushed a commit
to meefs/cuda-oxide
that referenced
this pull request
Sep 30, 2026
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.
deps: bump pliron to master af1b7d0 + AttributeDict encapsulation sweep
Tracks upstream pliron master at
af1b7d07dda9, picking up:no_stdsupport; pliron's maps move to hashbrownsimplify_cfgoptimizer added to the llvm-opt pipelineBoth the root workspace and the isolated
rustc-codegen-cudaworkspace move to the same rev (required, or pliron resolves to two distinct crates and types stop unifying). Both lockfiles updated together.Why the bump broke 4 call sites
hashbrown's
get<Q: Hash + Equivalent<K>>no longer pins the key type, so call sites that reached intoAttributeDict's inner map through the public.0field with"literal".try_into().unwrap()keys stopped inferring (E0283: type annotations needed). Exactly 4 sites broke, all inmir-lower/src/convert/ops/memory.rs.Call sites that already used the wrapper API (
dialect-nvvmdebug ops,AlignmentAttrhelpers in llvm-export) were untouched by the change. The break only bit code that bypassed the abstraction.The encapsulation sweep (the actual point)
Rather than patching the 4 sites with turbofish, this PR routes every keyed
AttributeDictaccess through the typed wrapper, so no future map-internals change upstream can reach us:Swept sites: callee/mutable stamps in the mir-importer translator, gpu_kernel + cluster-dim + launch-bound stamps and propagation (mir-importer
body.rs, mir-lowerlowering.rs), fastmath/nneg/overflow flag stamps (mir-lower arithmetic/cast/call), the nneg read and kernel metadata reads in the llvm-export emitter.Whole-map operations keep using the public field because the wrapper has no equivalent yet: the MirFuncOp printer in dialect-mir (
retain+is_emptyon aclone_skip_outlinedcopy) and akeys()introspection in llvm-export's ops_test. Upstream wrapper candidates:remove/retainand key iteration.One additional fallout fix: upstream relaxed
set_operand_segment_sizesto take&Context; a mir-lower test passed&mut ctxand trippedclippy::unnecessary_mut_passedunder-D warnings.Verification
-D warnings(--all-targets), doc-D warnings, doctests: cleanvecadd(sm_90),tcgen05(sm_100, 102 tcgen05 instructions in PTX),wgmma(sm_90a)clusteremitscluster_dim_x/y/znvvm.annotations;debugemitsmaxntidx/minctasmmetadata and.maxntidin PTXLabels:
build-related,refactor,IR-lowering,llvm-exportGPU verification (done)
Full smoketest on a 2x RTX 5090 box (sm_120): compile-only 92/92, execution 91/92. The one execution failure is
clusterTest 2 (cluster sync), which fails identically on current main on this hardware and is expected for now per the maintainer; not related to this bump.