lhutton1 commented on code in PR #15407:
URL: https://github.com/apache/tvm/pull/15407#discussion_r1284669267
##########
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:
Agreed, this seems out of scope for this PR!
--
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]