samskalicky commented on a change in pull request #17270: Dynamic custom
operator GPU support
URL: https://github.com/apache/incubator-mxnet/pull/17270#discussion_r371920345
##########
File path: CMakeLists.txt
##########
@@ -752,6 +741,32 @@ elseif(MSVC)
endif()
+add_library(customop_lib SHARED
${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/gemm_lib.cc)
+add_library(subgraph_lib SHARED
${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_subgraph/subgraph_lib.cc)
+target_include_directories(customop_lib PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet)
+target_include_directories(subgraph_lib PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet)
+if (USE_CUDA)
+ add_library(customop_gpu_lib SHARED
${CMAKE_CURRENT_SOURCE_DIR}/example/extensions/lib_custom_op/relu_lib.cu)
+ target_include_directories(customop_gpu_lib PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include/mxnet)
+endif()
+if(UNIX)
+ target_compile_options(customop_lib PUBLIC -shared)
+ target_compile_options(subgraph_lib PUBLIC -shared)
+ if (USE_CUDA)
+ target_compile_options(customop_gpu_lib PUBLIC -shared)
+ endif()
+elseif(MSVC)
+ target_compile_options(customop_lib PUBLIC /LD)
+ target_compile_options(subgraph_lib PUBLIC /LD)
+ set_target_properties(customop_lib PROPERTIES PREFIX "lib")
+ set_target_properties(subgraph_lib PROPERTIES PREFIX "lib")
+ if (USE_CUDA)
+ set(CMAKE_VERBOSE_MAKEFILE ON)
Review comment:
can we remove this now that windows builds are working?
----------------------------------------------------------------
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]
With regards,
Apache Git Services