Browse Source

!15035 Fixing Codex issues in the debugger

From: @islam_amin
Reviewed-by: @yelihua,@lilongfei15,@yelihua,@yelihua
Signed-off-by: @lilongfei15
tags/v1.2.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
68cd837553
6 changed files with 12 additions and 10 deletions
  1. +4
    -3
      mindspore/ccsrc/debug/debug_services.cc
  2. +4
    -3
      mindspore/ccsrc/debug/debug_services.h
  3. +1
    -1
      mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.cc
  4. +1
    -1
      mindspore/ccsrc/runtime/device/ascend/ascend_kernel_runtime.h
  5. +1
    -1
      mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc
  6. +1
    -1
      mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.h

+ 4
- 3
mindspore/ccsrc/debug/debug_services.cc View File

@@ -134,7 +134,7 @@ void DebugServices::AddWatchPointsToCheck(bool init_dbg_suspend, bool step_end,
}

void DebugServices::CheckWatchpoints(std::vector<std::string> *name, std::vector<std::string> *slot,
std::vector<int> *condition, std::vector<unsigned int> *watchpoint_id,
std::vector<int> *condition, std::vector<unsigned int> *const watchpoint_id,
std::vector<std::vector<parameter_t>> *parameters,
std::vector<int32_t> *error_codes, const std::vector<std::string> &op_overflows,
const std::vector<std::shared_ptr<TensorData>> &tensor_list,
@@ -202,7 +202,7 @@ void DebugServices::CheckWatchpoints(std::vector<std::string> *name, std::vector

void DebugServices::ReadNodesTensors(std::vector<std::string> name, std::vector<std::string> *ret_name,
std::vector<char *> *data_ptr, std::vector<ssize_t> *data_size,
std::vector<TypePtr> *dtype, std::vector<std::vector<int64_t>> *shape) {
std::vector<TypePtr> *dtype, std::vector<std::vector<int64_t>> *const shape) {
std::vector<std::tuple<std::string, std::shared_ptr<TensorData>>> result_list;
tensor_loader_->SearchTensors(name, &result_list);

@@ -243,7 +243,8 @@ bool DebugServices::IsWatchPointNodeInput(const std::string &w_name, const CNode
auto input_kernel = kernel->input(j + 1);
std::string input_kernel_name = input_kernel->fullname_with_scope();
auto found = w_name.find_last_of('/');
if (found != std::string::npos && w_name.substr(found + 1) == input_kernel_name) return true;
if (found != std::string::npos && w_name.size() > found + 1 && w_name.substr(found + 1) == input_kernel_name)
return true;
}
return false;
} else {


+ 4
- 3
mindspore/ccsrc/debug/debug_services.h View File

@@ -174,8 +174,9 @@ class DebugServices {
void RemoveWatchpoint(unsigned int id);

void CheckWatchpoints(std::vector<std::string> *name, std::vector<std::string> *slot, std::vector<int> *condition,
std::vector<unsigned int> *watchpoint_id, std::vector<std::vector<parameter_t>> *parameters,
std::vector<int32_t> *error_code, const std::vector<std::string> &op_overflows,
std::vector<unsigned int> *const watchpoint_id,
std::vector<std::vector<parameter_t>> *parameters, std::vector<int32_t> *error_code,
const std::vector<std::string> &op_overflows,
const std::vector<std::shared_ptr<TensorData>> &tensor_list, bool init_dbg_suspend,
const bool step_end, const bool recheck);

@@ -185,7 +186,7 @@ class DebugServices {

void ReadNodesTensors(std::vector<std::string> name, std::vector<std::string> *ret_name,
std::vector<char *> *data_ptr, std::vector<ssize_t> *data_size, std::vector<TypePtr> *dtype,
std::vector<std::vector<int64_t>> *shape);
std::vector<std::vector<int64_t>> *const shape);

bool IsWatchPoint(const std::string &kernel_name, const CNodePtr &kernel = nullptr) const;



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

@@ -591,7 +591,7 @@ void AscendKernelRuntime::DumpTaskExceptionInfo(const session::KernelGraph *grap
}
}

bool AscendKernelRuntime::Run(session::KernelGraph *graph, bool is_task_sink) {
bool AscendKernelRuntime::Run(session::KernelGraph *const graph, bool is_task_sink) {
SignalGuard sg;
MS_EXCEPTION_IF_NULL(graph);
bool ret = false;


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

@@ -45,7 +45,7 @@ class AscendKernelRuntime : public KernelRuntime {
bool LoadTask(const session::KernelGraph *graph);
bool RunTask(const session::KernelGraph *graph);
bool Load(session::KernelGraph *graph, bool is_task_sink) override;
bool Run(session::KernelGraph *graph, bool is_task_sink) override;
bool Run(session::KernelGraph *const graph, bool is_task_sink) override;
void ClearGraphRuntimeResource(uint32_t graph_id, const std::vector<AnfNodePtr> &inputs,
const std::unordered_set<ValueNodePtr> &value_nodes,
const std::vector<CNodePtr> &execution_order) override;


+ 1
- 1
mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc View File

@@ -380,7 +380,7 @@ void CPUKernelRuntime::DecreaseSummaryRefCount(const session::NamedSummaryOutput
static_cast<CPUMemoryManager *>(mem_manager_.get())->DecreaseSummaryRefCount(summary_outputs);
}

bool CPUKernelRuntime::Run(session::KernelGraph *kernel_graph, bool is_task_sink) {
bool CPUKernelRuntime::Run(session::KernelGraph *const kernel_graph, bool is_task_sink) {
MS_EXCEPTION_IF_NULL(kernel_graph);
static_cast<CPUMemoryManager *>(mem_manager_.get())->IncreaseAddressRefCount(kernel_graph);



+ 1
- 1
mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.h View File

@@ -36,7 +36,7 @@ class CPUKernelRuntime : public KernelRuntime {
~CPUKernelRuntime() override = default;

bool Init();
bool Run(session::KernelGraph *graph, bool is_task_sink) override;
bool Run(session::KernelGraph *const graph, bool is_task_sink) override;
void AssignKernelAddress(session::KernelGraph *kernel_graph);
void CreateOutputTensors(session::KernelGraph *kernel_graph, const std::vector<tensor::TensorPtr> &inputs,
VectorRef *outputs, std::map<tensor::TensorPtr, session::KernelWithIndex> *tensor_to_node);


Loading…
Cancel
Save