Skip to content

Commit

Permalink
Merge pull request #22 from apache/master
Browse files Browse the repository at this point in the history
sync to latest code
  • Loading branch information
Hao Li authored Apr 17, 2019
2 parents cf16d94 + a26ad37 commit d3fe453
Show file tree
Hide file tree
Showing 177 changed files with 3,812 additions and 1,565 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ 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_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 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
20 changes: 10 additions & 10 deletions R-package/src/symbol.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ Symbol::RObjectType Symbol::GetOutput(mx_uint index) const {

// helper function to convert shape into Rcpp vector
inline Rcpp::List BuildShapeData(mx_uint shape_size,
const mx_uint *shape_ndim,
const mx_uint **shape_data,
const int *shape_ndim,
const int **shape_data,
const std::vector<std::string> &names) {
Rcpp::List ret(shape_size);
for (mx_uint i = 0; i < shape_size; ++i) {
Expand All @@ -185,7 +185,7 @@ SEXP Symbol::InferShape(const Rcpp::List& kwargs) const {
<< "Need to pass parameters in key=value style.\n";
std::vector<std::string> keys = kwargs.names();
std::vector<mx_uint> arg_ind_ptr(1, 0);
std::vector<mx_uint> arg_shape_data;
std::vector<int> arg_shape_data;

for (size_t i = 0; i < kwargs.size(); ++i) {
RCHECK(keys[i].length() != 0)
Expand All @@ -197,17 +197,17 @@ SEXP Symbol::InferShape(const Rcpp::List& kwargs) const {
std::vector<const char*> c_keys = CKeys(keys);

mx_uint in_shape_size;
const mx_uint *in_shape_ndim;
const mx_uint **in_shape_data;
const int *in_shape_ndim;
const int **in_shape_data;
mx_uint out_shape_size;
const mx_uint *out_shape_ndim;
const mx_uint **out_shape_data;
const int *out_shape_ndim;
const int **out_shape_data;
mx_uint aux_shape_size;
const mx_uint *aux_shape_ndim;
const mx_uint **aux_shape_data;
const int *aux_shape_ndim;
const int **aux_shape_data;
int complete;

MX_CALL(MXSymbolInferShape(
MX_CALL(MXSymbolInferShapeEx(
handle_, static_cast<mx_uint>(kwargs.size()), dmlc::BeginPtr(c_keys),
dmlc::BeginPtr(arg_ind_ptr), dmlc::BeginPtr(arg_shape_data),
&in_shape_size, &in_shape_ndim, &in_shape_data,
Expand Down
1 change: 1 addition & 0 deletions ci/docker/install/ubuntu_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ apt-get install -y \
software-properties-common \
sudo \
unzip \
vim-nox \
wget

# Use libturbojpeg package as it is correctly compiled with -fPIC flag
Expand Down
Loading

0 comments on commit d3fe453

Please sign in to comment.