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

Include comments with template argument names in Cpp code from EmitC #403

Open
wants to merge 4 commits into
base: feature/fused-ops
Choose a base branch
from

Conversation

lmendesp-amd
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@cferry-AMD cferry-AMD left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

mlir/lib/Target/Cpp/TranslateToCpp.cpp Outdated Show resolved Hide resolved
emitArgs)))
return failure();
if (callOpaqueOp.getTemplateArgNames() &&
!callOpaqueOp.getTemplateArgNames()->empty()) {
Copy link
Collaborator

@mgehre-amd mgehre-amd Nov 26, 2024

Choose a reason for hiding this comment

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

I wonder whether we can remove the empty check here. We already know that they have the same number as template arguments (from the verifier).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We made the default to be passing an empty AttrArray to the build method.

return emitOpError("number of template argument names must be equal to "
"number of template arguments");
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we please verify that we have no template arg names whenever we have no template args, and add a test for that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added.

@mgehre-amd
Copy link
Collaborator

Thank you! I added a small comments, but looks good overall.

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.

3 participants