yongwww commented on code in PR #15447: URL: https://github.com/apache/tvm/pull/15447#discussion_r1287443974
########## src/relay/backend/contrib/cmsisnn/target.cc: ########## @@ -31,13 +31,14 @@ namespace contrib { namespace cmsisnn { tvm::transform::Pass RelayToTIR(); +using FTVMTIRToRuntime = runtime::TypedPackedFunc<runtime::Module(IRModule, Target)>; runtime::Module TIRToRuntime(IRModule mod, Target target); TVM_REGISTER_TARGET_KIND("cmsis-nn", kDLCPU) .add_attr_option<Array<String>>("mattr") .add_attr_option<String>("mcpu") .add_attr_option<Bool>("debug_last_error") - .set_attr<FTVMRelayToTIR>(tvm::attr::kRelayToTIR, RelayToTIR()) + .set_attr<tvm::transform::Pass>(tvm::attr::kRelayToTIR, RelayToTIR()) Review Comment: I am planning to submit my update for the Target to the main branch. In the current Target implementation, there is a dependency on IRModule : `target.h -> target_kind.h - > transform.h - > module.h`. In this pr, we introduced Target as a member of VDevice, and VDevice could be part of the global_infos of IRModule, leading to the dependency `module.h->target.h`", resulting in circular dependencies. My changes are trying to resolve this issue by removing the dependency of IRModule on Target. -- 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: commits-unsubscr...@tvm.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org