Closed fwyzard closed 5 months ago
@AuroraPerego @igorvorobtsov FYI
@igorvorobtsov, I've attached a preprocessed file build in a different way:
It can be used like
tar xaf gpuVertexFinder.tgz
clang++ -std=c++17 -O2 -fPIC -fsycl -Wno-deprecated-declarations -shared gpuVertexFinder.cc -o gpuVertexFinder.so
which fails with
InvalidFunctionCall: Unexpected llvm intrinsic:
llvm.fptosi.sat.i8.f64 [Src: /data/user/fwyzard/sycl/llvm/llvm-spirv/lib/SPIRV/SPIRVWriter.cpp:4544 false ]
llvm-foreach:
clang++: error: llvm-spirv command failed with exit code 8 (use -v to see invocation)
Sorry, looks like I forgot to attach the archive: gpuVertexFinder.tar.gz .
Note that I don't see this problem with icpx nightly build (20230816). However, it still fails with latest open-source build:
$ clang++ -std=c++17 -O2 -fPIC -pipe -g -fsycl gpuVertexFinder.cc -shared -o liboutput.so ... InvalidFunctionCall: Unexpected llvm intrinsic: llvm.fptosi.sat.i8.f64 [Src: /nfs/site/home/ivorobts/llvm_21082023/llvm/llvm-spirv/lib/SPIRV/SPIRVWriter.cpp:4458 false ] llvm-foreach: clang++: error: llvm-spirv command failed with exit code 8 (use -v to see invocation)
Attaching a smaller one file reproducer (no SYCL and standard library headers preprocessed): clang++ -fPIC -fsycl test.cpp -shared -o liboutput.so
Seems like we can replace call to this intrinsic with OpConvertFToS
instruction decorated with SaturatedConversion
. Its counterpart llvm.fptoui.sat
can be represented with OpConvertFToU
with the same decoration.
@LU-JOHN has added translation of the intrinsic in the translator in
commit aab0dac9225808840f1c8dbed33ce8b20549ca6e
Author: LU-JOHN <111294400+LU-JOHN@users.noreply.github.com>
Date: Mon Sep 18 11:14:34 2023 -0500
Translate llvm.fpto[s|u]i.sat.* intrinsics (#2149)
Signed-off-by: Lu, John <john.lu@intel.com>
@fwyzard @igorvorobtsov do you still observe that sort of issue or it can be closed?
I am not able to reproduce this problem anymore, so, I believe it can be closed.
Describe the bug
While building a SYCL application, clang/llvm aborts with an error about an unsupported intrinsic:
To Reproduce Please find attached a preprocessed file that reproduces the problem: gpuVertexFinder.ii.gz .
The failure can be reproduced with
using the latest nightly.
The nightly itself was built with
from the commit 8e0cc4b7a845df9389a1313a3e680babc4d87782 corresponding to the tag sycl-nightly/20230805_160000 .
The full build log is attached: build-sycl_nightly_20230805_160000.log.gz .
Environment (please complete the following information):
Additional context The program compiles and runs successfully using oneAPI 2023.2.0, and older versions of the open source SYCL compiler.