Browse Source

!14865 codedex clean

From: @hwjiaorui
Reviewed-by: @zhoufeng54,@jjfeing
Signed-off-by: @jjfeing
pull/14865/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
70e61a46f7
7 changed files with 9 additions and 4 deletions
  1. +1
    -0
      mindspore/ccsrc/backend/kernel_compiler/kernel_fusion.cc
  2. +1
    -0
      mindspore/ccsrc/backend/optimizer/pass/optimize_dependence.cc
  3. +1
    -0
      mindspore/ccsrc/backend/session/ascend_auto_monad.cc
  4. +0
    -1
      mindspore/ccsrc/cxx_api/serialization.cc
  5. +3
    -0
      mindspore/ccsrc/runtime/device/ascend/ascend_launch_atomic_clean.cc
  6. +0
    -3
      mindspore/ccsrc/runtime/device/bucket.cc
  7. +3
    -0
      mindspore/ccsrc/runtime/device/launch_mul.cc

+ 1
- 0
mindspore/ccsrc/backend/kernel_compiler/kernel_fusion.cc View File

@@ -17,6 +17,7 @@
#include "backend/kernel_compiler/kernel_fusion.h"

#include <map>
#include <set>
#include <string>
#include <memory>
#include "backend/kernel_compiler/tbe/tbe_kernel_build.h"


+ 1
- 0
mindspore/ccsrc/backend/optimizer/pass/optimize_dependence.cc View File

@@ -18,6 +18,7 @@
#include <memory>
#include <vector>
#include <string>
#include <utility>
#include "backend/optimizer/common/helper.h"
#include "base/core_ops.h"
#include "utils/utils.h"


+ 1
- 0
mindspore/ccsrc/backend/session/ascend_auto_monad.cc View File

@@ -21,6 +21,7 @@
#include <vector>
#include <string>
#include <tuple>
#include <queue>
#include <utility>
#include <memory>
#include <algorithm>


+ 0
- 1
mindspore/ccsrc/cxx_api/serialization.cc View File

@@ -34,7 +34,6 @@ static Buffer ReadFile(const std::string &file) {
#else
real_path_ret = realpath(common::SafeCStr(file), real_path_mem);
#endif

if (real_path_ret == nullptr) {
MS_LOG(ERROR) << "File: " << file << " is not exist.";
return buffer;


+ 3
- 0
mindspore/ccsrc/runtime/device/ascend/ascend_launch_atomic_clean.cc View File

@@ -82,6 +82,9 @@ std::shared_ptr<session::KernelGraph> AscendLaunchAtomicClean::ObtainAtomicClean
std::vector<TypeId> output_dtypes = {};
// obtain input & output shapes
size_t dtype_size = abstract::TypeIdSize(dtype_);
if (dtype_size == 0) {
MS_LOG(EXCEPTION) << "Divide by zero.";
}
int64_t shape = total_size_ / dtype_size;
std::vector<std::vector<int64_t>> input_shapes = {{shape}};
std::vector<std::vector<size_t>> output_shapes = {};


+ 0
- 3
mindspore/ccsrc/runtime/device/bucket.cc View File

@@ -64,8 +64,6 @@ void Bucket::Launch() {
MS_LOG(INFO) << "Bucket launch cost:" << (GetTime() - start) * 1e6 << " us";
}

// TODO(caifubi): float16 grad cast to float32 grad

void Bucket::UpdateTensorAddr() {
if (grad_tensor_list_.size() != bucket_size_ || new_tensor_output_addrs_.size() != bucket_size_) {
MS_LOG(EXCEPTION) << "grad_tensor_list size:" << grad_tensor_list_.size()
@@ -80,7 +78,6 @@ void Bucket::UpdateTensorAddr() {
// release old addr and manage addr by this Bucket.
MS_EXCEPTION_IF_NULL(device_address);
auto origin_dev_ptr = device_address->GetMutablePtr();
// FreeDeviceMem(origin_dev_ptr);
tensor_old_addr_list_.emplace_back(origin_dev_ptr);
device_address->from_mem_pool_ = false;
device_address->set_ptr(new_tensor_output_addrs_[i]);


+ 3
- 0
mindspore/ccsrc/runtime/device/launch_mul.cc View File

@@ -29,6 +29,9 @@ std::shared_ptr<session::KernelGraph> LaunchMul::ObtainMulKernelGraph() {
// obtain input & output shapes
size_t dtype_size = abstract::TypeIdSize(dtype_);
int64_t shape = total_size_ / dtype_size;
if (dtype_size == 0) {
MS_LOG(EXCEPTION) << "Divide by zero.";
}
std::vector<std::vector<int64_t>> input_shapes = {{shape}, {1}};
std::vector<std::vector<size_t>> output_shapes = {{static_cast<size_t>(shape)}};
auto mul_graph = session::SingleKernelGraph::ConstructKernelGraphBasedOnSingleOp(


Loading…
Cancel
Save