Lunderberg commented on code in PR #16741:
URL: https://github.com/apache/tvm/pull/16741#discussion_r1538074865


##########
tests/python/relax/test_codegen_cudnn.py:
##########
@@ -36,12 +36,8 @@ def reset_seed():
 
 has_cudnn = tvm.get_global_func("relax.ext.cudnn", True)
 
-cudnn_enabled = pytest.mark.skipif(
-    not has_cudnn,
-    reason="cuDNN not enabled.",
-)
 
-pytestmark = [cudnn_enabled]
+pytestmark = [*tvm.testing.requires_cudnn.marks()]

Review Comment:
   Nitpick: The `tvm.testing.requires_*` marks can be used as marks directly, 
rather than needing to be explicitly expanded with `foo.marks()`.  In addition, 
the `pytestmark` can be a single marker, rather than a list.  Between these 
two, this can cleaned up as:
   
   ```python
   pytestmark = tvm.testing.requires_cudnn
   ```



##########
tests/python/relax/test_codegen_cudnn.py:
##########
@@ -36,12 +36,8 @@ def reset_seed():
 
 has_cudnn = tvm.get_global_func("relax.ext.cudnn", True)

Review Comment:
   Do we still need `has_cudnn` now that it isn't used in `pytest.mark.skipif`?



-- 
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: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to