-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-14838
-
MCU_NNC_2.1.0
-
MCU_NNC_2.1.1
-
default
TI MCU NNC applies padding optimizations to certain operators (qnn.conv2d, nn.maxpool2d) with NHWC data layout so that these operators can be effectively mapped to TI NPU or TI M33 CDE.
A bug happens when an attribute, "dtype", was accessed on operators that have multiple output and do not have "dtype" attribute. The fix is to only check nodes that do have "dtype" attribute. The bug exists in ti_mcu_nnc 2.1.0.LTS release, and will be fixed in 2.1.1.LTS patch release.
Typical behavior of the bug
The ti_mcu_nnc compiler will emit the following errors:
File "/home/a0323918/tvm-tinie/neo-tvm/python/tvm/relay/backend/contrib/tinie/prepare.py", line 672, in visit_call
if call.checked_type.dtype in ["int8", "uint8"]:
File "/home/a0323918/tvm-tinie/neo-tvm/python/tvm/runtime/object.py", line 75, in __getattr__
raise AttributeError(f"{type(self)} has no attribute {name}") from None
AttributeError: <class 'tvm.ir.type.TupleType'> has no attribute dtype
Typical use cases that could trigger this bug
When a user compiles a model for TI-NPU or M33 CDE and the model contains nodes (e.g. batch_norm, split) that produce multiple outputs.