magma-2.5.0 with cuda-9.0 - undefined double to half conversion

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
caddison
Posts: 1
Joined: Thu Jan 17, 2019 6:20 am

magma-2.5.0 with cuda-9.0 - undefined double to half conversion

Post by caddison » Thu Jan 17, 2019 6:46 am

I have a standard make.inc file, using gcc/6.4, MKL and CUDA 9.0 that I want to build for Skylakes CPUs and Pascal and Volta GPUs, so the critical lines are:

GPU_TARGET ?= Pascal Volta

...

MKLROOT ?= /opt/apps/alces/intel/psxe/2018u2/mkl
CUDADIR ?= /mnt/data1/users/software/cuda/cuda-9.0

The make goes fine for a while and then grinds to a halt trying to cast 1.0 as an FP16:

src/xhsgetrf_gpu.cpp: In function ‘magma_int_t magma_xhsgetrf_gpu(magma_int_t, magma_int_t, magmaFloat_ptr, magma_int_t, magma_int_t*, magma_int_t*, magma_mp_typ
e_t, magma_mp_type_t)’:
src/xhsgetrf_gpu.cpp:109:45: error: no matching function for call to ‘__half::__half(double)’
const magmaHalf h_one = (magmaHalf) 1.0;
^~~
In file included from /mnt/data1/users/software/cuda/cuda-9.0/include/cuda_fp16.h:1967:0,
from src/xhsgetrf_gpu.cpp:16:
/mnt/data1/users/software/cuda/cuda-9.0/include/cuda_fp16.hpp:136:25: note: candidate: __half::__half(const __half_raw&)
__CUDA_HOSTDEVICE__ __half(const __half_raw &hr) : __x(hr.x) { }

I have looked online at the API for CUDA 10.0.130 and cannot find a double to half conversion (just float to half).

What am I doing wrong? What version of CUDA do I need to use? [I tried just building for Pascal GPUs, but got the same error.]

I've seen this same problem reported in the NVIDIA Dev Forum (https://devtalk.nvidia.com/default/topi ... ing-magma/).

Should 1.0 be 1.0f or are we missing a definition in our build?

Thanks.

mgates3
Posts: 916
Joined: Fri Jan 06, 2012 2:13 pm

Re: magma-2.5.0 with cuda-9.0 - undefined double to half conversion

Post by mgates3 » Tue Apr 23, 2019 4:43 pm

I think this issue has been resolved in MAGMA's bitbucket repository (https://bitbucket.org/icl/magma). We should be having a bug fix release soon to address it.

-mark

[Sorry for the delay in posting. A misconfiguration left messages in the moderation queue.]

Post Reply