Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RAISE-BP] Remove mask for pointer tensor load/store operations #1636

Merged
merged 5 commits into from
Aug 8, 2024

Conversation

mfrancepillois
Copy link
Contributor

@mfrancepillois mfrancepillois commented Jul 16, 2024

Subsequent lowering passes don't expect pointer tensor load/store operations to have a non-null mask operand.
This PR therefore remove the mask operand from the generated load/store operations.
If a load/store operation has a non-empty mask, the operation is not rewritten.
This PR also improve the robustness of the pass by adding a cast operation if size, shape or offset values of MakeTensorPtrOp are of type Index.

@mfrancepillois mfrancepillois requested review from whitneywhtsang, etiotto and a team July 16, 2024 13:44
@mfrancepillois mfrancepillois self-assigned this Jul 16, 2024
@mfrancepillois mfrancepillois linked an issue Jul 16, 2024 that may be closed by this pull request
Copy link
Contributor

@victor-eds victor-eds left a comment

Choose a reason for hiding this comment

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

Changes LGTM. Should we then fail if we find a mask on tt.load/store?

Copy link
Contributor

@whitneywhtsang whitneywhtsang left a comment

Choose a reason for hiding this comment

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

Why is it safe to simply remove mask from load and store?

@mfrancepillois
Copy link
Contributor Author

Why is it safe to simply remove mask from load and store?

You're right. It not safe to simply remove mask. Issue #1784 has been created to address this problem.

@whitneywhtsang
Copy link
Contributor

Why is it safe to simply remove mask from load and store?

You're right. It not safe to simply remove mask. Issue #1784 has been created to address this problem.

Do we still need to review this PR? Should it be closed?

@mfrancepillois
Copy link
Contributor Author

Why is it safe to simply remove mask from load and store?

You're right. It not safe to simply remove mask. Issue #1784 has been created to address this problem.

Do we still need to review this PR? Should it be closed?

The changes in this PR are still needed as block pointer load/store ops are not in line with the triton ops spec.
The PR has been updated to generated only safe code until issue #1784 has been addressed.
i.e. if a load/store operation has a non-empty mask, the operation is not rewritten.

@whitneywhtsang whitneywhtsang merged commit d19096c into llvm-target Aug 8, 2024
4 checks passed
@whitneywhtsang whitneywhtsang deleted the maxime/raise-add-ptr-index-cast branch August 8, 2024 17:50
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.

[RAISE-BP] Enable the 03-matrix-multiplication tutorial
3 participants