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

[BACKEND] Emit an error when the tensor shape is smaller than the shared memory tile size for shared encoding with leadingOffset=True. #4731

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

Jokeren
Copy link
Contributor

@Jokeren Jokeren commented Sep 14, 2024

No description provided.

@Jokeren Jokeren linked an issue Sep 14, 2024 that may be closed by this pull request
@Jokeren Jokeren merged commit f4c48a9 into main Sep 16, 2024
7 checks passed
@Jokeren Jokeren deleted the keren/mmav3-warning branch September 16, 2024 23:44
Comment on lines +422 to +427
if (shape[colDim] < tileCols || shape[rowDim] < tileRows) {
llvm::errs() << "Illegal shared layout; expected shape to be at least ["
<< tileRows << ", " << tileCols << "], shape: ["
<< shape[rowDim] << ", " << shape[colDim] << "]\n";
llvm::report_fatal_error("Illegal shared layout");
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry missed this review. One question: could this be part of the verifier?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You mean add a verifier for SharedEncodingAttr? Maybe we can just emit an error in SharedEncodingAttr's builder

Copy link
Collaborator

@ThomasRaoux ThomasRaoux Sep 18, 2024

Choose a reason for hiding this comment

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

it would be more memdesc type verifier (I believe we have some of those already).

Maybe we can just emit an error in SharedEncodingAttr's builder

it depends on the memdesc shape which wouldn't be known in the builder right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm referring to this builder interface.

AttrBuilder<(ins "ArrayRef<int64_t>":$shape,

Does it look good to you?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah yeah I guess that works. It wouldn't catch other cases but that's the only place where we create those anyway

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.

Assertion error from linear layouts
3 participants