masahi commented on code in PR #12980:
URL: https://github.com/apache/tvm/pull/12980#discussion_r988310496
##########
python/tvm/testing/utils.py:
##########
@@ -981,6 +982,50 @@ def _corstone300_compile_time_check():
requires_vitis_ai = Feature("vitis_ai", "Vitis AI", cmake_flag="USE_VITIS_AI")
+def _arm_dot_supported():
+ arch = platform.machine()
+
+ if arch not in ["arm64", "aarch64"]:
+ return False
+
+ if sys.platform.startswith("darwin"):
+ cpu_info = subprocess.check_output("sysctl -a",
shell=True).strip().decode()
+ for line in cpu_info.split("\n"):
+ if line.startswith("hw.optional.arm.FEAT_DotProd"):
+ return bool(int(line.split(":", 1)[1]))
+ elif sys.platform.startswith("linux"):
+ return True
Review Comment:
I don't have a linux aarch64 at hand, so I cannot add the right check here.
This is ok for our aarch64 CI since it supports `sdot/udot`, but it is broken
for rasp. I tried `return "dot" in open("/proc/cpuinfo", "r").read()` but the
test was skipped in CI.
##########
python/tvm/testing/utils.py:
##########
@@ -981,6 +982,50 @@ def _corstone300_compile_time_check():
requires_vitis_ai = Feature("vitis_ai", "Vitis AI", cmake_flag="USE_VITIS_AI")
+def _arm_dot_supported():
+ arch = platform.machine()
+
+ if arch not in ["arm64", "aarch64"]:
+ return False
+
+ if sys.platform.startswith("darwin"):
+ cpu_info = subprocess.check_output("sysctl -a",
shell=True).strip().decode()
+ for line in cpu_info.split("\n"):
+ if line.startswith("hw.optional.arm.FEAT_DotProd"):
+ return bool(int(line.split(":", 1)[1]))
+ elif sys.platform.startswith("linux"):
+ return True
Review Comment:
I don't have a linux aarch64 at hand, so I cannot add the right check here.
This is ok for our aarch64 CI since it supports `sdot/udot`, but it is broken
for rasp etc. I tried `return "dot" in open("/proc/cpuinfo", "r").read()` but
the test was skipped in CI.
--
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]