You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/11/19 08:12:42 UTC

[GitHub] [tvm] junrushao commented on a diff in pull request #13441: [Meta Schedule] Patch ICHECK for `target_has_vnni` to avoid seg fault

junrushao commented on code in PR #13441:
URL: https://github.com/apache/tvm/pull/13441#discussion_r1027054264


##########
src/meta_schedule/space_generator/space_generator.cc:
##########
@@ -25,7 +25,8 @@ String GetRuleKindFromTarget(const Target& target) {
   if (target->kind->name == "llvm") {
     static const PackedFunc* f_check_vnni =
         runtime::Registry::Get("tvm.topi.x86.utils.target_has_vnni");
-    ICHECK(*f_check_vnni != nullptr) << "The `target_has_vnni` func is not in tvm registry.";
+    ICHECK(f_check_vnni != nullptr && *f_check_vnni != nullptr)
+        << "The `target_has_vnni` func is not in tvm registry.";

Review Comment:
   ```suggestion
       ICHECK(f_check_vnni != nullptr) << "The `target_has_vnni` func is not in tvm registry.";
   ```



##########
tests/python/unittest/test_meta_schedule_space_cpu_winograd.py:
##########
@@ -164,5 +166,106 @@ def cpu_nhwc_0(X: T.Buffer[(1, 14, 14, 128), "float32"], W: T.Buffer[(6, 6, 128,
     )
 
 
+def test_cpu_target_has_vnni():

Review Comment:
   This unittest is not relevant to the crash. Please remove it.



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org