Open ouankou opened 2 weeks ago
Given an OpenMP GPU program in C, running the executable built by oneapi compiler caused the following runtime error:
ouankou@yoimiya [ reduction@main ] $ icx -fiopenmp -fopenmp-targets=spir64 test.c -O0 -g ouankou@yoimiya [ reduction@main ] $ ./a.out ZE_LOADER_DEBUG_TRACE:Using Loader Library Path: ZE_LOADER_DEBUG_TRACE:Tracing Layer Library Path: libze_tracing_layer.so.1 InvalidBuiltinSetName: Expects OpenCL12, OpenCL20. Actual is NonSemantic.Shader.DebugInfo.200 [Src: /var/cache/acbs/build/acbs.nhrckcgr/intel-graphics-compiler/IGC/AdaptorOCL/SPIRV/libSPIRV/SPIRVModule.cpp:565 SPIRVBuiltinSetNameMap::rfind(BuiltinSetName, &BuiltinSet) ] terminate called after throwing an instance of 'std::runtime_error' what(): internal compiler error Aborted (core dumped) ouankou@yoimiya [ reduction@main ] $ icx -fiopenmp -fopenmp-targets=spir64 test.c -O0 ouankou@yoimiya [ reduction@main ] $ ./a.out sum = 15050
This bug is found on i9-14900K (AOSC OS WSL) and i9-11950H (AOSC OS 11.5.2). On the i9-14900K machine, ArchLinux WSL doesn't have the same issue.
On a machine with Intel GPU, install oneapi basekit
sudo oma install intel-oneapi-basekit
Download the testing C source
wget https://git.sr.ht/~ouankou/whiteboard/blob/main/openmp/reduction/test.c
Setup oneapi
. setup_intel_oneapi.sh
Compile the testing src and run
export OMP_TARGET_OFFLOAD=MANDATORY icx -fiopenmp -fopenmp-targets=spir64 test.c -O0 -g ./a.out
stable
Package: intel-oneapi-basekit Status: install ok installed Section: devel Installed-Size: 15290920 Maintainer: Bot <null@aosc.io> Architecture: amd64 Version: 2024.2.1-1 Depends: debconf (>= 1.5.87), intel-compute-runtime (>= 24.22.29735.20), nss (>= 3.103), glib (>= 2.80.0-2), mesa (>= 1:24.1.5+dxheaders1.614.0-3), libdrm (>= 2.4.122), at-spi2-core (>= 2.52.0), libxcb (>= 1.16.1), gtk-3 (>= 3.24.38-5) Description: Intel oneAPI base toolkit X-AOSC-ACBS-Version: 20240810.1 X-AOSC-Commit: 753b16c7f2-dirtyX-AOSC-Packager: Bot <null@aosc.io> X-AOSC-Autobuild4-Version: 4.3.21 Package: intel-compute-runtime Status: install ok installed Section: libs Installed-Size: 63332 Maintainer: AOSC OS Maintainers <maintainers@aosc.io> Architecture: amd64 Version: 24.31.30508.7~pre20240902T202158Z Provides: intel-opencl-icd:amd64 (= 24.31.30508.7~pre20240902T202158Z), intel-ocloc:amd64 (= 24.31.30508.7~pre20240902T202158Z), libze-intel-gpu1:amd64 (= 24.31.30508.7~pre20240902T202158Z) Depends: gcc-runtime (>= 13.2.0-8), intel-gmmlib (>= 22.5.1~pre20240902T202158Z), intel-graphics-compiler (>= 1.0.17384.11~pre20240902T202158Z) Conffiles: /etc/OpenCL/vendors/intel.icd b25b2f8f126a59a60082723f1fe84bf2 Description: Intel Graphics Compute Runtime for oneAPI Level Zero and OpenCL Driver X-AOSC-ACBS-Version: 20240810.1 X-AOSC-Commit: 0c38cea571X-AOSC-Packager: AOSC OS Maintainers <maintainers@aosc.io> X-AOSC-Autobuild4-Version: 4.3.21 Package: intel-graphics-compiler Status: install ok installed Section: devel Installed-Size: 179732 Maintainer: Bot <null@aosc.io> Architecture: amd64 Version: 1.0.17384.11 Provides: libigc1:amd64 (= 1.0.17384.11), libigc-dev:amd64 (= 1.0.17384.11), libopencl-clang15:amd64 (= 1.0.17384.11), libigdfcl1:amd64 (= 1.0.17384.11), libopencl-clang-16-dev:amd64 (= 1.0.17384.11), libigdfcl-dev:amd64 (= 1.0.17384.11), libopencl-clang-dev:amd64 (= 1.0.17384.11), libopencl-clang-14-dev:amd64 (= 1.0.17384.11), libopencl-clang-12-dev:amd64 (= 1.0.17384.11), libopencl-clang-15-dev:amd64 (= 1.0.17384.11), libopencl-clang-17-dev:amd64 (= 1.0.17384.11) Depends: gcc-runtime (>= 13.2.0-8), glibc (>= 1:2.38-6), zlib (>= 1.3.1-3) Description: An LLVM based compiler for OpenCL targeting Intel Gen graphics hardware architecture X-AOSC-ACBS-Version: 20240810.1 X-AOSC-Commit: f3c0b35ed5-dirtyX-AOSC-Packager: Bot <null@aosc.io> X-AOSC-Autobuild4-Version: 4.3.21 Package: level-zero Status: deinstall ok config-files Section: libs Installed-Size: 3480 Maintainer: AOSC OS Maintainers <maintainers@aosc.io> Architecture: amd64 Version: 1.17.39~pre20240902T202158Z Config-Version: 1.17.39~pre20240902T202158Z Provides: libze1:amd64 (= 1.17.39~pre20240902T202158Z), libze-dev:amd64 (= 1.17.39~pre20240902T202158Z) Depends: gcc-runtime (>= 13.2.0-8) Description: oneAPI Level Zero Specification Headers and Loader X-AOSC-ACBS-Version: 20240810.1 X-AOSC-Commit: 0c38cea571X-AOSC-Packager: AOSC OS Maintainers <maintainers@aosc.io> X-AOSC-Autobuild4-Version: 4.3.21
I will try to reproduce this issue.
Thank you! Please let me know if you need any other information.
Bug description
Given an OpenMP GPU program in C, running the executable built by oneapi compiler caused the following runtime error:
This bug is found on i9-14900K (AOSC OS WSL) and i9-11950H (AOSC OS 11.5.2). On the i9-14900K machine, ArchLinux WSL doesn't have the same issue.
Steps to reproduce
On a machine with Intel GPU, install oneapi basekit
Download the testing C source
Setup oneapi
Compile the testing src and run
Update channel(s)
stable
Package and version