代码拉取完成,页面将自动刷新
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
ifeq ($(USE_MKLDNN), 1)
MKLDNN_SUBMODDIR = $(ROOTDIR)/3rdparty/mkldnn
MKLDNN_BUILDDIR = $(MKLDNN_SUBMODDIR)/build
MXNET_LIBDIR = $(ROOTDIR)/lib
MXNET_INCLDIR = $(ROOTDIR)/include
ifeq ($(UNAME_S), Darwin)
OMP_LIBFILE = $(MKLDNNROOT)/lib/libiomp5.dylib
MKLML_LIBFILE = $(MKLDNNROOT)/lib/libmklml.dylib
MKLDNN_LIBFILE = $(MKLDNNROOT)/lib/libmkldnn.0.dylib
MKLDNN_LIB64FILE = $(MKLDNNROOT)/lib64/libmkldnn.0.dylib
else
OMP_LIBFILE = $(MKLDNNROOT)/lib/libiomp5.so
MKLML_LIBFILE = $(MKLDNNROOT)/lib/libmklml_intel.so
MKLDNN_LIBFILE = $(MKLDNNROOT)/lib/libmkldnn.so.0
MKLDNN_LIB64FILE = $(MKLDNNROOT)/lib64/libmkldnn.so.0
endif
endif
.PHONY: mkldnn mkldnn_clean
mkldnn_build: $(MKLDNN_LIBFILE)
$(MKLDNN_LIBFILE):
mkdir -p $(MKLDNNROOT)
cd $(MKLDNN_SUBMODDIR) && rm -rf external && cd scripts && ./prepare_mkl.sh && cd .. && cp -a external/*/* $(MKLDNNROOT)/.
cmake $(MKLDNN_SUBMODDIR) -DCMAKE_INSTALL_PREFIX=$(MKLDNNROOT) -B$(MKLDNN_BUILDDIR) -DARCH_OPT_FLAGS="-mtune=generic" -DWITH_TEST=OFF -DWITH_EXAMPLE=OFF
$(MAKE) -C $(MKLDNN_BUILDDIR) VERBOSE=1
$(MAKE) -C $(MKLDNN_BUILDDIR) install
if [ -f "$(MKLDNN_LIB64FILE)" ]; then \
mv $(MKLDNNROOT)/lib64/libmkldnn* $(MKLDNNROOT)/lib/; \
fi
mkdir -p $(MXNET_LIBDIR)
cp $(OMP_LIBFILE) $(MXNET_LIBDIR)
cp $(MKLML_LIBFILE) $(MXNET_LIBDIR)
cp $(MKLDNN_LIBFILE) $(MXNET_LIBDIR)
cp $(MKLDNN_BUILDDIR)/include/mkldnn_version.h $(MXNET_INCLDIR)/mkldnn/.
mkldnn_clean:
$(RM) -r 3rdparty/mkldnn/build
$(RM) -r $(MKLDNNROOT)
ifeq ($(USE_MKLDNN), 1)
mkldnn: mkldnn_build
else
mkldnn:
endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。