echuraev commented on code in PR #13563:
URL: https://github.com/apache/tvm/pull/13563#discussion_r1041252891


##########
src/relay/transforms/annotate_texture_storage.cc:
##########
@@ -205,13 +225,14 @@ class StorageInfo : private 
transform::DeviceAwareExprVisitor {
         }
       }
     }
-
     if (!primitive_supports_texture_) {
+      expr_attrib = call->attrs;
       primitive_supports_texture_ = SupportsTextureStorage(call);
     }
 
     for (auto& arg : call->args) {
-      Visit(arg);
+      if (std::find(buffers_args.begin(), buffers_args.end(), arg) == 
buffers_args.end())

Review Comment:
   nit: Probably we can change type of `buffers_args` to `unordered_set`? In 
this case, the search should be faster.
   
   The same comment for `buffers_params`.



##########
src/relay/transforms/annotate_texture_storage.cc:
##########
@@ -177,6 +186,17 @@ class StorageInfo : private 
transform::DeviceAwareExprVisitor {
             // adding info about arguments if they can be converted to texture
             for (const auto& ttype : 
FlattenTupleType(fn->params[i]->checked_type())) {
               std::string scope = Scope(ttype->shape, 
GetVirtualDevice(GetRef<Expr>(call)));
+              if (expr_attrib.as<Conv2DAttrs>() || 
expr_attrib.as<Conv2DWinogradAttrs>()) 
+              {
+                if ((i == 1) &&

Review Comment:
   nit: Create local variable, e.g.:  `const int weights_pos = 1;`. 



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