masahi commented on a change in pull request #8366:
URL: https://github.com/apache/tvm/pull/8366#discussion_r664942125



##########
File path: src/tir/ir/buffer.cc
##########
@@ -45,12 +45,27 @@ Array<PrimExpr> SimplifyArray(arith::Analyzer* ana, 
Array<PrimExpr> array) {
   return array;
 }
 
-Buffer decl_buffer(Array<PrimExpr> shape, DataType dtype, String name, Span 
span) {
+Buffer decl_buffer(Array<PrimExpr> shape, DataType dtype, String name, String 
storage_scope,
+                   Span span) {
   DataType storage_dtype = (dtype == DataType::Bool() ? DataType::Int(8) : 
dtype);
-  return Buffer(Var(name, PointerType(PrimType(storage_dtype)), span), dtype, 
shape,
+  return Buffer(Var(name, PointerType(PrimType(storage_dtype), storage_scope), 
span), dtype, shape,
                 Array<PrimExpr>(), PrimExpr(), name, "", 0, 0, kDefault, span);
 }
 
+String GetStorageScope(Var buffer_var) {

Review comment:
       Since this function is used a lot in `src/tir/transforms` and 
`src/tir/target`, I moved it to `src/tir/transforms/ir_utils.h`.




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


Reply via email to