Compilation error `more than one conversion function from "half" to a built-in type applies`
What commit version of aidge do you use
- aidge_backend_cpu@ee7f91f6 aidge/aidge_backend_cpu (v0.6.1-22-gee7f91f)
- +8f8100a0 aidge/aidge_backend_cuda (v0.6.1) (Tried with aidge master, aidge dev, and aidge/aidge_backend_cuda master)
- aidge_core@6bac4032 aidge/aidge_core (v0.6.2-145-g6bac4032)
- aidge_learning@fed5d9d0 aidge/aidge_learning (v0.3.0-4-gfed5d9d)
Conda
pkg | version | sha | channel |
---|---|---|---|
cuda-toolkit | 12.4.1 | ha804496_0 | conda-forge |
gcc | 11.4.0 | h602e360_13 | conda-forge |
Problem description
A compilation error, when using ./setup.sh --cuda --module core --module backend_cpu --module backend_cuda --module learning
in aidge
/home/bobot/Work/Projets/Deepgreen/aidge/aidge/aidge_backend_cuda/src/operator/ReduceImpl_CUDA_kernels.cu(70): error: more than one conversion function from "half" to a built-in type applies:
function "__half::operator float() const" (declared at line 204 of /home/bobot/miniforge3/include/cuda_fp16.hpp)
function "__half::operator short() const" (declared at line 222 of /home/bobot/miniforge3/include/cuda_fp16.hpp)
function "__half::operator unsigned short() const" (declared at line 225 of /home/bobot/miniforge3/include/cuda_fp16.hpp)
function "__half::operator int() const" (declared at line 228 of /home/bobot/miniforge3/include/cuda_fp16.hpp)
function "__half::operator unsigned int() const" (declared at line 231 of /home/bobot/miniforge3/include/cuda_fp16.hpp)
function "__half::operator long long() const" (declared at line 234 of /home/bobot/miniforge3/include/cuda_fp16.hpp)
function "__half::operator unsigned long long() const" (declared at line 237 of /home/bobot/miniforge3/include/cuda_fp16.hpp)
function "__half::operator __nv_bool() const" (declared at line 241 of /home/bobot/miniforge3/include/cuda_fp16.hpp)
output[out_linear_idx] = alpha * input[in_linear_idx] + beta * output[out_linear_idx];
^
detected during:
instantiation of "void duplicateElements(const T *, T *, const std::size_t *, const std::size_t *, const int *, const std::size_t *, int, int, T, T) [with T=half]" at line 115
instantiation of "void Aidge::ReduceBackward(const T *, T *, const std::vector<std::size_t, std::allocator<std::size_t>> &, const std::vector<std::size_t, std::allocator<std::size_t>> &, const std::vector<int, std::allocator<int>> &, const std::vector<std::size_t, std::allocator<std::size_t>> &, int, T, T) [with T=half]" at line 145