Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] CUDA EP compile errors with Cuda 12.2 #16713

Closed
boxerab opened this issue Jul 14, 2023 · 8 comments
Closed

[Build] CUDA EP compile errors with Cuda 12.2 #16713

boxerab opened this issue Jul 14, 2023 · 8 comments
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider

Comments

@boxerab
Copy link
Contributor

boxerab commented Jul 14, 2023

Describe the issue

These errors occur with latest main branch. I am running Fedora 37.

Urgency

Unusable without a fix.

Target platform

Fedora 37

Build script

cmake -Donnxruntime_BUILD_SHARED_LIB=ON -DBUILD_TESTING=OFF -Donnxruntime_BUILD_UNIT_TESTS=OFF -Donnxruntime_USE_CUDA=ON -Donnxruntime_CUDA_HOME=/usr/local/cuda -Donnxruntime_CUDNN_HOME=/usr/local/cuda /home/src/onnxruntime/cmake

Error / output


/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(80): error: more than one operator "+" matches these operands:
            function "operator+(const __half &, const __half &)" (declared at line 606 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator+(const half &, const half &)" (declared at line 23)
            operand types are: const __half + const __half
    r.x = lh.x + rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(81): error: more than one operator "+" matches these operands:
            function "operator+(const __half &, const __half &)" (declared at line 606 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator+(const half &, const half &)" (declared at line 23)
            operand types are: const __half + const __half
    r.y = lh.y + rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(87): error: more than one operator "-" matches these operands:
            function "operator-(const __half &, const __half &)" (declared at line 612 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &, const half &)" (declared at line 24)
            operand types are: const __half - const __half
    r.x = lh.x - rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(88): error: more than one operator "-" matches these operands:
            function "operator-(const __half &, const __half &)" (declared at line 612 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &, const half &)" (declared at line 24)
            operand types are: const __half - const __half
    r.y = lh.y - rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(94): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: const __half * const __half
    r.x = lh.x * rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(95): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: const __half * const __half
    r.y = lh.y * rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(101): error: more than one operator "/" matches these operands:
            function "operator/(const __half &, const __half &)" (declared at line 624 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator/(const half &, const half &)" (declared at line 26)
            operand types are: const __half / const __half
    r.x = lh.x / rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(102): error: more than one operator "/" matches these operands:
            function "operator/(const __half &, const __half &)" (declared at line 624 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator/(const half &, const half &)" (declared at line 26)
            operand types are: const __half / const __half
    r.y = lh.y / rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(390): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: half * const half
    return a * kHalf * (kOne + _Erf(kAlpha * a));
             ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(390): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: const half * half
    return a * kHalf * (kOne + _Erf(kAlpha * a));
                                           ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(15): error: more than one operator ">" matches these operands:
            function "operator>(const __half &, const __half &)" (declared at line 720 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator>(const half &, const half &)" (declared at line 72 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: const half > half
      return a > (T)0 ? a : (T)alpha * (_Exp(a) - (T)1);
               ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Elu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Elu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Elu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Elu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxElu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(15): error: more than one operator "-" matches these operands:
            function "operator-(const __half &, const __half &)" (declared at line 612 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &, const half &)" (declared at line 24 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: half - half
      return a > (T)0 ? a : (T)alpha * (_Exp(a) - (T)1);
                                                ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Elu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Elu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Elu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Elu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxElu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(15): error: ambiguous "?" operation: second operand of type "const half" can be converted to third operand type "<error-type>", and vice versa
      return a > (T)0 ? a : (T)alpha * (_Exp(a) - (T)1);
                          ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Elu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Elu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Elu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Elu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxElu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(22): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: half * const half
      return _Max(_Min((T)alpha * a + (T)beta, (T)1), (T)0);
                                ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_HardSigmoid<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_HardSigmoid<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_HardSigmoid<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_HardSigmoid(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxHardSigmoid *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(22): error: no instance of function template "onnxruntime::cuda::_Min" matches the argument list
            argument types are: (<error-type>, half)
      return _Max(_Min((T)alpha * a + (T)beta, (T)1), (T)0);
                  ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_HardSigmoid<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_HardSigmoid<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_HardSigmoid<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_HardSigmoid(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxHardSigmoid *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(22): error: no instance of function template "onnxruntime::cuda::_Max" matches the argument list
            argument types are: (<error-type>, half)
      return _Max(_Min((T)alpha * a + (T)beta, (T)1), (T)0);
             ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_HardSigmoid<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_HardSigmoid<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_HardSigmoid<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_HardSigmoid(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxHardSigmoid *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(29): error: more than one operator ">" matches these operands:
            function "operator>(const __half &, const __half &)" (declared at line 720 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator>(const half &, const half &)" (declared at line 72 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: const half > half
      return a > (T)0 ? a : (T)alpha * a;
               ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_LeakyRelu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_LeakyRelu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_LeakyRelu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_LeakyRelu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxLeakyRelu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(29): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: half * const half
      return a > (T)0 ? a : (T)alpha * a;
                                     ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_LeakyRelu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_LeakyRelu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_LeakyRelu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_LeakyRelu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxLeakyRelu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(29): error: ambiguous "?" operation: second operand of type "const half" can be converted to third operand type "<error-type>", and vice versa
      return a > (T)0 ? a : (T)alpha * a;
                          ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_LeakyRelu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_LeakyRelu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_LeakyRelu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_LeakyRelu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxLeakyRelu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(348): error: more than one operator ">" matches these operands:
            function "operator>(const __half &, const __half &)" (declared at line 720 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator>(const half &, const half &)" (declared at line 72)
            operand types are: half > half
  __attribute__((device)) __inline__ T _Max(T a, T b) { return a > b ? a : b; }
                                                                 ^
          detected during:
            instantiation of "T onnxruntime::cuda::_Max(T, T) [with T=half]" at line 36 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu
            instantiation of "T onnxruntime::cuda::OP_Relu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Relu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Relu<half>]" at line 119 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu
            instantiation of "void onnxruntime::cuda::Impl_Relu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxRelu *, size_t) [with T=half]" at line 119 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(43): error: more than one operator ">" matches these operands:
            function "operator>(const __half &, const __half &)" (declared at line 720 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator>(const half &, const half &)" (declared at line 72 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: const half > half
      return a > (T)0 ? (T)gamma * a : (T)gamma * (T)alpha * (_Exp(a) - (T)1);
               ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Selu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Selu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Selu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Selu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSelu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(43): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: half * const half
      return a > (T)0 ? (T)gamma * a : (T)gamma * (T)alpha * (_Exp(a) - (T)1);
                                 ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Selu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Selu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Selu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Selu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSelu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(43): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: half * half
      return a > (T)0 ? (T)gamma * a : (T)gamma * (T)alpha * (_Exp(a) - (T)1);
                                                ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Selu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Selu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Selu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Selu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSelu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(43): error: more than one operator "-" matches these operands:
            function "operator-(const __half &, const __half &)" (declared at line 612 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &, const half &)" (declared at line 24 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: half - half
      return a > (T)0 ? (T)gamma * a : (T)gamma * (T)alpha * (_Exp(a) - (T)1);
                                                                      ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Selu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Selu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Selu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Selu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSelu *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(68): error: more than one operator ">" matches these operands:
            function "operator>(const __half &, const __half &)" (declared at line 720 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator>(const half &, const half &)" (declared at line 72 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: const half > half
      if (a > (T)0)
            ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Softplus<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softplus<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softplus<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Softplus(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSoftplus *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(69): error: more than one operator "-" matches these operands:
            function "operator-(const __half &)" (declared at line 700 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &)" (declared at line 67 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: - const half
        return a + _Log(_Exp(-a) + (T)1);
                             ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Softplus<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softplus<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softplus<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Softplus(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSoftplus *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(71): error: more than one operator "+" matches these operands:
            function "operator+(const __half &, const __half &)" (declared at line 606 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator+(const half &, const half &)" (declared at line 23 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: half + half
        return _Log(_Exp(a) + (T)1);
                            ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Softplus<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softplus<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softplus<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Softplus(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSoftplus *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(351): error: more than one operator ">" matches these operands:
            function "operator>(const __half &, const __half &)" (declared at line 720 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator>(const half &, const half &)" (declared at line 72)
            operand types are: half > half
  __attribute__((device)) __inline__ T _Abs(T a) { return a > (T)0 ? a : -a; }
                                                            ^
          detected during:
            instantiation of "T onnxruntime::cuda::_Abs(T) [with T=half]" at line 78 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu
            instantiation of "T onnxruntime::cuda::OP_Softsign<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softsign<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softsign<half>]" at line 119 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu
            instantiation of "void onnxruntime::cuda::Impl_Softsign(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSoftsign *, size_t) [with T=half]" at line 119 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(351): error: more than one operator "-" matches these operands:
            function "operator-(const __half &)" (declared at line 700 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &)" (declared at line 67)
            operand types are: - half
  __attribute__((device)) __inline__ T _Abs(T a) { return a > (T)0 ? a : -a; }
                                                                         ^
          detected during:
            instantiation of "T onnxruntime::cuda::_Abs(T) [with T=half]" at line 78 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu
            instantiation of "T onnxruntime::cuda::OP_Softsign<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softsign<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softsign<half>]" at line 119 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu
            instantiation of "void onnxruntime::cuda::Impl_Softsign(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSoftsign *, size_t) [with T=half]" at line 119 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(351): error: ambiguous "?" operation: second operand of type "half" can be converted to third operand type "<error-type>", and vice versa
  __attribute__((device)) __inline__ T _Abs(T a) { return a > (T)0 ? a : -a; }
                                                                       ^
          detected during:
            instantiation of "T onnxruntime::cuda::_Abs(T) [with T=half]" at line 78 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu
            instantiation of "T onnxruntime::cuda::OP_Softsign<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softsign<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softsign<half>]" at line 119 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu
            instantiation of "void onnxruntime::cuda::Impl_Softsign(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSoftsign *, size_t) [with T=half]" at line 119 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(78): error: more than one operator "+" matches these operands:
            function "operator+(const __half &, const __half &)" (declared at line 606 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator+(const half &, const half &)" (declared at line 23 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: half + half
      return a / ((T)1. + _Abs(a));
                        ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_Softsign<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softsign<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_Softsign<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_Softsign(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxSoftsign *, size_t) [with T=half]" at line 119

/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu(92): error: more than one operator ">" matches these operands:
            function "operator>(const __half &, const __half &)" (declared at line 720 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator>(const half &, const half &)" (declared at line 72 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh)
            operand types are: const half > half
      return a > (T)alpha ? a : (T)0;
               ^
          detected during:
            instantiation of "T onnxruntime::cuda::OP_ThresholdedRelu<T>::operator()(const T &) const [with T=half]" at line 34 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::_UnaryElementWise<InT,OutT,FuncT,NumThreadsPerBlock,NumElementsPerThread>(const InT *, OutT *, FuncT, int32_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_ThresholdedRelu<half>, NumThreadsPerBlock=256, NumElementsPerThread=4]" at line 57 of /home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/unary_elementwise_impl.cuh
            instantiation of "void onnxruntime::cuda::UnaryElementWiseImpl(cudaStream_t, const InT *, OutT *, const FuncT &, size_t) [with InT=half, OutT=half, FuncT=onnxruntime::cuda::OP_ThresholdedRelu<half>]" at line 119
            instantiation of "void onnxruntime::cuda::Impl_ThresholdedRelu(cudaStream_t, const T *, T *, const onnxruntime::cuda::CtxThresholdedRelu *, size_t) [with T=half]" at line 119

32 errors detected in the compilation of "/home//src/onnxruntime/onnxruntime/core/providers/cuda/activation/activations_impl.cu".
[ 58%] Building CXX object CMakeFiles/onnxruntime_optimizer.dir/home//src/onnxruntime/onnxruntime/core/optimizer/gemm_transpose_fusion.cc.o
/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(80): error: more than one operator "+" matches these operands:
            function "operator+(const __half &, const __half &)" (declared at line 606 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator+(const half &, const half &)" (declared at line 23)
            operand types are: const __half + const __half
    r.x = lh.x + rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(81): error: more than one operator "+" matches these operands:
            function "operator+(const __half &, const __half &)" (declared at line 606 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator+(const half &, const half &)" (declared at line 23)
            operand types are: const __half + const __half
    r.y = lh.y + rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(87): error: more than one operator "-" matches these operands:
            function "operator-(const __half &, const __half &)" (declared at line 612 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &, const half &)" (declared at line 24)
            operand types are: const __half - const __half
    r.x = lh.x - rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(88): error: more than one operator "-" matches these operands:
            function "operator-(const __half &, const __half &)" (declared at line 612 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &, const half &)" (declared at line 24)
            operand types are: const __half - const __half
    r.y = lh.y - rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(94): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: const __half * const __half
    r.x = lh.x * rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(95): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: const __half * const __half
    r.y = lh.y * rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(101): error: more than one operator "/" matches these operands:
            function "operator/(const __half &, const __half &)" (declared at line 624 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator/(const half &, const half &)" (declared at line 26)
            operand types are: const __half / const __half
    r.x = lh.x / rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(102): error: more than one operator "/" matches these operands:
            function "operator/(const __half &, const __half &)" (declared at line 624 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator/(const half &, const half &)" (declared at line 26)
            operand types are: const __half / const __half
    r.y = lh.y / rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(390): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: half * const half
    return a * kHalf * (kOne + _Erf(kAlpha * a));
             ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(390): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: const half * half
    return a * kHalf * (kOne + _Erf(kAlpha * a));
                                           ^

10 errors detected in the compilation of "/home//src/onnxruntime/onnxruntime/core/providers/cuda/cuda_utils.cu".
make[2]: *** [CMakeFiles/onnxruntime_providers_cuda_obj.dir/build.make:1352: CMakeFiles/onnxruntime_providers_cuda_obj.dir/home//src/onnxruntime/onnxruntime/core/providers/cuda/cuda_utils.cu.o] Error 255
make[2]: *** Waiting for unfinished jobs....
[ 58%] Building CXX object CMakeFiles/onnxruntime_optimizer.dir/home//src/onnxruntime/onnxruntime/core/optimizer/graph_transformer.cc.o
/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(80): error: more than one operator "+" matches these operands:
            function "operator+(const __half &, const __half &)" (declared at line 606 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator+(const half &, const half &)" (declared at line 23)
            operand types are: const __half + const __half
    r.x = lh.x + rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(81): error: more than one operator "+" matches these operands:
            function "operator+(const __half &, const __half &)" (declared at line 606 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator+(const half &, const half &)" (declared at line 23)
            operand types are: const __half + const __half
    r.y = lh.y + rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(87): error: more than one operator "-" matches these operands:
            function "operator-(const __half &, const __half &)" (declared at line 612 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &, const half &)" (declared at line 24)
            operand types are: const __half - const __half
    r.x = lh.x - rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(88): error: more than one operator "-" matches these operands:
            function "operator-(const __half &, const __half &)" (declared at line 612 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator-(const half &, const half &)" (declared at line 24)
            operand types are: const __half - const __half
    r.y = lh.y - rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(94): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: const __half * const __half
    r.x = lh.x * rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(95): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: const __half * const __half
    r.y = lh.y * rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(101): error: more than one operator "/" matches these operands:
            function "operator/(const __half &, const __half &)" (declared at line 624 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator/(const half &, const half &)" (declared at line 26)
            operand types are: const __half / const __half
    r.x = lh.x / rh.x;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(102): error: more than one operator "/" matches these operands:
            function "operator/(const __half &, const __half &)" (declared at line 624 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator/(const half &, const half &)" (declared at line 26)
            operand types are: const __half / const __half
    r.y = lh.y / rh.y;
               ^

/home//src/onnxruntime/onnxruntime/core/providers/cuda/cu_inc/common.cuh(390): error: more than one operator "*" matches these operands:
            function "operator*(const __half &, const __half &)" (declared at line 618 of /usr/local/cuda/include/cuda_fp16.hpp)
            function "onnxruntime::cuda::operator*(const half &, const half &)" (declared at line 25)
            operand types are: half * const half
    return a * kHalf * (kOne + _Erf(kAlpha * a));
             ^


Visual Studio Version

No response

GCC / Compiler Version

12

@boxerab boxerab added the build build issues; typically submitted using template label Jul 14, 2023
@github-actions github-actions bot added the ep:CUDA issues related to the CUDA execution provider label Jul 14, 2023
@xadupre
Copy link
Member

xadupre commented Jul 17, 2023

Does it work with older versions of CUDA?

@boxerab
Copy link
Contributor Author

boxerab commented Jul 17, 2023

Does it work with older versions of CUDA?

Yes, it worked fine with Cuda Toolkit 12.1

@xadupre
Copy link
Member

xadupre commented Jul 17, 2023

The work with a new version of CUDA usually starts when pytorch is released with it. Can it wait? It seems the new API of CUDA includes functions implemented in onnxruntime. I think moving them in a section like #if defined(CUDA_VERSION) && CUDA_VERSION < 12020 ... #endif should work.

@boxerab
Copy link
Contributor Author

boxerab commented Jul 17, 2023

The work with a new version of CUDA usually starts when pytorch is released with it. Can it wait? It seems the new API of CUDA includes functions implemented in onnxruntime. I think moving them in a section like #if defined(CUDA_VERSION) && CUDA_VERSION < 12020 ... #endif should work.

Thanks, turns out this is a local problem on my build machine. Closing.

@agirault
Copy link

agirault commented Jan 18, 2024

It seems the new API of CUDA includes functions implemented in onnxruntime.

@xadupre @snnn could you point out which commit/MR/release tag include the fix for this? I can't find it associated with any of the issues associated to this (along with #16870 and #17531)

@snnn
Copy link
Member

snnn commented Jan 18, 2024

The latest code should work fine.

@snnn
Copy link
Member

snnn commented Jan 18, 2024

You can also try the rel-1.17.0 branch.

@agirault
Copy link

agirault commented Jan 22, 2024

Thank you. I was looking for a specific commit/version.

It seems to have been fixed in cee050f (part #16831, merged as 7b9d1f1 and included since release v1.16.0).

@snnn could we update the release notes for 1.16.0 to list this fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider
Projects
None yet
Development

No branches or pull requests

4 participants