Browse Source

Fix rc

tags/v0.3.0-alpha
Jesse Lee 5 years ago
parent
commit
a0816f0bd6
2 changed files with 5 additions and 2 deletions
  1. +1
    -1
      mindspore/ccsrc/dataset/util/arena.cc
  2. +4
    -1
      mindspore/ccsrc/dataset/util/intrp_service.cc

+ 1
- 1
mindspore/ccsrc/dataset/util/arena.cc View File

@@ -52,7 +52,7 @@ Status Arena::Allocate(size_t n, void **p) {
// Round up n to 1K block
uint64_t req_size = static_cast<uint64_t>(n) + ARENA_WALL_OVERHEAD_SZ;
if (req_size > this->get_max_size()) {
RETURN_STATUS_UNEXPECTED("Request size too big : " + std::to_string(n));
return Status(StatusCode::kOutOfMemory);
}
uint64_t reqBlk = SizeToBlk(req_size);
// Do a first fit search


+ 4
- 1
mindspore/ccsrc/dataset/util/intrp_service.cc View File

@@ -46,7 +46,10 @@ Status IntrpService::Register(const std::string &name, IntrpResource *res) {
std::ostringstream ss;
ss << this_thread::get_id();
MS_LOG(DEBUG) << "Register resource with name " << name << ". Thread ID " << ss.str() << ".";
(void)all_intrp_resources_.emplace(name, res);
auto it = all_intrp_resources_.emplace(name, res);
if (it.second == false) {
return Status(StatusCode::kDuplicateKey, __LINE__, __FILE__, name);
}
high_water_mark_++;
} catch (std::exception &e) {
RETURN_STATUS_UNEXPECTED(e.what());


Loading…
Cancel
Save