Browse Source

delete useless code

pull/15592/head
ling 4 years ago
parent
commit
56f40e38e7
3 changed files with 1 additions and 13 deletions
  1. +0
    -1
      mindspore/lite/examples/train_lenet/src/net_runner.cc
  2. +0
    -3
      mindspore/lite/src/scheduler.cc
  3. +1
    -9
      mindspore/lite/src/sub_graph_split.cc

+ 0
- 1
mindspore/lite/examples/train_lenet/src/net_runner.cc View File

@@ -154,7 +154,6 @@ int NetRunner::InitDB() {
TypeCast typecast(mindspore::DataType::kNumberTypeInt32); TypeCast typecast(mindspore::DataType::kNumberTypeInt32);
train_ds_ = train_ds_->Map({&typecast}, {"label"}); train_ds_ = train_ds_->Map({&typecast}, {"label"});


// train_ds_ = train_ds_->Shuffle(2);
train_ds_ = train_ds_->Batch(batch_size_, true); train_ds_ = train_ds_->Batch(batch_size_, true);


if (verbose_) { if (verbose_) {


+ 0
- 3
mindspore/lite/src/scheduler.cc View File

@@ -722,9 +722,6 @@ int Scheduler::ConstructSubGraphs(std::vector<kernel::LiteKernel *> src_kernel,
if (head_kernel->subgraph_type() != kernel::kNotSubGraph) { if (head_kernel->subgraph_type() != kernel::kNotSubGraph) {
(*is_kernel_finish)[head_kernel] = true; (*is_kernel_finish)[head_kernel] = true;
dst_kernel->push_back(head_kernel); dst_kernel->push_back(head_kernel);

/* npu support split */
/* ConstructSubGraphs(head_kernel->nodes(), dst_kernel, is_kernel_finish); */
continue; continue;
} }
if (head_kernel->desc().arch == mindspore::kernel::kAPU) { if (head_kernel->desc().arch == mindspore::kernel::kAPU) {


+ 1
- 9
mindspore/lite/src/sub_graph_split.cc View File

@@ -45,7 +45,6 @@ void SearchSubGraph::ConvertSubGraphToModel() {
if (subgraph.nodes_.empty()) { if (subgraph.nodes_.empty()) {
continue; continue;
} }
// DeviceType device = subgraph.device_;


int new_sub_index = model_->sub_graphs_.size(); int new_sub_index = model_->sub_graphs_.size();
int partial_index = model_->all_nodes_.size(); int partial_index = model_->all_nodes_.size();
@@ -71,7 +70,6 @@ void SearchSubGraph::ConvertSubGraphToModel() {
new_sub_graph->node_indices_.push_back(node_index); new_sub_graph->node_indices_.push_back(node_index);
VectorErase(&main_graphs->node_indices_, node_index); VectorErase(&main_graphs->node_indices_, node_index);
VectorErase(&subgraph.nodes_, node_index); VectorErase(&subgraph.nodes_, node_index);
// model_->all_nodes_[node_index]->device_type_ = device;
} }


for (uint32_t head_index : subgraph.heads_) { for (uint32_t head_index : subgraph.heads_) {
@@ -227,13 +225,7 @@ void SearchSubGraph::InitSubgraphDevice() {
} }
} }


void SearchSubGraph::InitMainGraphDevice() {
// DeviceType main_device = DT_GPU;
// Model::SubGraph *main_graph = model_->sub_graphs_.front();
// for (uint32_t node_index : main_graph->node_indices_) {
// Model::Node *node = model_->all_nodes_[node_index];
// node->device_type_ = main_device;
}
void SearchSubGraph::InitMainGraphDevice() { return; }


void SearchSubGraph::SubgraphFusion() { void SearchSubGraph::SubgraphFusion() {
while (sub_graphs_.size() > 2) { while (sub_graphs_.size() > 2) {


Loading…
Cancel
Save