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/05 23:04:19 UTC
[GitHub] [tvm] tqchen commented on a change in pull request #7216: [TIR][REFACTOR] Enforce allocate to use the correct var pointer hint.
tqchen commented on a change in pull request #7216:
URL: https://github.com/apache/tvm/pull/7216#discussion_r552251047
##########
File path: python/tvm/tir/buffer.py
##########
@@ -247,7 +247,9 @@ def decl_buffer(
shape_dtype = shape[0].dtype if hasattr(shape[0], "dtype") else "int32"
elem_offset = Var("%s_elem_offset" % name, shape_dtype)
if data is None:
- data = Var(name, PointerType(PrimType(dtype)), span)
+ # store bool as i8
+ storage_dtype = "int8" if dtype == "bool" else dtype
Review comment:
In the current convention, the bool are stored as int8, so the pointer type of the bool is `i8*`, while bool is represented as `i1` in the IR.
----------------------------------------------------------------
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