Browse Source

!5902 GPU add support device

Merge pull request !5902 from VectorSL/format
tags/v1.0.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
31844bff2e
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      mindspore/ccsrc/runtime/device/gpu/kernel_info_setter.cc

+ 7
- 0
mindspore/ccsrc/runtime/device/gpu/kernel_info_setter.cc View File

@@ -27,6 +27,7 @@
#include "utils/ms_utils.h"
#include "backend/kernel_compiler/oplib/oplib.h"
#include "backend/kernel_compiler/oplib/opinfo.h"
#include "runtime/device/gpu/cuda_common.h"

namespace mindspore {
namespace device {
@@ -236,6 +237,12 @@ void UpdateKernelFormatInfo(const CNodePtr &kernel_node, const std::vector<TypeI
} // namespace

void FormatTransformChecker::CheckSupportFormatTransform(const std::shared_ptr<session::KernelGraph> &kernel_graph) {
// TensorCore can be used only in Volta or newer devices.
const int marjor_sm = GET_MAJOR_SM;
if (marjor_sm < RECOMMEND_SM) {
format_transform_ = false;
return;
}
auto kernels = kernel_graph->execution_order();
size_t conv_cnt = 0;
size_t bn_cnt = 0;


Loading…
Cancel
Save