ashutosh-arm opened a new issue, #16301: URL: https://github.com/apache/tvm/issues/16301
#### Context At present, CMSIS-NN pass `extract_constant()` kicks out tensor constants into the main() function. This was needed as TIR didn't support buffer allocation for constants. With the new AllocateConst API in TIR, tensor constants can reside in the composite functions and can still be translated into TIR. #### Desired changes 1. Example of AllocateConsts usage: https://github.com/apache/tvm/blob/506eff23b034cfd88dda44cf5040ab8b40683155/src/relay/backend/contrib/cmsisnn/relay_to_tir.cc#L125 2. Remove the pass `extract_constants()` https://github.com/apache/tvm/blob/506eff23b034cfd88dda44cf5040ab8b40683155/src/relay/backend/contrib/cmsisnn/extract_constants.cc#L241 3. When the pass is removed, RelayToTIR would require changes to generate AllocateConsts corresponding to the constants existing within the partitioned function. Pre-requisite is to identify the constants within the emitted operator. 4. Remove following set of tests: https://github.com/apache/tvm/blob/main/tests/python/contrib/test_cmsisnn/test_extract_constants.py ### Environment TVM 0.14.0 ### Steps to reproduce Any test from https://github.com/apache/tvm/blob/506eff23b034cfd88dda44cf5040ab8b40683155/tests/python/contrib/test_cmsisnn/test_conv2d.py#L241 -- 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]
