From commits-return-113460-archive-asf-public=cust-asf.ponee.io@mxnet.incubator.apache.org Wed Jan 29 20:02:10 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 80275180643 for ; Wed, 29 Jan 2020 21:02:10 +0100 (CET) Received: (qmail 56099 invoked by uid 500); 29 Jan 2020 20:02:09 -0000 Mailing-List: contact commits-help@mxnet.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mxnet.incubator.apache.org Delivered-To: mailing list commits@mxnet.incubator.apache.org Received: (qmail 56090 invoked by uid 99); 29 Jan 2020 20:02:09 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Jan 2020 20:02:09 +0000 From: GitBox To: commits@mxnet.apache.org Subject: [GitHub] [incubator-mxnet] ptrendx commented on a change in pull request #17270: Dynamic custom operator GPU support Message-ID: <158032812977.32140.4213497596968002259.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Wed, 29 Jan 2020 20:02:09 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit ptrendx commented on a change in pull request #17270: Dynamic custom operator GPU support URL: https://github.com/apache/incubator-mxnet/pull/17270#discussion_r372601707 ########## File path: Makefile ########## @@ -664,11 +664,19 @@ cpplint: pylint: python3 -m pylint --rcfile=$(ROOTDIR)/ci/other/pylintrc --ignore-patterns=".*\.so$$,.*\.dll$$,.*\.dylib$$" python/mxnet -# sample lib for MXNet extension dynamically loading custom operator -sample_lib: - $(CXX) -shared -fPIC -std=c++11 example/extensions/lib_custom_op/gemm_lib.cc -o libsample_lib.so -I include/mxnet +# MXNet extension dynamically loading libraries +EXT_LIBS = custom_op_lib subgraph_lib +ifeq ($(USE_CUDA), 1) + EXT_LIBS += custom_op_gpu_lib +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 Review comment: Why don't you use the NVCCFLAGS and CUDA_ARCH flags here? ---------------------------------------------------------------- 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: users@infra.apache.org With regards, Apache Git Services