Aharrypotter commented on PR #19515: URL: https://github.com/apache/tvm/pull/19515#issuecomment-4390807268
Thanks for the review! Addressing both points: **1. `tvm.runtime.Tensor` vs `tvm.runtime.NDArray`** `tvm.runtime.Tensor` is a valid class in the current TVM Python API — it is defined in `tvm.runtime._tensor.Tensor` and inherits from `tvm_ffi.core.Tensor`. It is not an `AttributeError` risk. ```python >>> import tvm >>> hasattr(tvm.runtime.Tensor) True >>> tvm.runtime.Tensor.__mro__ (<class "tvm.runtime._tensor.Tensor">, <class "tvm_ffi.core.Tensor">, ...) ``` **2. Excluding initializers from `graph_input_names`** The ONNX Backend Test data does not use initializers — all inputs (including weights) are provided as `.pb` files. We verified this across multiple models (`test_batchnorm_epsilon`, `test_conv`, `test_matmul_2d`, `test_add`, `test_gemm`): `model.graph.initializer` is always empty. The current positional mapping logic is correct for this test data format. That said, adding the initializer filter is a good defensive measure for robustness — if the test data format ever changes or a third-party test suite uses initializers, the filter would prevent silent misalignment. Happy to add it if you think it is worth the precaution. -- 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]
