forked from mindspore-Ecosystem/mindspore
!46726 gpu module adapt for gcc11
Merge pull request !46726 from qiuzhongya/gcc11_cuda
This commit is contained in:
commit
fde88b4f4d
|
@ -114,7 +114,7 @@ int ScaleAndTranslateGpuKernelMod::Resize(const BaseOperatorPtr &base_operator,
|
|||
const std::vector<KernelTensorPtr> &inputs,
|
||||
const std::vector<KernelTensorPtr> &outputs,
|
||||
const std::map<uint32_t, tensor::TensorPtr> &inputsOnHost) {
|
||||
for (const auto inputtest : inputs) {
|
||||
for (const auto &inputtest : inputs) {
|
||||
auto inshape = inputtest->GetShapeVector();
|
||||
if (!IsValidShape(inshape)) {
|
||||
return KRET_UNKNOWN_SHAPE;
|
||||
|
|
|
@ -78,7 +78,7 @@ int ScaleAndTranslateGradGpuKernelMod::Resize(const BaseOperatorPtr &base_operat
|
|||
std::vector<int64_t> inp_shape_scale = inputs[kIndex2]->GetShapeVector();
|
||||
std::vector<int64_t> inp_shape_translation = inputs[kIndex3]->GetShapeVector();
|
||||
std::vector<int64_t> out_shape = outputs[0]->GetShapeVector();
|
||||
for (const auto inputtest : inputs) {
|
||||
for (const auto &inputtest : inputs) {
|
||||
auto inshape = inputtest->GetShapeVector();
|
||||
if (!IsValidShape(inshape)) {
|
||||
return KRET_UNKNOWN_SHAPE;
|
||||
|
|
|
@ -11,11 +11,12 @@ endif()
|
|||
|
||||
if(${CUDA_VERSION} VERSION_LESS 11.0)
|
||||
if(NOT MSVC)
|
||||
string(REPLACE "-std=c++17" "-std=c++11" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
string(REPLACE "-std=c++17" "-std=c++11" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
else()
|
||||
if(NOT MSVC)
|
||||
string(REPLACE "-std=c++17" "-std=c++14" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
string(REPLACE "-std=c++17" "-std=c++14" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++14")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ int ResizeBicubicGpuKernelMod::Resize(const BaseOperatorPtr &base_operator, cons
|
|||
std::vector<int64_t> inp_shape = inputs[0]->GetShapeVector();
|
||||
std::vector<int64_t> inptosize_shape = inputs[1]->GetShapeVector();
|
||||
std::vector<int64_t> out_shape = outputs[0]->GetShapeVector();
|
||||
for (const auto inputtest : inputs) {
|
||||
for (const auto &inputtest : inputs) {
|
||||
auto inshape = inputtest->GetShapeVector();
|
||||
if (!IsValidShape(inshape)) {
|
||||
return KRET_UNKNOWN_SHAPE;
|
||||
|
|
|
@ -78,7 +78,7 @@ int ResizeBicubicGradGpuKernelMod::Resize(const BaseOperatorPtr &base_operator,
|
|||
std::vector<int64_t> inp_shape = inputs[0]->GetShapeVector();
|
||||
std::vector<int64_t> inptosize_shape = inputs[1]->GetShapeVector();
|
||||
std::vector<int64_t> out_shape = outputs[0]->GetShapeVector();
|
||||
for (const auto inputtest : inputs) {
|
||||
for (const auto &inputtest : inputs) {
|
||||
auto inshape = inputtest->GetShapeVector();
|
||||
if (!IsValidShape(inshape)) {
|
||||
return KRET_UNKNOWN_SHAPE;
|
||||
|
|
Loading…
Reference in New Issue