Skip to content

Commit

Permalink
[UnitTests] Moved marker definition out to global variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lunderberg committed Aug 20, 2021
1 parent 1609124 commit d6a8bdc
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions python/tvm/testing/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,22 @@
from tvm.testing import utils


MARKERS = {
"gpu": "mark a test as requiring a gpu",
"tensorcore": "mark a test as requiring a tensorcore",
"cuda": "mark a test as requiring cuda",
"opencl": "mark a test as requiring opencl",
"rocm": "mark a test as requiring rocm",
"vulkan": "mark a test as requiring vulkan",
"metal": "mark a test as requiring metal",
"llvm": "mark a test as requiring llvm",
}


def pytest_configure(config):
"""Runs at pytest configure time, defines marks to be used later."""
markers = {
"gpu": "mark a test as requiring a gpu",
"tensorcore": "mark a test as requiring a tensorcore",
"cuda": "mark a test as requiring cuda",
"opencl": "mark a test as requiring opencl",
"rocm": "mark a test as requiring rocm",
"vulkan": "mark a test as requiring vulkan",
"metal": "mark a test as requiring metal",
"llvm": "mark a test as requiring llvm",
}
for markername, desc in markers.items():

for markername, desc in MARKERS.items():
config.addinivalue_line("markers", "{}: {}".format(markername, desc))

print("enabled targets:", "; ".join(map(lambda x: x[0], utils.enabled_targets())))
Expand Down

0 comments on commit d6a8bdc

Please sign in to comment.