Skip to content

Conversation

peterbell10
Copy link
Contributor

The tensor descriptor rewriting pass uses 1-to-n type conversion, which will expand a tensordesc argument into multiple new pointer and int arguments. However, the upstream function conversion in mlir doesn't remap the attributes to the corresponding new argument index, which means we may make incorrect assumptions about arguments and miscompile.

The tensor descriptor rewriting pass uses 1-to-n type conversion, which
will expand a tensordesc argument into multiple new pointer and int
arguments. However, the upstream function conversion in mlir doesn't
remap the attributes to the corresponding new argument index, which
means we may make incorrect assumptions about arguments and miscompile.
Copy link
Collaborator

@ThomasRaoux ThomasRaoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, why was the function not inlined?

@peterbell10
Copy link
Contributor Author

In this case the function in question is the kernel itself.

@peterbell10 peterbell10 merged commit 7afd4f4 into main Oct 9, 2025
9 checks passed
@peterbell10 peterbell10 deleted the pb/fix-tensordesc-a100-attrs branch October 9, 2025 08:25
@ThomasRaoux
Copy link
Collaborator

In this case the function in question is the kernel itself.

I see, I didn't realize we are changing the kernel signature. That means we expect matching changes in the dispatch code?

yangshuxin pushed a commit to yangshuxin/triton that referenced this pull request Oct 9, 2025
…riton-lang#8406)

The tensor descriptor rewriting pass uses 1-to-n type conversion, which
will expand a tensordesc argument into multiple new pointer and int
arguments. However, the upstream function conversion in mlir doesn't
remap the attributes to the corresponding new argument index, which
means we may make incorrect assumptions about arguments and miscompile.
@peterbell10
Copy link
Contributor Author

Yes this case is handled by make_tensordesc_arg. Specifically by the metadata is None branch.

Jokeren pushed a commit that referenced this pull request Oct 10, 2025
…8406)

The tensor descriptor rewriting pass uses 1-to-n type conversion, which
will expand a tensordesc argument into multiple new pointer and int
arguments. However, the upstream function conversion in mlir doesn't
remap the attributes to the corresponding new argument index, which
means we may make incorrect assumptions about arguments and miscompile.
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.

2 participants