junrushao commented on code in PR #15714:
URL: https://github.com/apache/tvm/pull/15714#discussion_r1323595717
##########
python/tvm/target/target.py:
##########
@@ -148,6 +150,45 @@ def export(self):
def with_host(self, host=None):
return _ffi_api.WithHost(self, Target(host))
+ @staticmethod
+ def from_device(device: Union[str, Device]) -> "Target":
+ """Detects Target associated with the given device. If the device does
not exist,
+ there will be an Error.
+
+ Parameters
+ ----------
+ dev : Union[str, Device]
+ The device to detect the target for.
+ Supported device types: ["cuda", "metal", "rocm", "vulkan",
"opencl", "cpu"]
Review Comment:
```suggestion
Supported device types: ["cuda", "metal", "rocm", "vulkan"]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]