tkonolige commented on a change in pull request #6331:
URL: https://github.com/apache/incubator-tvm/pull/6331#discussion_r475884123
##########
File path: python/tvm/testing.py
##########
@@ -285,4 +288,105 @@ def _check_forward(constraints1, constraints2, varmap,
backvarmap):
constraints_trans.dst_to_src, constraints_trans.src_to_dst)
+def gpu(f):
+ """Mark to differentiate tests that use the GPU is some capacity. These
+ tests will be run on CPU-only nodes and on nodes with GPUS.
+
+ To mark a test that must have a GPU present to run, use `@requires_gpu`.
+ """
+ return pytest.mark.gpu(f)
+
+
+def requires_gpu(f):
Review comment:
I don't think this is possible with pytest. We don't want to have to run
every test to see if they require a gpu or not.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]