-
Notifications
You must be signed in to change notification settings - Fork 543
[UT] Add new ut case for aclgraph in auto enable #4031
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
Conversation
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. |
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.
Code Review
This pull request adds a new unit test to verify the behavior of aclgraph auto-enabling. The test case is relevant and covers an important configuration path. My review includes one suggestion to improve the robustness of the test by making the log assertion less fragile, which will improve its long-term maintainability.
tests/ut/test_aclgraph_enable.py
Outdated
| self.assertTrue( | ||
| "PIECEWISE compilation enabled on NPU. use_inductor not supported - " | ||
| "using only ACL Graph mode" in | ||
| cm.output[1]) |
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.
Checking for a log message at a specific index cm.output[1] makes the test fragile. If other log messages are added or their order changes in the future, this test will break unexpectedly. It's more robust to check if the expected message exists anywhere in the log output, rather than relying on its exact position.
| self.assertTrue( | |
| "PIECEWISE compilation enabled on NPU. use_inductor not supported - " | |
| "using only ACL Graph mode" in | |
| cm.output[1]) | |
| self.assertTrue(any( | |
| "PIECEWISE compilation enabled on NPU. use_inductor not supported - " | |
| "using only ACL Graph mode" in message | |
| for message in cm.output), "Expected log message not found.") |
cb93d3b to
be30ff3
Compare
Signed-off-by: lilinsiman <lilinsiman@gmail.com>
What this PR does / why we need it?
add new ut case for aclgraph in auto enable
Does this PR introduce any user-facing change?
no
How was this patch tested?
ut