Closed
Description
Describe the bug
[CUDA] Failed to build crossEntropy with error in backend: Cannot select: t38: v2f16 = bitcast t37
To Reproduce
- Get SYCL with CUDA support (GSG)
- Build attached source file: crossEntropy_for_external.cpp.txt
clang++ -fsycl -fsycl-unnamed-lambda -fsycl-targets=nvptx64-nvidia-cuda-sycldevice crossEntropy_for_external.cpp -o crossEntropy.run -lOpenCL
Error message:
clang++: warning: argument 'nvptx64-nvidia-cuda-sycldevice' is deprecated, use 'nvptx64-nvidia-cuda' instead [-Wdeprecated]
warning: linking module 'remangled-l64-signed_char.libspirv-nvptx64--nvidiacl.bc': Linking two modules of different target triples: 'remangled-l64-signed_char.libspirv-nvptx64--nvidiacl.bc' is 'nvptx64-unknown-nvidiacl' whereas 'crossEntropy_for_external.cpp' is 'nvptx64-nvidia-cuda'
[-Wlinker-warnings]
1 warning generated.
fatal error: error in backend: Cannot select: t38: v2f16 = bitcast t37
t37: f32,ch = CopyFromReg t0, Register:f32 %7
t36: f32 = Register %7
In function: _ZZZ15loss_fwd_kernelIN2cl4sycl6detail9half_impl4halfEENS1_5eventERNS1_5queueEPT_PlSA_S9_S9_S9_S9_ENKUlRNS1_7handlerEE_clESC_ENKUlNS1_7nd_itemILi3EEEE_clESF_
llvm-foreach:
clang++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (https://github.com/intel/llvm.git 8ec97550b7a84e5d2483f4891059f80abd8db39c)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: <path to built sycl>
clang++: note: diagnostic msg: Error generating preprocessed source(s).
Environment
- OS: Linux
- Target device and vendor: Nvidia GPU
- DPC++ version: https://github.com/intel/llvm.git 8ec9755
- CUDA version:
nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.57.02 Driver Version: 470.57.02 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+