fix: ignore load_ptr_tko padding when no mask is given
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 44/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- backend-api-design
Research direction
Start with the transplanting instructions in AGENTS.md and the referenced cutile-rs pull request 317, which contains the implementation context and moved paths. Investigate how load_ptr_tko is converted to Tile IR text when padding is present without a mask. Done means that case is handled without emitting faulty text; verify with the relevant tests identified in the transplanted pull request.
Written by the indexing model from the issue text.
Description
Tracks pull request NVlabs/cutile-rs#317 (https://github.com/NVlabs/cutile-rs/pull/317) by @mktip, opened 2026-09-25: fix: ignore load_ptr_tko padding when no mask is given. The branch was rebased onto cutile-rs main on 2026-10-07 and merges cleanly.
@mktip: that repository has moved here and is being archived, so the pull request is closed there, not rejected. If you want to continue the work, please recreate it against NVIDIA/cuda-rust. AGENTS.md in NVIDIA/cuda-rust has a "Transplanting a cutile-rs pull request" section that lets an agent do the replay (it fetches pull/317/head from NVlabs/cutile-rs, keeps your authorship and sign-off, and maps the moved paths).
Original description:
It's downstream bug (one could argue with cuda-tile) when someone tries to get the tile-ir text of a cutile-rs kernel, instruments it, then compiles it. Only then they'll notice that it won't compile.
That's because they would have a tile-ir kernel with a load_ptr_tko operation with no mask but a padding (which seems like something cutile-python allows). When this bytecode gets converted to text, since the padding (and mask) arguments are not keyworded and optional, it ends up generating tile-ir text in which the load_ptr_tko has the padding value inplace of the mask value (which most times would cause a build failure due to conflicting types, but if someone's padding is also of type i1, then it would compile taking the padding value as the mask value).
I'll mention this issue downstream, but I thought maybe it should be addressed here? unless there is a usage somehow for load_ptr_tko with a padding value and no mask value.
Hey!
The above is the git message, but long story short, the issue pertains to having the tile-ir text output of some cutile-rs kernel containing a bug in which a load_ptr_tko operation, that was given a padding but no mask, would generate correct bytecode but faulty tile-ir text (that could either crash or produce a different bytecode when compiled). So the fix is, when we see a load_ptr_tko, to not allow a padding value be to be given if the mask is not given to begin with. The tile-ir text outputted that way was valid
(apologies ahead of time in case there was any mistakes in this submission, I read the contributing guidelines, signed the commit, and renamed my branch)
- Dominant language
- Rust
- Stars
- 3.8k
- Forks
- 325
- Avg merge
- 6d 8h
- Merged PRs (30d)
- 66
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/cuda-rust
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NVIDIA/cuda-rust#1568 · 1 comment ·
Maintainers usually reply within 2 days
-
[BUG]: The doc of trait `LoadTileLike` is incorrectMay be free again @akhil9tiet claimed this 7 days ago, and no pull request is open. Openbug
Difficulty 1/5 Under an hour Newbie friendliness 72/100
NVIDIA/cuda-rust#1523 · 2 comments ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NVIDIA/cuda-rust#1303 · 1 comment ·
Maintainers usually reply within 2 days
All issues in NVIDIA/cuda-rust
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
area:sim good first issue kind:feature
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day
-
The demo's interval button and chart legend keep the previous interval after an interval changeOpenbug ui
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
userFRM/egui-charts#670 ·
Maintainers usually reply within 1 day
-
docs good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Usenova-Labs/usenova-backend#35 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
lugassawan/swe-workbench#823 ·
Maintainers usually reply within 1 day