junrushao commented on code in PR #13079:
URL: https://github.com/apache/tvm/pull/13079#discussion_r1002755833
##########
CMakeLists.txt:
##########
@@ -751,7 +781,8 @@ install(
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
# More target definitions
-if(MSVC)
+if(MSVC OR IS_MINGW)
+ #if(MSVC)
Review Comment:
remove this line?
##########
src/relay/op/vm/vm.cc:
##########
@@ -107,7 +107,7 @@ TVM_REGISTER_GLOBAL("relay.op.vm.invoke_tvm_op")
.set_body_typed([](Expr func, Expr inputs, Expr outputs, DictAttrs attrs) {
return InvokeTVMOp(std::move(func), std::move(inputs),
std::move(outputs), std::move(attrs));
});
-
+TVM_REGISTER_NODE_TYPE(DictAttrsNode);
Review Comment:
Let's add a comment elaborating the reason why we are doing extra
registration
##########
CMakeLists.txt:
##########
@@ -1,6 +1,26 @@
cmake_minimum_required(VERSION 3.18)
project(tvm C CXX)
+if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+ set(IS_WINDOWS 1)
+ message(STATUS "host is windows")
+ if (CMAKE_COMPILER_IS_GNUCC)
+ set(IS_MINGW 1)
+ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
+ add_definitions("-D_DEBUG")
+ endif ()
+ endif ()
+else()
+ set(IS_LINUX 1)
+ if ("${CMAKE_BUILD_TYPE}" MATCHES "Debug")
+ add_definitions("-D_DEBUG")
+ endif ()
+ add_definitions("-Dlinux")
+ message(STATUS "host is LINUX")
+endif ()
+
Review Comment:
Quick question: what are the following flags used for:
* `-D_DEBUG`
* `-Dlinux`
##########
src/relay/op/annotation/annotation.cc:
##########
@@ -201,5 +201,7 @@
TVM_REGISTER_GLOBAL("relay.op.annotation._make.compiler_end")
return Call(op, {expr}, Attrs(attrs), {});
});
+TVM_DLL extern const Op stop_fusion_op = Op::Get("annotation.stop_fusion");
Review Comment:
Quick question: why are we using external linkage while having an initial
value?
--
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]