Skip to content

Commit

Permalink
[Releay] Fix on_device call for explicit virtual_device (#12088)
Browse files Browse the repository at this point in the history
  • Loading branch information
elvin-n authored Jul 14, 2022
1 parent 484f602 commit 2fee86e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/tvm/relay/op/annotation/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def _make_virtual_device(device):
return target.VirtualDevice(device)
if isinstance(device, str):
return target.VirtualDevice(_nd.device(device))
if isinstance(device, target.VirtualDevice):
return device
raise ValueError("expecting a Device or device name, but received a %s" % (type(device)))


Expand Down

0 comments on commit 2fee86e

Please sign in to comment.