mirror of
https://github.com/nod-ai/SHARK-Studio.git
synced 2026-01-10 06:17:55 -05:00
* Use IREE tf tools to save .mlir modules when generating shark_tank. * Add option to pytest for enabling auto-updates to local shark tank. * xfail mobilenet torch on cpu, cuda and fix CI macos setup * Update test-models.yml to disable macos vulkan CI.
63 lines
2.0 KiB
Python
63 lines
2.0 KiB
Python
def pytest_addoption(parser):
|
|
# Attaches SHARK command-line arguments to the pytest machinery.
|
|
parser.addoption(
|
|
"--benchmark",
|
|
action="store_true",
|
|
default="False",
|
|
help="Pass option to benchmark and write results.csv",
|
|
)
|
|
parser.addoption(
|
|
"--onnx_bench",
|
|
action="store_true",
|
|
default="False",
|
|
help="Add ONNX benchmark results to pytest benchmarks.",
|
|
)
|
|
parser.addoption(
|
|
"--tf32",
|
|
action="store_true",
|
|
default="False",
|
|
help="Use TensorFloat-32 calculations.",
|
|
)
|
|
parser.addoption(
|
|
"--save_repro",
|
|
action="store_true",
|
|
default="False",
|
|
help="Pass option to save reproduction artifacts to SHARK/shark_tmp/test_case/",
|
|
)
|
|
parser.addoption(
|
|
"--save_fails",
|
|
action="store_true",
|
|
default="False",
|
|
help="Save reproduction artifacts for a test case only if it fails. Default is False.",
|
|
)
|
|
parser.addoption(
|
|
"--ci",
|
|
action="store_true",
|
|
default="False",
|
|
help="Enables uploading of reproduction artifacts upon test case failure during iree-compile or validation. Must be passed with --ci_sha option ",
|
|
)
|
|
parser.addoption(
|
|
"--update_tank",
|
|
action="store_true",
|
|
default="False",
|
|
help="Update local shark tank with latest artifacts.",
|
|
)
|
|
parser.addoption(
|
|
"--ci_sha",
|
|
action="store",
|
|
default="None",
|
|
help="Passes the github SHA of the CI workflow to include in google storage directory for reproduction artifacts.",
|
|
)
|
|
parser.addoption(
|
|
"--local_tank_cache",
|
|
action="store",
|
|
default="",
|
|
help="Specify the directory in which all downloaded shark_tank artifacts will be cached.",
|
|
)
|
|
parser.addoption(
|
|
"--tank_url",
|
|
type=str,
|
|
default="gs://shark_tank/latest",
|
|
help="URL to bucket from which to download SHARK tank artifacts. Default is gs://shark_tank/latest",
|
|
)
|