TaoLv commented on a change in pull request #17516: Fix custom op makefile and 
example test
URL: https://github.com/apache/incubator-mxnet/pull/17516#discussion_r375604193
 
 

 ##########
 File path: Makefile
 ##########
 @@ -666,18 +666,21 @@ pylint:
        python3 -m pylint --rcfile=$(ROOTDIR)/ci/other/pylintrc 
--ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" python/mxnet
 
 # MXNet extension dynamically loading libraries
-EXT_LIBS = custom_op_lib subgraph_lib
+EXT_LIBS = build/libcustomop_lib.so build/libsubgraph_lib.so
 ifeq ($(USE_CUDA), 1)
-       EXT_LIBS += custom_op_gpu_lib
+        EXT_LIBS += build/libcustomop_gpu_lib.so
 endif
 extension_libs: $(EXT_LIBS)
 
-custom_op_lib:
-       $(CXX) -shared -fPIC -std=c++11 
example/extensions/lib_custom_op/gemm_lib.cc -o build/libcustomop_lib.so -I 
include/mxnet
-custom_op_gpu_lib:
-       $(NVCC) -shared -std=c++11 -Xcompiler -fPIC 
example/extensions/lib_custom_op/relu_lib.cu -o build/libcustomop_gpu_lib.so -I 
include/mxnet
-subgraph_lib:
-       $(CXX) -shared -fPIC -std=c++11 
example/extensions/lib_subgraph/subgraph_lib.cc -o build/libsubgraph_lib.so -I 
include/mxnet
+build/libcustomop_lib.so:
 
 Review comment:
   With a clean master branch:
   ```bash
   [lvtao@mlt2-clx092 mxnet-temp]$ make custom_op_lib
   Makefile:229: "USE_LAPACK disabled because libraries were not found"
   Makefile:357: WARNING: Significant performance increases can be achieved by 
installing and enabling gperftools or jemalloc development packages
   g++ -shared -fPIC -std=c++11 example/extensions/lib_custom_op/gemm_lib.cc -o 
build/libcustomop_lib.so -I include/mxnet
   /usr/bin/ld: cannot open output file build/libcustomop_lib.so: No such file 
or directory
   collect2: error: ld returned 1 exit status
   make: *** [custom_op_lib] Error 1
   ```
   
   I think this problem can be fixed by this PR, but I'm wondering why it's not 
caught by CI.

----------------------------------------------------------------
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

Reply via email to