From 7f26cf2bda6c4b81288771223d3426b4123ace83 Mon Sep 17 00:00:00 2001 From: liangzelang Date: Thu, 17 Mar 2022 10:43:15 +0800 Subject: [PATCH] clean code --- mindspore/ccsrc/backend/common/somas/somas_solver_pre.cc | 2 +- .../device/ascend/hal/device/ge_runtime/task/aicpu_task.h | 2 +- .../plugin/device/ascend/hal/device/ge_runtime/task/task.h | 2 +- .../plugin/device/ascend/hal/device/ge_runtime/task/tbe_task.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mindspore/ccsrc/backend/common/somas/somas_solver_pre.cc b/mindspore/ccsrc/backend/common/somas/somas_solver_pre.cc index 1c0950dff46..504386fb0e3 100644 --- a/mindspore/ccsrc/backend/common/somas/somas_solver_pre.cc +++ b/mindspore/ccsrc/backend/common/somas/somas_solver_pre.cc @@ -149,7 +149,7 @@ Status SomasSolverPre::Solving(const session::KernelGraph *graph, TensorsDescMap if (upperbound <= best) { best = upperbound; best_sol = sol; - best_timing = solver->timing_; + best_timing = LongToSize(solver->timing_); } } auto end = std::chrono::system_clock::now(); diff --git a/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/aicpu_task.h b/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/aicpu_task.h index 8fb6358ccfc..30f6e98fb8d 100644 --- a/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/aicpu_task.h +++ b/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/aicpu_task.h @@ -31,7 +31,7 @@ class AicpuTask : public TaskRepeater { void Distribute() override; - void *Args() override { return input_output_addr_; } + void *Args() const override { return input_output_addr_; } std::string task_name() const override { return task_info_->op_name(); } diff --git a/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/task.h b/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/task.h index 219701e677d..ec1d9469852 100644 --- a/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/task.h +++ b/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/task.h @@ -33,7 +33,7 @@ class Task { virtual void Distribute() = 0; - virtual void *Args() { return nullptr; } + virtual void *Args() const { return nullptr; } virtual std::string task_name() const { return ""; } diff --git a/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/tbe_task.h b/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/tbe_task.h index de265260211..370421ccc8d 100644 --- a/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/tbe_task.h +++ b/mindspore/ccsrc/plugin/device/ascend/hal/device/ge_runtime/task/tbe_task.h @@ -30,7 +30,7 @@ class TbeTask : public TaskRepeater { void Distribute() override; - void *Args() override { return args_; } + void *Args() const override { return args_; } std::string task_name() const override { return task_info_->op_name(); }