ashutosh-arm opened a new issue, #16297: URL: https://github.com/apache/tvm/issues/16297
### Context The relay pass scalar_to_tensor_constant() replaces scalar arguments with tensor type. This is done to meet the requirements of the CMSIS-NN backend. Presently, it requires complicated checks to identify types of the callee and the caller arguments of the partitioned function as part of the pass. This happens to be the case due to the inherent structure of the partitioned function that is generated due to the following pattern matching. ### Desired changes 1. Pattern matching: In place of `wildcard()`, use `is_constant()` in the pattern matching of binary ops. https://github.com/apache/tvm/blob/506eff23b034cfd88dda44cf5040ab8b40683155/python/tvm/relay/op/contrib/cmsisnn.py#L331 2. CMSIS-NN pass: https://github.com/apache/tvm/blob/506eff23b034cfd88dda44cf5040ab8b40683155/src/relay/backend/contrib/cmsisnn/scalar_to_tensor_constant.cc#L218 #### Reference Ethos-N pattern matching for binary ops: https://github.com/apache/tvm/blob/506eff23b034cfd88dda44cf5040ab8b40683155/python/tvm/relay/op/contrib/ethosn.py#L227 ### Environment TVM 0.14.0 ### Steps to reproduce Any test from https://github.com/apache/tvm/blob/main/tests/python/contrib/test_cmsisnn/test_binary_ops.py -- 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]
