-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Relax] Ignore non-relax functions in relax.transform.RunCodegen #16586
Conversation
The `relax.transform.RunCodegen` pass replaces calls to relax functions with the `"Codegen"` attribute with calls into a compiled module. Prior to this commit, while calls to relax functions without the `"Codegen"` attribute were ignored, calls to non-relax functions would raise an error. This commit updates `relax.transform.RunCodegen` to also ignore calls to non-relax functions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good addition!
@@ -40,7 +40,7 @@ | |||
) | |||
|
|||
# Global variable in pytest that applies markers to all tests. | |||
pytestmark = [has_tensorrt_codegen, has_tensorrt_runtime] | |||
# pytestmark = [has_tensorrt_codegen, has_tensorrt_runtime] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we will need this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, thank you for the catch. This was commented out for debugging, and the PR is updated to remove the change.
@@ -350,6 +350,36 @@ def main( | |||
|
|||
after = relax.transform.RunCodegen()(Before) | |||
tvm.ir.assert_structural_equal(after["main"], Expected["main"]) | |||
after.show() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this printing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, and cleaned up!
The
relax.transform.RunCodegen
pass replaces calls to relax functions with the"Codegen"
attribute with calls into a compiled module. Prior to this commit, while calls to relax functions without the"Codegen"
attribute were ignored, calls to non-relax functions would raise an error.This commit updates
relax.transform.RunCodegen
to also ignore calls to non-relax functions.