You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by zh...@apache.org on 2021/02/01 07:13:08 UTC
[tvm] branch main updated: fix duplicated symbol bug in external
codegen (#7383)
This is an automated email from the ASF dual-hosted git repository.
zhic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 2365c7e fix duplicated symbol bug in external codegen (#7383)
2365c7e is described below
commit 2365c7ee6620f672c172247afc73da3884165884
Author: yhj050806 <33...@users.noreply.github.com>
AuthorDate: Mon Feb 1 15:12:48 2021 +0800
fix duplicated symbol bug in external codegen (#7383)
Co-authored-by: 袁航剑 <yu...@bytedance.com>
---
src/relay/backend/compile_engine.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/relay/backend/compile_engine.cc b/src/relay/backend/compile_engine.cc
index a66ae0a..ed09e4f 100644
--- a/src/relay/backend/compile_engine.cc
+++ b/src/relay/backend/compile_engine.cc
@@ -651,10 +651,10 @@ class CompileEngineImpl : public CompileEngineNode {
<< AsText(src_func, false);
std::string sn = symbol_name.value();
- if (cached_symbol.count(sn)) {
+ if (!cached_symbol.count(sn)) {
cached_symbol[sn] = code_gen_name;
} else {
- ICHECK_NE(sn, code_gen_name)
+ ICHECK_NE(cached_symbol[sn], code_gen_name)
<< "Found duplicated symbol: " << sn << " for: " << code_gen_name;
}