Browse Source

!742 GPU update kernel type verification

Merge pull request !742 from VectorSL/update-type-check
tags/v0.3.0-alpha
mindspore-ci-bot Gitee 6 years ago
parent
commit
14191c4ba9
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      mindspore/ccsrc/kernel/gpu/gpu_kernel_factory.cc

+ 7
- 2
mindspore/ccsrc/kernel/gpu/gpu_kernel_factory.cc View File

@@ -68,13 +68,18 @@ std::string GpuKernelFactory::SupportedTypeList(const std::string &kernel_name)
return type_lists;
}
for (size_t attr_index = 0; attr_index < (iter->second).size(); ++attr_index) {
std::string type_list = "[";
std::string type_list = "in[";
auto attr = (iter->second)[attr_index].first;
for (size_t input_index = 0; input_index < attr.GetInputSize(); ++input_index) {
type_list = type_list + TypeId2String(attr.GetInputAttr(input_index).first) +
((input_index == (attr.GetInputSize() - 1)) ? "" : " ");
}
type_lists = type_lists + type_list + "] ";
type_list = type_list + "], out[";
for (size_t input_index = 0; input_index < attr.GetOutputSize(); ++input_index) {
type_list = type_list + TypeId2String(attr.GetOutputAttr(input_index).first) +
((input_index == (attr.GetOutputSize() - 1)) ? "" : " ");
}
type_lists = type_lists + type_list + "]; ";
}
return type_lists;
}


Loading…
Cancel
Save