Skip to content

Commit

Permalink
[TVMC] Add vulkan to targets of tvmc run. (apache#8359)
Browse files Browse the repository at this point in the history
This allows to run compiled models via Vulkan.
  • Loading branch information
AnastasiaStulova authored and ylc committed Sep 29, 2021
1 parent 950d6fe commit e06a3c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/tvm/driver/tvmc/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit e06a3c5

Please sign in to comment.