ashutosh-arm commented on code in PR #15407:
URL: https://github.com/apache/tvm/pull/15407#discussion_r1284453796
##########
src/relay/backend/contrib/cmsisnn/relay_to_tir.cc:
##########
@@ -89,11 +90,20 @@ class RelayToTIRVisitor : public MixedModeMutator {
private:
inline IntImm ToArg(int32_t value) { return IntImm(DataType::Int(32),
value); }
+ // struct used to allocated const NDArray
+ struct user_const {
+ tir::Var buffer_var;
+ int num_bits;
+ Array<PrimExpr> extents;
+ tvm::runtime::NDArray ndarray;
+ };
+
void CreatePrimFuncForExtern(const GlobalVar& global_var, Array<tir::Var>
func_signature,
const Map<tir::Var, tir::Buffer>& buffer_map,
tvm::Array<PrimExpr> call_extern_args,
PrimExpr context_buffer_var = PrimExpr(),
- int context_buffer_size = 0, int num_bits = 8) {
+ int context_buffer_size = 0, int num_bits = 8,
+ std::vector<user_const>
context_const_buffer_vars = {}) {
Review Comment:
That's a great suggestion @lhutton1. Can we take that up as a separate
follow up activity as touching `BufferCreator` requires changes in the whole
file for most of the ops?
--
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]