<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/91709>91709</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
icpx: error: ptxas command failed
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
J-shel
</td>
</tr>
</table>
<pre>
Updating this issue:
https://github.com/llvm/llvm-project/issues/90539
Hello, I'm sorry I may misunderstood relationship between icpx and clang++, but when I use icpx with DPC++ plugin to compile cloudsc-sycl, I did met some error messages seems related to LLVM/clang:
/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=o -input=CMakeFiles/dwarf-cloudsc-scc-sycl-lib.dir/cloudsc/mycpu.cpp.o -list
/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=ao -targets=sycl-fpga_aocx-intel-unknown -input=/usr/local/cuda/lib64/libcudadevrt.a -check-section -base-temp-dir=/tmp/icpx-e2ed2974b6
/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=ao -targets=sycl-fpga_aocr-intel-unknown -input=/usr/local/cuda/lib64/libcudadevrt.a -check-section -base-temp-dir=/tmp/icpx-e2ed2974b6
/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=ao -targets=sycl-fpga_aocr_emu-intel-unknown -input=/usr/local/cuda/lib64/libcudadevrt.a -check-section -base-temp-dir=/tmp/icpx-e2ed2974b6
/opt/intel/oneapi/compiler/2024.1/bin/compiler/clang-offload-bundler -type=ao -input=/usr/local/cuda/lib64/libcudadevrt.a -list
"/opt/intel/oneapi/compiler/2024.1/bin/compiler/llvm-foreach" --out-ext=o --in-file-list=/tmp/icpx-c2c23b019a/load_state-sm_80-c9c042.s --in-replace=/tmp/icpx-c2c23b019a/load_state-sm_80-c9c042.s --out-file-list=/tmp/icpx-c2c23b019a/load_state-sm_80-146846.cubin --out-replace=/tmp/icpx-c2c23b019a/load_state-sm_80-146846.cubin -- /usr/local/cuda-12.0/bin/ptxas -m64 -O3 -v --gpu-name sm_80 --output-file /tmp/icpx-c2c23b019a/load_state-sm_80-146846.cubin /tmp/icpx-c2c23b019a/load_state-sm_80-c9c042.s
ptxas info : 0 bytes gmem
ptxas info : 0 bytes gmem
ptxas fatal : Unresolved extern function 'fmin'
llvm-foreach:
icpx: error: ptxas command failed with exit code 255 (use -v to see invocation)
Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)
Target: x86_64-unknown-linux-gnu
Thread model: posix
I guess it may be related to CUDA. When using CUDA nvcc, adding -rdc=true as an compiler option may solve the "Unresolved extern function 'xxxxx' " issue. As for icpx, I found the compiler option "-fgpu-rdc", but it didn't solve my problem.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzkVluP2zYT_TX0y4CCRPn64IfNGsK3HxI0KJr2cUGRI4kNRQq8eO1_X5C0c0NRtBugfYhh6EKODs8MhzOHe69Gg3gkmzdkc1rxGCbrjv-nfkK96q28Hkl9IvXDh0XyoMwIYVIelPcRSftQ5qYQFp_eWEdYN6owxb4Sdias0_p8v9HF2d9RBMK6_LknrDvUm_ZQQMr1f6i1JewRngjbzeCtc1d4gplfYVY-GonOB2slONQ8KGv8pBboMbwgGlBiuQA3EoTmZiTsTf4_Qh8DvExo4Amix2L2osIEp_ePxQoWHUdlIFgQdl6URhDaRukF9VehMyOQSsKMAbydEdA562BG7_mIHjzi7AsrlAnm7dtf3xHWFSb3SN2urLNLjoMJqNObQb6oZF3WdoR1rGbrqiGs65X5eiZDUjsM2nJJ-2ikRgc0XBck7ckCVWaJgbSnx3f8I3ZK51DLF-4G-skpURyjWvWVVAU2TxHWzVexxEosS2WBauXDv0CbW6CBuxGDJ-0pUxuWkT9zKy40L0ij-Wjsi_nsH2Fd9AlaW8ETIRElT6-q367LPY1IPLtQcaBiQvGRehQpcYD23CMNOC80BSDD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