From ce97e5b13e58656a357f74333cc151aa63091b84 Mon Sep 17 00:00:00 2001 From: Anastasia Stulova Date: Mon, 28 Jun 2021 15:39:35 +0100 Subject: [PATCH] [TVMC] Add vulkan to targets of tvmc run. This allows to run compiled models via Vulkan. --- python/tvm/driver/tvmc/runner.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/tvm/driver/tvmc/runner.py b/python/tvm/driver/tvmc/runner.py index fec8224ceb17..916139874579 100644 --- a/python/tvm/driver/tvmc/runner.py +++ b/python/tvm/driver/tvmc/runner.py @@ -50,7 +50,7 @@ def add_run_parser(subparsers): # like 'webgpu', etc (@leandron) parser.add_argument( "--device", - choices=["cpu", "cuda", "cl", "metal"], + choices=["cpu", "cuda", "cl", "metal", "vulkan"], default="cpu", help="target device to run the compiled module. Defaults to 'cpu'", ) @@ -392,6 +392,8 @@ def run_module( dev = session.cl() elif device == "metal": dev = session.metal() + elif device == "vulkan": + dev = session.vulkan() else: assert device == "cpu" dev = session.cpu()