csullivan commented on code in PR #11878:
URL: https://github.com/apache/tvm/pull/11878#discussion_r935780618


##########
src/relay/transforms/annotate_texture_storage.cc:
##########
@@ -175,8 +173,26 @@ class StorageInfo : private 
transform::DeviceAwareExprVisitor {
     }
   }
 
+  /**
+   * Defines the name of the memory scope which can fit the tensor of required 
shape
+   *
+   * The scope stands for "global" if tensor does not satisfy current 
flattening rules for textures
+   * (texture currently has to be 5d tensors with value eq 4 in the last 
dimension)
+   *
+   * The packing layout inside the texture scope (the part after the dash) is 
defined
+   * during the shape itself. Hardware can have limitations on the texture 
spatial dimensions
+   * we must not exceed these sizes. In addition to the fitting of h/w 
limitation we want to
+   * get balanced packing where final spatial sizes of textures will not be 
too different
+   * @param shape shape to be analyzed
+   * @param vd VirtualDevice for the tensors determined of memory scope
+   * @return string representing memory scope either "global" or 
"global.texture-layout"
+   */
   std::string Scope(Array<PrimExpr> shape, const VirtualDevice& vd) {
-    if (vd != VirtualDevice::FullyUnconstrained()) {
+    // currently we support only textures been made from 5d tensors

Review Comment:
   TODO(@csullivan, @elvin-n): Support more layouts with Buffer.axis_separators 
lowering. 



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