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

Commit

Permalink
Make stuff compile
Browse files Browse the repository at this point in the history
  • Loading branch information
junrushao committed Apr 22, 2019
1 parent 36c4fbb commit f28f4b9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 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
16 changes: 8 additions & 8 deletions src/executor/graph_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void GraphExecutor::Backward(const std::vector<NDArray>& head_grads, bool is_tra
NDArray &to = head_grad_array_[i];
if (this->is_dynamic_) {
to.WaitToRead();
if (!mxnet::op::shape_is_known(to)) {
if (!shape_is_known(to.shape())) {
to.Init(from.shape());
}
}
Expand Down Expand Up @@ -122,7 +122,7 @@ const std::vector<NDArray>& GraphExecutor::outputs() const {
if (this->is_dynamic_) {
for (const NDArray &array : output_arrays_) {
array.WaitToRead();
if (!mxnet::op::shape_is_known(array)) {
if (!shape_is_known(array.shape())) {
const_cast<NDArray &>(array).SetShapeFromChunk();
}
}
Expand Down Expand Up @@ -985,7 +985,7 @@ void GraphExecutor::InitDataEntryMemory(std::vector<NDArray>* shared_pool) {
uint32_t oid = head_grad_map_.at(idx[nid].source);
uint32_t eid = idx.entry_id(idx.outputs()[oid]);
NDArrayStorageType stype = (NDArrayStorageType) vstorage_type[eid];
bool unknown_shape = !mxnet::shape_is_known(vshape[eid]);
bool unknown_shape = !shape_is_known(vshape[eid]);
CHECK_NE(vdtype[eid], -1);
auto data_eid = idx.entry_id(nid, 0);
// initialize based on storage_type
Expand Down Expand Up @@ -1077,7 +1077,7 @@ void GraphExecutor::InitDataEntryMemory(std::vector<NDArray>* shared_pool) {
int storage_id = vstorage[i];
auto storage_type = (NDArrayStorageType) vstorage_type[i];
if (storage_type == kDefaultStorage) {
if (!mxnet::op::shape_is_known(vshape[i])) {
if (!shape_is_known(vshape[i])) {
data_entry_[i] = NDArray(data_context[i], vdtype[i]);
} else {
CHECK_GE(storage_id, 0) << "Do not support runtime shape op yet";
Expand Down Expand Up @@ -1353,7 +1353,7 @@ void GraphExecutor::RunOps(bool is_train, size_t topo_start, size_t topo_end) {
const auto &op = inode.source->op();
for (NDArray &array : opnode.exec->in_array) {
array.WaitToRead();
if (!mxnet::op::shape_is_known(array)) {
if (!shape_is_known(array.shape())) {
array.SetShapeFromChunk();
}
}
Expand All @@ -1376,7 +1376,7 @@ void GraphExecutor::RunOps(bool is_train, size_t topo_start, size_t topo_end) {
int n_out = out_shapes.size();
for (int i = 0; i < n_out; ++i) {
NDArray &array = opnode.exec->out_array[i];
if (!mxnet::op::shape_is_known(array)) {
if (!shape_is_known(array.shape())) {
array.Init(out_shapes[i]);
}
}
Expand All @@ -1390,7 +1390,7 @@ void GraphExecutor::RunOps(bool is_train, size_t topo_start, size_t topo_end) {
std::vector<NDArray> &from = fopnode.exec->in_array;
std::vector<NDArray> &to = opnode.exec->out_array;
for (int i = 0; i < nelem; ++i) {
if (!mxnet::op::shape_is_known(to)) {
if (!shape_is_known(to[i].shape())) {
to[i].Init(from[i].shape());
}
}
Expand All @@ -1412,7 +1412,7 @@ void GraphExecutor::RunOps(bool is_train, size_t topo_start, size_t topo_end) {
if (this->is_dynamic_) {
for (NDArray &array : opnode.exec->out_array) {
array.WaitToRead();
if (!mxnet::op::shape_is_known(array)) {
if (!shape_is_known(array.shape())) {
array.SetShapeFromChunk();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/operator/control_flow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ static void WhileLoopComputeExCPU(const OpStatePtr& state_ptr,
func_outputs[i].SetShapeFromChunk();
}
mxnet::TShape step_shape = func_outputs[i].shape();
mxnet::TShape shape(step_shape.ndim() + 1);
mxnet::TShape shape(step_shape.ndim() + 1, 0);
shape[0] = params.max_iterations;
for (size_t j = 0; j < step_shape.ndim(); ++j) {
for (int j = 0; j < step_shape.ndim(); ++j) {
shape[j + 1] = step_shape[j];
}
const_cast<NDArray &>(outputs[i]).Init(shape);
Expand Down

0 comments on commit f28f4b9

Please sign in to comment.