areusch commented on code in PR #70:
URL: https://github.com/apache/tvm-rfcs/pull/70#discussion_r894073558


##########
rfcs/0070-introducing-decl-buffer.md:
##########
@@ -136,11 +138,26 @@ def elemwise(A: T.Buffer[(16, 16), "float32"], C: 
T.Buffer[(16, 16), "float32"])
         C_flattened[i * 16 + j] = A[i * 16 + j]
 ```
 
+Specifically, the updated flow of buffer flattening using `DeclBuffer` will be:
+1. Before `FlattenBuffer/StorageFlatten`: Buffers are declared in the 
`buffer_map`, and are not flattened. Buffer access is done using N-d 
unflattened indices.
+2. After `FlattenBuffer/StorageFlatten`, but before `MakePackedAPI`: Buffers 
are declared in the `buffer_map`, and are not flattened. Buffer access is done 
through a buffer alias explicitly created via `DeclBuffer`, where the alias 
shares the same data pointer, but has a flattened shape and is accessed with 
flattened indices.

Review Comment:
   oh sorry, i see now. the text is very clear i just misread 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to