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

Commit

Permalink
Merge pull request #93 from tqchen/master
Browse files Browse the repository at this point in the history
remove warning
  • Loading branch information
tqchen committed Sep 18, 2015
2 parents 5de9233 + dc4ff9d commit cb40e00
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dmlc-core
Submodule dmlc-core updated 1 files
+2 −5 include/dmlc/json.h
2 changes: 1 addition & 1 deletion mshadow
5 changes: 3 additions & 2 deletions src/engine/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ inline Engine* CreateEngine() {
ret = CreateThreadedEnginePerDevice();
}

CHECK_NE(ret, nullptr)
<< "Cannot find Engine " << type;
if (ret ==nullptr) {
LOG(FATAL) << "Cannot find Engine " << type;
}
if (!default_engine) {
LOG(INFO) << "MXNet start using engine: " << type;
}
Expand Down
1 change: 1 addition & 0 deletions src/engine/threaded_engine_pooled.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <dmlc/base.h>
#include <dmlc/logging.h>
#include <dmlc/concurrency.h>
#include <cassert>
#include "./threaded_engine.h"
#include "./thread_pool.h"
#include "./stream_manager.h"
Expand Down
5 changes: 3 additions & 2 deletions src/operator/operator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ namespace mxnet {
// implementation of all factory functions
OperatorProperty *OperatorProperty::Create(const char* type_name) {
auto *creator = dmlc::Registry<OperatorPropertyReg>::Find(type_name);
CHECK_NE(creator, nullptr)
<< "Cannot find Operator " << type_name << " in registry";
if (creator == nullptr) {
LOG(FATAL) << "Cannot find Operator " << type_name << " in registry";
}
return creator->body();
}
} // namespace mxnet
5 changes: 3 additions & 2 deletions src/symbol/graph_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,9 @@ inline std::vector<std::pair<T, T> > GraphExecutor::GetInplaceOption(
out_grad_index, in_data_index, out_data_index, in_grad_ptr);
std::vector<std::pair<T, T> > remap(remap_index.size());
for (size_t i = 0; i < remap_index.size(); ++i) {
CHECK_NE(args_array[remap_index[i].first], nullptr)
<< "BackwardInplaceOption uses input that is returned by DeclareBackwardDependency";
if (args_array[remap_index[i].first] == nullptr) {
LOG(FATAL) << "BackwardInplaceOption uses input that is returned by DeclareBackwardDependency";
}
remap[i].first = *args_array[remap_index[i].first];
remap[i].second = *static_cast<T*>(remap_index[i].second);
}
Expand Down

0 comments on commit cb40e00

Please sign in to comment.