Skip to content

Commit

Permalink
Misc. cleanup. (microsoft#5659)
Browse files Browse the repository at this point in the history
Co-authored-by: Ubuntu <OrtTrainingDev3@OrtTrainingDev3.af05slrtruoetgaxwwjv5nsq5e.px.internal.cloudapp.net>
  • Loading branch information
codemzs and Ubuntu authored Nov 2, 2020
1 parent 9af0d48 commit f2168ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion onnxruntime/core/framework/execution_frame.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ ExecutionFrame::ExecutionFrame(const std::vector<int>& feed_mlvalue_idxs, const
}

// log size of activation. Keep it commented out for now to avoid log flooding.
printf("\n **** Allocated memory for activations, size: %zu ***\n", mem_patterns_->patterns[i].PeakSize());
VLOGS(session_state_.Logger(), 1) << "**** Allocated memory for activations, size: " <<mem_patterns_->patterns[i].PeakSize();
}
}
}
Expand Down
9 changes: 3 additions & 6 deletions onnxruntime/core/framework/mem_pattern_planner.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,21 @@ class MemPatternPlanner {

size_t index_1 = 0;
size_t index_2 = 0;
bool overlap = false;
while ((index_1 < program_counter_start_1.size()) && (index_2 < program_counter_start_2.size())) {
if (program_counter_start_1[index_1] <= program_counter_start_2[index_2]) {
if (program_counter_end_1[index_1] >= program_counter_start_2[index_2]) {
overlap = true;
break;
return true;
}
index_1 += 1;
} else {
if (program_counter_end_2[index_2] >= program_counter_start_1[index_1]) {
overlap = true;
break;
return true;
}
index_2 += 1;
}
}

return overlap;
return false;
}

void TraceAllocation(int ml_value_idx, const std::vector<size_t>& program_counter_start, const std::vector<size_t>& program_counter_end, size_t size) {
Expand Down
2 changes: 0 additions & 2 deletions orttraining/tools/ci_test/run_convergence_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def main():

# run BERT training
subprocess.run([
"/bert_ort/openmpi/bin/mpirun",
"-n", "2",
os.path.join(args.binary_dir, "onnxruntime_training_bert"),
"--model_name", os.path.join(
args.model_root, "nv/bert-base/bert-base-uncased_L_12_H_768_A_12_V_30528_S_512_Dp_0.1_optimized_layer_norm_opset12"),
Expand Down

0 comments on commit f2168ce

Please sign in to comment.