hlu1 commented on a change in pull request #5622:
URL: https://github.com/apache/incubator-tvm/pull/5622#discussion_r427667695
##########
File path: src/runtime/object.cc
##########
@@ -24,6 +24,7 @@
#include <tvm/runtime/object.h>
#include <tvm/runtime/registry.h>
+#include <iostream>
Review comment:
This is to fix another compilation error with clang:
```
stderr: tvm/tvm/src/runtime/object.cc:171:14: error: missing '#include
<iostream>'; declaration of 'cerr' must be imported from module
'third_party_libgcc_std.iostream' before it is required
std::cerr << '[' << info.index << "] " << info.name
^
third-party-buck/platform007/build/libgcc/include/c++/7.3.0/iostream:62:18:
note: previous declaration is here
extern ostream cerr; /// Linked to standard error (unbuffered)
^
1 error generated.
When running <c++ preprocess_and_compile>.
When building rule
//tvm:tvm#compile-pic-object.cc.od8dbd3a8,platform007-clang.
```
Should I split it into another PR instead?
##########
File path: src/relay/transforms/pass_util.h
##########
@@ -115,6 +115,20 @@ inline bool IsAtomic(const Expr& e) {
return e.as<VarNode>() || e.as<OpNode>() || e.as<ConstructorNode>() ||
e.as<GlobalVarNode>();
}
+/*!
+ * \brief Cache the compiler_begin annotation op to reduce registry lookup
overhead
+ * \param void
+ * \return compiler_begin op
+ */
+const Op& compiler_begin_op();
Review comment:
Yes
##########
File path: src/relay/analysis/util.cc
##########
@@ -454,5 +454,15 @@ bool IsDataDependant(const CallNode* call) {
return tshape_data_dependant[op];
}
+
+const Op& compiler_begin_op() {
Review comment:
Got it
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]