gpu single op network can not find bp_end.

This commit is contained in:
liuchuting 2022-05-13 11:02:45 +08:00
parent 8e38c971c8
commit 47df574693
2 changed files with 5 additions and 4 deletions

View File

@ -173,10 +173,10 @@ std::string ProfilingUtils::GetGraphSecondLastKernelName(const std::vector<CNode
std::string second_last_kernel_name;
auto iter = cnode_exec_order.rbegin();
++iter;
if (iter != cnode_exec_order.rend()) {
second_last_kernel_name = (*iter)->fullname_with_scope();
if (iter == cnode_exec_order.rend()) {
--iter;
}
second_last_kernel_name = (*iter)->fullname_with_scope();
return second_last_kernel_name;
}

View File

@ -187,7 +187,8 @@ class TestProfiler:
model.train(1, ds_train, dataset_sink_mode=True)
profiler.analyse()
profiler.op_analyse(op_name="Conv2D")
if device_target != 'Ascend':
profiler.op_analyse(op_name="Conv2D")
def _check_gpu_profiling_file(self):
op_detail_file = self.profiler_path + f'gpu_op_detail_info_{self.device_id}.csv'