manupa-arm commented on a change in pull request #10549:
URL: https://github.com/apache/tvm/pull/10549#discussion_r833073429
##########
File path: src/target/source/codegen_c_host.cc
##########
@@ -358,8 +370,18 @@ runtime::Module BuildCHost(IRModule mod, Target target) {
using tvm::runtime::Registry;
bool output_ssa = false;
bool emit_asserts = false;
+
+ std::set<std::string> devices;
Review comment:
nit : unordered_set is preferred due to constant time .find()
##########
File path: src/target/source/codegen_c_host.cc
##########
@@ -43,14 +44,25 @@ namespace codegen {
CodeGenCHost::CodeGenCHost() { module_name_ =
GetUniqueName("__tvm_module_ctx"); }
-void CodeGenCHost::Init(bool output_ssa, bool emit_asserts, std::string
target_str) {
+void CodeGenCHost::Init(bool output_ssa, bool emit_asserts, std::string
target_str,
+ const std::set<std::string>& devices) {
emit_asserts_ = emit_asserts;
declared_globals_.clear();
decl_stream << "// tvm target: " << target_str << "\n";
decl_stream << "#define TVM_EXPORTS\n";
decl_stream << "#include \"tvm/runtime/c_runtime_api.h\"\n";
decl_stream << "#include \"tvm/runtime/c_backend_api.h\"\n";
decl_stream << "#include <math.h>\n";
+ if (devices.find("ethos-u") != devices.end()) {
Review comment:
nit : unordered_set is preferred due to constant time .find()
--
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]