Browse Source

format code

tags/v0.3.0-alpha
caifubi 5 years ago
parent
commit
cb70daa355
2 changed files with 4 additions and 7 deletions
  1. +3
    -6
      mindspore/ccsrc/dataset/engine/datasetops/source/random_data_op.cc
  2. +1
    -1
      mindspore/ccsrc/device/ascend/ascend_kernel_runtime.h

+ 3
- 6
mindspore/ccsrc/dataset/engine/datasetops/source/random_data_op.cc View File

@@ -102,9 +102,8 @@ void RandomDataOp::Print(std::ostream &out, bool show_all) const {
// Call the super class for displaying any common detailed info
ParallelOp::Print(out, show_all);
// Then show any custom derived-internal stuff
out << "\nTotal_rows: " << total_rows_
<< "\nRows per buffer: " << rows_per_buffer_
<< "\nSchema:\n" << *data_schema_ << "\n\n";
out << "\nTotal_rows: " << total_rows_ << "\nRows per buffer: " << rows_per_buffer_ << "\nSchema:\n"
<< *data_schema_ << "\n\n";
}
}

@@ -143,8 +142,7 @@ Status RandomDataOp::GenerateSchema() {

// Create the column descriptor
std::string colName = "c" + std::to_string(i);
newCol = std::make_unique<ColDescriptor>(colName, DataType(newType), TensorImpl::kFlexible, rank,
newShape.get());
newCol = std::make_unique<ColDescriptor>(colName, DataType(newType), TensorImpl::kFlexible, rank, newShape.get());

data_schema_->AddColumn(*newCol);
}
@@ -411,4 +409,3 @@ Status RandomDataOp::Reset() {
}
} // namespace dataset
} // namespace mindspore


+ 1
- 1
mindspore/ccsrc/device/ascend/ascend_kernel_runtime.h View File

@@ -57,7 +57,7 @@ class AscendKernelRuntime : public KernelRuntime {
void ReleaseDeviceRes() override;
bool GraphWithEmptyTaskList(const session::KernelGraph *graph) const;
bool CheckGraphIdValid(GraphId graph_id) const;
static void DebugTaskIdName(GraphId graph_id) ;
static void DebugTaskIdName(GraphId graph_id);

rtContext_t rt_context_{nullptr};
bool initialized_{false};


Loading…
Cancel
Save