[Relax][Test] Cover default GPU pipeline scheduling for R.power/elementwise kernels#19923
[Relax][Test] Cover default GPU pipeline scheduling for R.power/elementwise kernels#19923cchung100m wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds unit tests to verify that the default CUDA pipeline correctly schedules and thread-binds an elementwise R.power kernel, preventing memory verification failures during compilation. The review feedback identifies two critical issues in the newly added tests: a syntax error on line 199 where the assignment operator = is missing (mod seq(PowerModule)), and a NameError on line 202 due to using an undefined tir name instead of tvm.tirx.PrimFunc.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
25581b9 to
b102e9a
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds tests to verify that the default CUDA pipeline correctly schedules and thread-binds an elementwise R.power kernel with a scalar constant operand, preventing VerifyMemory build failures. Feedback was provided to make the test assertion more robust by filtering for the specific "power" PrimFunc, avoiding potential failures if future legalization passes introduce host-side helper functions without thread bindings.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
tlopex
left a comment
There was a problem hiding this comment.
The new device-free test currently uses the legacy CLI target string form, which has been removed by #18785. On current main, this test fails while constructing the target:
ValueError: CLI target string form is no longer supported
Please use:
target = tvm.target.Target({"kind": "cuda", "arch": "sm_86"})After making this change locally, the full test_pipeline.py passes.
One additional concern is that the device-free test directly invokes legalize_passes(target), while #19384 fixed the routing in tvm.compile that selects the target-specific default pipeline. Therefore this test would still pass if that routing regressed; only the GPU E2E test currently covers it. It would be better for the device-free test to exercise or verify the default pipeline selection path directly.
Hi Commiters,
PR #19384 fixed routing in
vm_build.py:249-265but no regression test was added. This PR adds regression coverage for GPU scheduling of legalized elementwise ops for issue #19548.Closes the test coverage gap: