Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Merge branch 'master' into feature/index-array-op
Browse files Browse the repository at this point in the history
  • Loading branch information
wkcn committed Apr 29, 2019
2 parents 0f742af + c18381d commit 7fa5a17
Show file tree
Hide file tree
Showing 340 changed files with 10,538 additions and 3,951 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/dmlc-core
Submodule dmlc-core updated 69 files
+1 −0 .gitignore
+13 −0 .travis.yml
+88 −12 CMakeLists.txt
+6 −1 Makefile
+121 −0 appveyor.yml
+24 −0 cmake/build_config.h.in
+5 −0 cmake/dmlc-config.cmake.in
+15 −0 cmake/gtest_cmake.in
+16 −0 doc/build.md
+1 −0 doc/index.md
+57 −1 include/dmlc/any.h
+6 −24 include/dmlc/base.h
+35 −0 include/dmlc/build_config.h
+1 −1 include/dmlc/concurrency.h
+23 −5 include/dmlc/endian.h
+158 −0 include/dmlc/filesystem.h
+113 −0 include/dmlc/io.h
+3 −2 include/dmlc/json.h
+28 −21 include/dmlc/logging.h
+1 −1 include/dmlc/optional.h
+26 −6 include/dmlc/parameter.h
+6 −2 include/dmlc/registry.h
+737 −0 include/dmlc/strtonum.h
+2 −2 include/dmlc/thread_group.h
+19 −15 include/dmlc/threadediter.h
+3 −0 make/config.mk
+1 −1 scripts/lint.py
+1 −1 scripts/packages.mk
+0 −2 scripts/travis/travis_osx_install.sh
+14 −0 scripts/travis/travis_script.sh
+16 −0 src/build_config.cc
+28 −4 src/data/csv_parser.h
+1 −1 src/data/libfm_parser.h
+1 −1 src/data/libsvm_parser.h
+0 −312 src/data/strtonum.h
+21 −17 src/data/text_parser.h
+0 −1 src/io.cc
+1 −1 src/io/azure_filesys.h
+32 −2 src/io/filesys.cc
+0 −128 src/io/filesys.h
+2 −1 src/io/hdfs_filesys.h
+3 −0 src/io/indexed_recordio_split.h
+28 −15 src/io/input_split_base.cc
+7 −1 src/io/input_split_base.h
+3 −0 src/io/line_split.h
+38 −28 src/io/local_filesys.cc
+1 −1 src/io/local_filesys.h
+3 −0 src/io/recordio_split.h
+4 −2 src/io/s3_filesys.cc
+1 −1 src/io/s3_filesys.h
+9 −4 src/io/single_file_split.h
+0 −1 src/io/uri_spec.h
+1 −1 test/dmlc_test.mk
+1 −1 test/filesys_test.cc
+8 −7 test/strtonum_test.cc
+1 −0 test/unittest/.gitignore
+59 −33 test/unittest/CMakeLists.txt
+1 −0 test/unittest/build_config.h.in
+ test/unittest/sample.rec
+117 −118 test/unittest/unittest_inputsplit.cc
+1 −1 test/unittest/unittest_lockfree.cc
+1 −2 test/unittest/unittest_logging.cc
+150 −12 test/unittest/unittest_param.cc
+56 −2 test/unittest/unittest_parser.cc
+77 −0 test/unittest/unittest_tempdir.cc
+30 −8 test/unittest/unittest_thread_group.cc
+13 −6 tracker/dmlc_tracker/local.py
+2 −0 tracker/dmlc_tracker/opts.py
+2 −2 tracker/dmlc_tracker/tracker.py
2 changes: 1 addition & 1 deletion 3rdparty/googletest
Submodule googletest updated 355 files
2 changes: 1 addition & 1 deletion 3rdparty/mshadow
21 changes: 21 additions & 0 deletions 3rdparty/sparse-matrix/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
CC = g++
C = gcc
MKLROOT = /opt/intel/mkl

ifneq ($(USE_INTEL_PATH),)
MKLROOT = $(USE_INTEL_PATH)/mkl
endif

CFLAGS = -fpic -O2 -I/opt/intel/mkl/include -c -Wall -Werror -DMKL_ILP64 -m64 -std=c++11
LDFLAGS = -Wl,--start-group -L${MKLROOT}/../compiler/lib/intel64 ${MKLROOT}/lib/intel64/libmkl_intel_ilp64.a ${MKLROOT}/lib/intel64/libmkl_intel_thread.a ${MKLROOT}/lib/intel64/libmkl_core.a -Wl,--end-group -liomp5 -lpthread -lm -ldl

default: libsparse_matrix.so

libsparse_matrix.so: sparse_matrix.o
$(CC) -shared -o libsparse_matrix.so sparse_matrix.o $(LDFLAGS)

sparse_matrix.o: sparse_matrix.cc sparse_matrix.h
$(CC) $(CFLAGS) sparse_matrix.cc

clean:
$(RM) libsparse_matrix.so *.o *~
45 changes: 45 additions & 0 deletions 3rdparty/sparse-matrix/sparse_matrix.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#include <iostream>
#include <string>
#include <fstream>
#include <mkl_spblas.h>
#include "sparse_matrix.h"



bool mkl_DotCsrDnsDns(SP_INT64* rows_start, SP_INT64* col_indx,
float* values, float* X, float* y,
int rows, int cols, int X_columns)
{

sparse_index_base_t indexing = SPARSE_INDEX_BASE_ZERO;
sparse_status_t status;
sparse_matrix_t A = NULL;
sparse_layout_t layout = SPARSE_LAYOUT_ROW_MAJOR;
float one, zero;
one = (float)1.0;
zero = (float)0.0;

MKL_INT* rows_end = rows_start + 1;
status = mkl_sparse_s_create_csr(&A, indexing, rows, cols, rows_start, rows_end, col_indx, values);

if (status != SPARSE_STATUS_SUCCESS)
{
std::cout << "mkl_sparse_s_create_csr status :" << status << std::endl;
return false;
}
sparse_operation_t operation = SPARSE_OPERATION_NON_TRANSPOSE;
struct matrix_descr descrA;
descrA.type = SPARSE_MATRIX_TYPE_GENERAL;

status = mkl_sparse_s_mm(operation, one, A, descrA, layout, X, X_columns, X_columns, zero, y, X_columns);
if (status != SPARSE_STATUS_SUCCESS)
{
std::cout << "mkl_sparse_s_create_csr status :" << status << std::endl;
return false;
}

mkl_sparse_destroy(A);

return true;

}
48 changes: 48 additions & 0 deletions 3rdparty/sparse-matrix/sparse_matrix.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#ifndef MXNET_OPERATOR_SPARSE_MATRIX_INL_H_
#define MXNET_OPERATOR_SPARSE_MATRIX_INL_H_


#if (!defined(__INTEL_COMPILER)) & defined(_MSC_VER)
#define SP_INT64 __int64
#define SP_UINT64 unsigned __int64
#else
#define SP_INT64 long long int
#define SP_UINT64 unsigned long long int
#endif


#if defined _WIN32 || defined __CYGWIN__
#ifdef BUILDING_DLL
#ifdef __GNUC__
#define SPM_API_PUBLIC __attribute__ ((dllexport))
#else
#define SPM_API_PUBLIC __declspec(dllexport) // Note: actually gcc seems to also supports this syntax.
#endif
#else
#ifdef __GNUC__
#define SPM_API_PUBLIC __attribute__ ((dllimport))
#else
#define SPM_API_PUBLIC __declspec(dllimport) // Note: actually gcc seems to also supports this syntax.
#endif
#endif
#define SPM_API_LOCAL
#else
#if __GNUC__ >= 4
#define SPM_API_PUBLIC __attribute__ ((visibility ("default")))
#define SPM_API_LOCAL __attribute__ ((visibility ("hidden")))
#else
#define SPM_API_PUBLIC
#define SPM_API_LOCAL
#endif
#endif



extern "C"
{
extern SPM_API_PUBLIC bool mkl_DotCsrDnsDns(SP_INT64* rows_start, SP_INT64* col_indx,
float* values, float* X, float* y, int rows, int cols, int X_columns);

}

#endif //MXNET_OPERATOR_SPARSE_MATRIX_INL_H_
26 changes: 19 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ mxnet_option(USE_SSE "Build with x86 SSE instruction support" ON IF
mxnet_option(USE_F16C "Build with x86 F16C instruction support" ON) # autodetects support if ON
mxnet_option(USE_LAPACK "Build with lapack support" ON)
mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON)
mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE))
mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) )
mxnet_option(USE_MKLDNN "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) AND (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") AND (NOT CMAKE_CROSSCOMPILING))
mxnet_option(USE_OPERATOR_TUNING "Enable auto-tuning of operators" ON IF NOT MSVC)
mxnet_option(USE_GPERFTOOLS "Build with GPerfTools support (if found)" ON)
mxnet_option(USE_GPERFTOOLS "Build with GPerfTools support" OFF)
mxnet_option(USE_JEMALLOC "Build with Jemalloc support" ON)
mxnet_option(USE_PROFILER "Build with Profiler support" ON)
mxnet_option(USE_DIST_KVSTORE "Build with DIST_KVSTORE support" OFF)
Expand All @@ -50,6 +50,7 @@ mxnet_option(USE_SIGNAL_HANDLER "Print stack traces on segfaults." OFF)
mxnet_option(USE_TENSORRT "Enable infeference optimization with TensorRT." OFF)
mxnet_option(USE_ASAN "Enable Clang/GCC ASAN sanitizers." OFF)
mxnet_option(ENABLE_TESTCOVERAGE "Enable compilation with test coverage metric output" OFF)
mxnet_option(USE_INT64_TENSOR_SIZE "Use int64_t to represent the total number of elements in a tensor" OFF)

message(STATUS "CMAKE_CROSSCOMPILING ${CMAKE_CROSSCOMPILING}")
message(STATUS "CMAKE_HOST_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR}")
Expand Down Expand Up @@ -120,6 +121,7 @@ else(MSVC)
# For cross compilation, we can't rely on the compiler which accepts the flag, but mshadow will
# add platform specific includes not available in other arches
if(USE_SSE)
check_cxx_compiler_flag("-msse3" SUPPORT_MSSE3)
check_cxx_compiler_flag("-msse2" SUPPORT_MSSE2)
else()
set(SUPPORT_MSSE2 FALSE)
Expand All @@ -133,14 +135,15 @@ else(MSVC)
set(SUPPORT_F16C FALSE)
endif()
if(SUPPORT_F16C)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mf16c")
message(STATUS "F16C enabled")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mf16c")
else()
add_definitions(-DMSHADOW_USE_F16C=0)
endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_C_FLAGS "-Wall -Wno-unknown-pragmas -Wno-sign-compare")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unknown-pragmas -Wno-sign-compare")
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES ".*Clang$")
set(CMAKE_C_FLAGS "-Wno-braced-scalar-init")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-braced-scalar-init")
endif()
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O0 -g")
Expand All @@ -151,7 +154,9 @@ else(MSVC)
add_definitions(-DNDEBUG=1)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
endif()
if(SUPPORT_MSSE2)
if(SUPPORT_MSSE3)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse3")
elseif(SUPPORT_MSSE2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2")
endif()
set(CMAKE_CXX_FLAGS ${CMAKE_C_FLAGS})
Expand Down Expand Up @@ -295,6 +300,13 @@ else()
add_definitions(-DMXNET_USE_NCCL=0)
endif()

if (USE_INT64_TENSOR_SIZE)
message(STATUS "Using 64-bit integer for tensor size")
add_definitions(-DMSHADOW_INT64_TENSOR_SIZE=1)
else()
add_definitions(-DMSHADOW_INT64_TENSOR_SIZE=0)
endif()

include(cmake/ChooseBlas.cmake)
if(USE_CUDA AND FIRST_CUDA)
include(3rdparty/mshadow/cmake/Utils.cmake)
Expand Down Expand Up @@ -395,8 +407,8 @@ if(USE_OPENCV)
endif()
include_directories(SYSTEM ${OpenCV_INCLUDE_DIRS})
list(APPEND mxnet_LINKER_LIBS ${OpenCV_LIBS})
message(STATUS " OpenCV_LIBS=${OpenCV_LIBS}")
message(STATUS "OpenCV ${OpenCV_VERSION} found (${OpenCV_CONFIG_PATH})")
message(STATUS " OpenCV_LIBS=${OpenCV_LIBS}")
add_definitions(-DMXNET_USE_OPENCV=1)
else(USE_OPENCV)
message(STATUS "OpenCV Disabled")
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ List of Contributors
* [Zhiyuan Huang](https://github.com/huangzhiyuan)
* [Zak Jost](https://github.com/zjost)
* [Nick Guletskii](https://github.com/nickguletskii)
* [Shoubhik Bhattacharya](https://github.com/shoubhik)
* [Zach Kimberg](https://github.com/zachgk)

Label Bot
---------
Expand Down
42 changes: 41 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
The Apache MXNET (incubating) project contains subcomponents with separate copyright
notices and license terms. Your use of the source code for the these
subcomponents is subject to the terms and conditions of the following
licenses.
licenses (full text in Appendix).

=======================================================================================
Apache-2.0 licenses
Expand Down Expand Up @@ -706,3 +706,43 @@
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.



=======================================================================================
Appendix
=======================================================================================

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 3-clause BSD

=======================================================================================

3-Clause BSD License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=======================================================================================

2-Clause BSD License

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 changes: 39 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ ifeq ($(USE_MKLDNN), 1)
LDFLAGS += -L$(MKLDNNROOT)/lib -lmkldnn -Wl,-rpath,'$${ORIGIN}'
endif


# setup opencv
ifeq ($(USE_OPENCV), 1)
CFLAGS += -DMXNET_USE_OPENCV=1
Expand Down Expand Up @@ -188,6 +189,11 @@ ifeq ($(USE_OPERATOR_TUNING), 1)
CFLAGS += -DMXNET_USE_OPERATOR_TUNING=1
endif

ifeq ($(USE_INT64_TENSOR_SIZE), 1)
CFLAGS += -DMSHADOW_INT64_TENSOR_SIZE=1
else
CFLAGS += -DMSHADOW_INT64_TENSOR_SIZE=0
endif
# verify existence of separate lapack library when using blas/openblas/atlas
# switch off lapack support in case it can't be found
# issue covered with this
Expand Down Expand Up @@ -410,6 +416,14 @@ ifeq ($(USE_DIST_KVSTORE), 1)
LDFLAGS += $(PS_LDFLAGS_A)
endif

#sparse-matrix
ifeq ($(USE_BLAS), mkl)
SPARSE_MATRIX_DIR = $(ROOTDIR)/3rdparty/sparse-matrix
LIB_DEP += $(SPARSE_MATRIX_DIR)/libsparse_matrix.so
CFLAGS += -I$(SPARSE_MATRIX_DIR)
LDFLAGS += -L$(SPARSE_MATRIX_DIR) -lsparse_matrix -Wl,-rpath,'$${ORIGIN}'
endif

.PHONY: clean all extra-packages test lint docs clean_all rcpplint rcppexport roxygen\
cython2 cython3 cython cyclean

Expand Down Expand Up @@ -547,11 +561,30 @@ ifeq ($(UNAME_S), Darwin)
endif
endif

ifeq ($(USE_BLAS), mkl)
ifeq ($(UNAME_S), Darwin)
install_name_tool -change '@rpath/libsparse_matrix.dylib' '@loader_path/libsparse_matrix.dylib' $@
endif
endif

$(PS_PATH)/build/libps.a: PSLITE

PSLITE:
$(MAKE) CXX="$(CXX)" DEPS_PATH="$(DEPS_PATH)" -C $(PS_PATH) ps

ifeq ($(USE_BLAS), mkl)
$(SPARSE_MATRIX_DIR)/libsparse_matrix.so: SPARSE_MATRIX

SPARSE_MATRIX:
ifeq ($(USE_INTEL_PATH), NONE)
$(MAKE) -C $(SPARSE_MATRIX_DIR)
else
$(MAKE) -C $(SPARSE_MATRIX_DIR) USE_INTEL_PATH=$(USE_INTEL_PATH)
endif
mkdir -p $(ROOTDIR)/lib
cp $(SPARSE_MATRIX_DIR)/libsparse_matrix.so $(ROOTDIR)/lib/
endif

$(DMLC_CORE)/libdmlc.a: DMLCCORE

DMLCCORE:
Expand Down Expand Up @@ -628,6 +661,10 @@ rpkg:
cp -rf lib/libmklml_intel.so R-package/inst/libs; \
fi

if [ -e "lib/libsparse_matrix.so" ]; then \
cp -rf lib/libsparse_matrix.so R-package/inst/libs; \
fi

mkdir -p R-package/inst/include
cp -rl include/* R-package/inst/include
Rscript -e "if(!require(devtools)){install.packages('devtools', repo = 'https://cloud.r-project.org/')}"
Expand Down Expand Up @@ -673,6 +710,7 @@ clean: rclean cyclean $(EXTRA_PACKAGES_CLEAN)
(cd scala-package && mvn clean) || true
cd $(DMLC_CORE); $(MAKE) clean; cd -
cd $(PS_PATH); $(MAKE) clean; cd -
cd $(SPARSE_MATRIX_DIR); $(MAKE) clean; cd -
cd $(NNVM_PATH); $(MAKE) clean; cd -
cd $(AMALGAMATION_PATH); $(MAKE) clean; cd -
$(RM) -r $(patsubst %, %/*.d, $(EXTRA_OPERATORS)) $(patsubst %, %/*/*.d, $(EXTRA_OPERATORS))
Expand All @@ -683,6 +721,7 @@ clean: rclean mkldnn_clean cyclean testclean $(EXTRA_PACKAGES_CLEAN)
(cd scala-package && mvn clean) || true
cd $(DMLC_CORE); $(MAKE) clean; cd -
cd $(PS_PATH); $(MAKE) clean; cd -
cd $(SPARSE_MATRIX_DIR); $(MAKE) clean; cd -
cd $(NNVM_PATH); $(MAKE) clean; cd -
cd $(AMALGAMATION_PATH); $(MAKE) clean; cd -
endif
Expand Down
6 changes: 3 additions & 3 deletions R-package/src/ndarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ Rcpp::RObject NDArrayPacker::CreateNDArrayPacker() {
}

Rcpp::Dimension NDArray::dim() const {
mx_uint ndim;
const mx_uint *pshape;
MX_CALL(MXNDArrayGetShape(
int ndim;
const int *pshape;
MX_CALL(MXNDArrayGetShapeEx(
ptr_->handle, &ndim, &pshape));
Rcpp::IntegerVector dat(pshape, pshape + ndim);
std::reverse(dat.begin(), dat.end());
Expand Down
Loading

0 comments on commit 7fa5a17

Please sign in to comment.