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 2021/01/19 00:33:16 UTC

[GitHub] [tvm] Hzfengsy commented on a change in pull request #7306: [TIR][REFACTOR] ForNode introduce thread binding and remove legacy field

Hzfengsy commented on a change in pull request #7306:
URL: https://github.com/apache/tvm/pull/7306#discussion_r559847680



##########
File path: python/tvm/tir/ir_builder.py
##########
@@ -249,17 +249,17 @@ def for_range(self, begin, end, name="i", dtype="int32", for_type="serial"):
         extent = end if begin == 0 else (end - begin)
 
         def _exit_cb():
-            if for_type == "serial":
-                for_type_id = 0
-            elif for_type == "parallel":
-                for_type_id = 1
-            elif for_type == "vectorize":
-                for_type_id = 2
-            elif for_type == "unroll":
-                for_type_id = 3
+            if kind == "serial":
+                kind_id = 0
+            elif kind == "parallel":
+                kind_id = 1
+            elif kind == "vectorize":
+                kind_id = 2
+            elif kind == "unroll":
+                kind_id = 3

Review comment:
       Shall we add thread_binding here?




----------------------------------------------------------------
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.

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