gemini-code-assist[bot] commented on code in PR #18615:
URL: https://github.com/apache/tvm/pull/18615#discussion_r2648093439


##########
tests/python/relax/test_pipeline.py:
##########
@@ -113,3 +114,37 @@ def main(
 
         cache_np[i, :] = x_np + y_np
         tvm.testing.assert_allclose(kv.numpy(), cache_np[: np_shape[0], :], 
rtol=1e-7, atol=1e-7)
+
+
[email protected]("target_name", ["vulkan", "webgpu"])
[email protected](
+    "pipeline_func",
+    [
+        relax.pipeline.library_dispatch_passes,
+        relax.pipeline.legalize_passes,
+        relax.pipeline.dataflow_lower_passes,
+        relax.pipeline.finalize_passes,
+        relax.pipeline.get_default_pipeline,
+    ],

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   This list of pipeline functions is duplicated in 
`test_non_gpu_target_raises_error` below. To improve maintainability and avoid 
this duplication, consider extracting the list into a module-level constant and 
reusing it in both `pytest.mark.parametrize` decorators.
   
   For example:
   ```python
   PIPELINE_FUNCS_FOR_TESTING = [
       relax.pipeline.library_dispatch_passes,
       relax.pipeline.legalize_passes,
       relax.pipeline.dataflow_lower_passes,
       relax.pipeline.finalize_passes,
       relax.pipeline.get_default_pipeline,
   ]
   
   
   @pytest.mark.parametrize("pipeline_func", PIPELINE_FUNCS_FOR_TESTING)
   # ...
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to