gemini-code-assist[bot] commented on code in PR #18786:
URL: https://github.com/apache/tvm/pull/18786#discussion_r2813023056


##########
src/runtime/contrib/json/json_node.h:
##########
@@ -149,8 +149,15 @@ class JSONGraphNode {
         attrs_.Set(key, kv.second);
       }
     }
-    if (HasAttr("shape") && HasAttr("dtype")) {
-      ICHECK_EQ(GetOpShape().size(), GetOpDataType().size());
+    // Populate cached shape/dtype from attrs for fast access

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   The comment "Populate cached shape/dtype from attrs for fast access" is now 
redundant as the previous `if` condition for `HasAttr("shape") && 
HasAttr("dtype")` has been split into two separate `if` blocks, each handling 
one attribute. This makes the caching logic more explicit for each attribute.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to