Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
753 Discussions

intel-llvm-sycl/dpcpp compiler linking error: soft-float / double-float modules

ct_clmsn
Novice
136 Views

Hello,

 

Not sure if this is the correct forum but, I've compiled the intel-llvm-sycl/dpcpp compiler from GitHub here specifically to use the compiler with an Intel GPU: https://github.com/intel/llvm

 

Right now, I'd like to compile a simple "hello world" program that can print out an the Intel Arc A750 GPU that I've installed on the machine.

 

I've compiled this program successfully using the Adaptive C++ compiler from here: https://adaptivecpp.github.io/

 

When using the Intel-LLVM-Sycl/dpcpp compiler with the following flags:

clang++ -DKOKKOS_DEPENDENCE -DONEDPL_USE_DPCPP_BACKEND=1 -DONEDPL_USE_OPENMP_BACKEND=0 -DONEDPL_USE_TBB_BACKEND=0 -DPSTL_USE_PARALLEL_POLICIES=0 -D_GLIBCXX_USE_TBB_PAR_BACKEND=0 -O3 -DNDEBUG -std=gnu++20 -fsycl -fsycl-unnamed-lambda -fsycl-targets=spir64 -Xsycl-target-backend "-device intel_gpu_dg2_g12" hellosycl.cpp -o hello_dg12
clang++ -DKOKKOS_DEPENDENCE -DONEDPL_USE_DPCPP_BACKEND=1 -DONEDPL_USE_OPENMP_BACKEND=0 -DONEDPL_USE_TBB_BACKEND=0 -DPSTL_USE_PARALLEL_POLICIES=0 -D_GLIBCXX_USE_TBB_PAR_BACKEND=0 -O3 -DNDEBUG -std=gnu++20 -fsycl -fsycl-unnamed-lambda -fsycl-targets=spir64 hellosycl.cpp -o hello_dg12
clang++ -DKOKKOS_DEPENDENCE -DONEDPL_USE_DPCPP_BACKEND=1 -DONEDPL_USE_OPENMP_BACKEND=0 -DONEDPL_USE_TBB_BACKEND=0 -DPSTL_USE_PARALLEL_POLICIES=0 -D_GLIBCXX_USE_TBB_PAR_BACKEND=0 -O3 -DNDEBUG -std=gnu++20 -fsycl -fsycl-unnamed-lambda -fsycl-targets=spir64 hellosycl.cpp -o hello_dg12
clang++ -DKOKKOS_DEPENDENCE -DONEDPL_USE_DPCPP_BACKEND=1 -DONEDPL_USE_OPENMP_BACKEND=0 -DONEDPL_USE_TBB_BACKEND=0 -DPSTL_USE_PARALLEL_POLICIES=0 -D_GLIBCXX_USE_TBB_PAR_BACKEND=0 -O3 -DNDEBUG -std=gnu++20 -fsycl -fsycl-targets=spir64 hellosycl.cpp -o hello_dg12

The compilation process terminates with this linking error :

/usr/bin/ld: /tmp/hello_dg12-wrapper-f79096.o: can't link soft-float modules with double-float modules

 Any assistance or help would be much appreciated! I get the impression there's a flag that's missing which tells the compiler to emulate 64 bit floating point (double precision) on the GPU architecture.

 

I also wanted to note that the `-Xsycl-targets=spir64_gen` flag causes the compiler to fail and terminate with a "gen" not supported error.

 

v/r,

Chris

0 Kudos
1 Reply
ct_clmsn
Novice
92 Views

I've tried the advice outlined in this thread https://community.intel.com/t5/Intel-Fortran-Compiler/Double-precison-on-ARC-GPU/td-p/1450217 with the understanding that those environment flags are for the fortran compiler.

The following compilation command:

IGC_EnableDPEmulation=1 SYCL_DEVICE_WHITE_LIST="" OverrideDefaultFP64Settings=1 clang++ -DKOKKOS_DEPENDENCE -DONEDPL_USE_DPCPP_BACKEND=1 -DONEDPL_USE_OPENMP_BACKEND=0 -DONEDPL_USE_TBB_BACKEND=0 -DPSTL_USE_PARALLEL_POLICIES=0 -D_GLIBCXX_USE_TBB_PAR_BACKEND=0 -O3 -DNDEBUG -std=gnu++20 -fsycl -fsycl-unnamed-lambda -fsycl-targets=spir64 hellosycl.cpp -o hello_dg12

 yields

/usr/bin/ld: /tmp/hello_dg12-wrapper-e218bb.o: can't link soft-float modules with double-float modules
/usr/bin/ld: failed to merge target specific data of file /tmp/hello_dg12-wrapper-e218bb.o

 are there comparable environment variables for the Intel sycl compiler?

0 Kudos
Reply