[Relax] Ignore non-relax functions in relax.transform.RunCodegen - #16586
Merged
Merged
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.
yongwww
approved these changes
Feb 16, 2024
|
|
||
| # Global variable in pytest that applies markers to all tests. | ||
| pytestmark = [has_tensorrt_codegen, has_tensorrt_runtime] | ||
| # pytestmark = [has_tensorrt_codegen, has_tensorrt_runtime] |
Contributor
Author
There was a problem hiding this comment.
Whoops, thank you for the catch. This was commented out for debugging, and the PR is updated to remove the change.
|
|
||
| after = relax.transform.RunCodegen()(Before) | ||
| tvm.ir.assert_structural_equal(after["main"], Expected["main"]) | ||
| after.show() |
Contributor
Author
There was a problem hiding this comment.
Thank you, and cleaned up!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
relax.transform.RunCodegenpass 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.RunCodegento also ignore calls to non-relax functions.