junrushao commented on code in PR #16362:
URL: https://github.com/apache/tvm/pull/16362#discussion_r1444081984
##########
src/relax/transform/static_plan_block_memory.cc:
##########
@@ -336,6 +336,13 @@ class StorageAllocatorInit : public
StorageAllocatorBaseVisitor {
// appear in the **function signature**.
Map<String, IntImm> var_upper_bound_attr =
func->GetAttr<Map<String,
IntImm>>("tir_var_upper_bound").value_or(Map<String, IntImm>());
+ // `GetAttr` does not perform type check.
Review Comment:
“IsInstance”-style type checking, if can be determined in compile time, will
be folded to a constant without actually doing the checking in runtime.
Therefore, to ensure runtime type checking happens, we will need to use a
step-phase downcasting, where the first phase casts an attribute to
Map<ObjectRef, ObjectRef>, and then check the types of each item
--
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]