Browse Source

Feature: Support single op profiling

pull/473/head
l00444296 4 years ago
parent
commit
b005024051
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      ge/single_op/single_op.cc
  2. +1
    -1
      ge/single_op/single_op.h

+ 2
- 2
ge/single_op/single_op.cc View File

@@ -165,7 +165,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status SingleOp::ExecuteAsync(c
return ret;
}

int index = 0;
uint32_t index = 0;
for (auto &task : tasks_) {
ret = task->LaunchKernel(stream_);
if (ret != SUCCESS) {
@@ -180,7 +180,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status SingleOp::ExecuteAsync(c
return ret;
}

Status SingleOp::ProfilingTaskInfo(int index) {
Status SingleOp::ProfilingTaskInfo(uint32_t index) {
if (op_name_.size() <= index) {
GELOGE(ACL_ERROR_GE_PARAM_INVALID, "index[%d] is out of range of op_name_ size[%d].", index, op_name_.size());
return ACL_ERROR_GE_PARAM_INVALID;


+ 1
- 1
ge/single_op/single_op.h View File

@@ -42,7 +42,7 @@ class SingleOp {
Status ValidateArgs(const std::vector<DataBuffer> &inputs, const std::vector<DataBuffer> &outputs);
Status UpdateArgs(const std::vector<DataBuffer> &inputs, const std::vector<DataBuffer> &outputs);
Status GetArgs(const std::vector<DataBuffer> &inputs, const std::vector<DataBuffer> &outputs);
Status ProfilingTaskInfo(int index);
Status ProfilingTaskInfo(uint32_t index);

friend class SingleOpModel;
std::mutex *stream_mutex_;


Loading…
Cancel
Save