echuraev commented on code in PR #16854:
URL: https://github.com/apache/tvm/pull/16854#discussion_r1556415763
##########
tests/python/target/test_target_target.py:
##########
@@ -547,5 +547,17 @@ def test_target_from_device_rocm(input_device):
)
[email protected]_opencl
[email protected]("input_device", ["opencl", tvm.opencl()])
+def test_target_from_device_rocm(input_device):
Review Comment:
```suggestion
def test_target_from_device_opencl(input_device):
```
##########
python/tvm/target/detect_target.py:
##########
@@ -58,6 +58,17 @@ def _detect_rocm(dev: Device) -> Target:
)
+def _detect_opencl(dev: Device) -> Target:
+ return Target(
+ {
+ "kind": "opencl",
+ "max_shared_memory_per_block": dev.max_shared_memory_per_block,
+ "max_threads_per_block": dev.max_threads_per_block,
+ "thread_warp_size": dev.warp_size,
Review Comment:
What about other attributes which are specified in `target_kind.cc`?
##########
python/tvm/target/detect_target.py:
##########
@@ -58,6 +58,17 @@ def _detect_rocm(dev: Device) -> Target:
)
+def _detect_opencl(dev: Device) -> Target:
+ return Target(
+ {
+ "kind": "opencl",
Review Comment:
In some cases, we can initialize OpenCL target with specifying specific
device, e.g.:
```
target = Target("opencl -device=mali", host="llvm
-mtriple=aarch64-linux-gnu")
or
target = Target("opencl -device=adreno", host="llvm
-mtriple=arm64-linux-android")
```
Can we handle these cases somehow?
--
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]