New packages - Intel OpenCL (NEO)
[ci skip]
Testing the changes
- I tested the changes in this PR: YES
Ran a few OpenCL examples and cl-mem. clinfo reports more stats also
New package
- This new package conforms to the package requirements: YES
Local build testing
- I built this PR locally for my native architecture, x86_64
Could not get musl to build intel-compute-runtime. There are a few patches for execinfo, backtrace and RTLD_XXX but even sorting those out gets to a 'error code: -11'.
Comments
closes #11364
~~depends on #41132 for gmmlib bump (didn't want to add there in case it delays merge)~~
~~MIT license not in the tar for intel-vc-intrinsics yet? Was just added the other day.~~
level-zero uses git to pull spdlog(1.13.0). Void does not have a 'spdlog-devel' but it could probably be added.
Apparently this takes too much space to build, looks like it was killed - g++: fatal error: Killed signal terminated program cc1plus.
Just curious, do you happen to know how this relates to oneAPI and "level zero"? I'd love to use the oneAPI support in Blender for hardware accelerated Cycles, but even after installing intel-compute-runtime from this PR, Blender says:
Is this out of scope of this PR? Also, maybe it's because Blender is running in Flatpak? Void's Blender doesn't show the oneAPI tab, I guess it's compiled out or something.
I think I originally had a level-zero package but it looked like nothing used it. Can take another look and try to see if Blender picks anything up. Need to bump this anyway. Hopefully sometime tomorrow.
I added level-zero back, that may be enough for the Flatpak to pick up ?
But it looks like building Blender with CYCLES_OPENAPI requires SYCL and a bunch of Intel ONEAPI packages for compilers. Not sure what all is involved, looks like a lot. Don't feel great about adding to this.
Good news for me though, Blender 3.5 doesn't need ffmpeg6 patches :)
Unfortunately, installing level-zero from here wasn't enough to get Blender from Flatpak to pick up the GPU. I tried having a look around the Blender source code for loading oneAPI but I still don't really understand it. I think I'll ask over at the Blender Flatpak issue tracker to see if anyone knows how this is supposed to work.
I got your Blender and SYCL templates building, and it in Cycles Render Devices, it shows CUDA and HIP, but OptiX and oneAPI are missing compared to the Flatpak version.
Thanks a lot for the help, though! \o/
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
still waiting on https://github.com/void-linux/void-packages/pull/41132
Apologies in advance if this is the wrong place for this.
But I can't seem to install this, it's failing at compiling intel-compute-runtime, the rest was fine. Looks like its complaining about Raptor Lake or something...
Here's the logs of do_build:
do_build.txt
If it matters at all, I'm on an i7-8665U.
Here's the logs of
do_build: do_build.txt
sry for late reply. still builds fine for me, just did a clean rebuild. i remember getting those types of errors and i think it was gmmlib not being updated before.
Updated version and verified the cl-mem example still works.
Bumped oneVPL, intel-media-driver and intel-gmmlib. Can put those in different PRs if it matters. (also oneVPL is now 'libvpl' and has a version change that is lower... didn't mess with that as I didn't see a difference with a quick test or anything important on the release page)
intel-opencl-clang seems to not be building.
Logs
$ ./xbps-src pkg -j2 intel-compute-runtime
=> xbps-src: updating repositories for host (x86_64)...
[*] Updating repository `https://repo-default.voidlinux.org/current/bootstrap/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/debug/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/bootstrap/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://repo-default.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...
=> xbps-src: updating software in / masterdir...
=> xbps-src: cleaning up / masterdir...
=> intel-compute-runtime-23.52.28202.14_1: removing autodeps, please wait...
=> intel-compute-runtime-23.52.28202.14_1: building with [cmake] for x86_64...
[host] cmake-3.27.6_1: found (https://repo-default.voidlinux.org/current)
[host] pkg-config-0.29.2_3: found (https://repo-default.voidlinux.org/current)
[host] cmake-bootstrap-3.27.6_2: found (https://repo-default.voidlinux.org/current/bootstrap)
[host] ninja-1.11.1_4: found (https://repo-default.voidlinux.org/current)
[target] gcc-13.2.0_2: found (https://repo-default.voidlinux.org/current)
[target] intel-gmmlib-devel-22.3.17_1: found (/host/binpkgs/level-zero)
[target] libva-devel-2.20.0_1: found (https://repo-default.voidlinux.org/current)
[target] ocl-icd-devel-2.3.2_2: found (https://repo-default.voidlinux.org/current)
[target] intel-opencl-clang-15.0.0_1: not found
[target] intel-graphics-compiler-1.0.15770.11_1: not found
[target] level-zero-devel-1.15.8_1: found (/host/binpkgs/level-zero)
[target] intel-metrics-library-1.0.156_1: not found
[target] intel-metrics-discovery-1.12.170_1: not found
[runtime] intel-graphics-compiler-1.0.15770.11_1: not found
=> intel-opencl-clang-15.0.0_1: building with [cmake] (dependency of intel-compute-runtime) for x86_64...
[host] cmake-3.27.6_1: found (https://repo-default.voidlinux.org/current)
[host] cmake-bootstrap-3.27.6_2: found (https://repo-default.voidlinux.org/current/bootstrap)
[host] ninja-1.11.1_4: found (https://repo-default.voidlinux.org/current)
[target] llvm-17_2: found (https://repo-default.voidlinux.org/current)
[target] clang-17_2: found (https://repo-default.voidlinux.org/current)
[target] clang-tools-extra-17_2: found (https://repo-default.voidlinux.org/current)
[target] SPIRV-LLVM-Translator-devel-17.0.0_1: found (https://repo-default.voidlinux.org/current)
=> intel-opencl-clang-15.0.0_1: installing host dependencies: cmake-3.27.6_1 cmake-bootstrap-3.27.6_2 ninja-1.11.1_4 ...
=> intel-opencl-clang-15.0.0_1: installing target dependencies: llvm-17_2 clang-17_2 clang-tools-extra-17_2 SPIRV-LLVM-Translator-devel-17.0.0_1 ...
=> intel-opencl-clang-15.0.0_1: running do-fetch hook: 00-distfiles ...
=> intel-opencl-clang-15.0.0_1: running do-extract hook: 00-distfiles ...
=> intel-opencl-clang-15.0.0_1: extracting distfile(s), please wait...
=> intel-opencl-clang-15.0.0_1: running do-patch hook: 00-patches ...
=> intel-opencl-clang-15.0.0_1: running pre-configure hook: 00-gnu-configure-asneeded ...
=> intel-opencl-clang-15.0.0_1: running pre-configure hook: 01-override-config ...
=> intel-opencl-clang-15.0.0_1: running pre-configure hook: 02-script-wrapper ...
=> intel-opencl-clang-15.0.0_1: running do_configure ...
CMake Warning (dev) at CMakeLists.txt:1 (project):
cmake_minimum_required() should be called prior to this top-level project()
call. Please see the cmake-commands(7) manual for usage documentation of
both commands.
This warning is for project developers. Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- [OPENCL-CLANG] Looking for LLVM version 15.0.0
CMake Error at CMakeLists.txt:31 (find_package):
By not providing "FindLLVM.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "LLVM", but
CMake did not find one.
Could not find a package configuration file provided by "LLVM" (requested
version 15.0.0) with any of the following names:
LLVMConfig.cmake
llvm-config.cmake
Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
"LLVM_DIR" to a directory containing one of the above files. If "LLVM"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
=> ERROR: intel-opencl-clang-15.0.0_1: do_configure: 'CFLAGS="-DNDEBUG ${CFLAGS/ -pipe / }" CXXFLAGS="-DNDEBUG ${CXXFLAGS/ -pipe / }" cmake ${cmake_args} ${configure_args} ${LIBS:+-DCMAKE_C_STANDARD_LIBRARIES="$LIBS"} ${LIBS:+-DCMAKE_CXX_STANDARD_LIBRARIES="$LIBS"} ${wrksrc}/${build_wrksrc}' exited with 1
=> ERROR: in do_configure() at common/build-style/cmake.sh:77
For reference: https://github.com/intel/intel-graphics-compiler/issues/289 - seems like llvm16+ isn't really supported yet. With llvm17 update it appears 15 dev packages are gone. Going to change this to a WIP then for the time being.
for i in intel-vc-intrinsics intel-opencl-clang intel-graphics-compiler intel-metrics-library intel-metrics-discovery intel-compute-runtime ; do ./xbps-src pkg $i || break ; done
intel-graphics-compiler fails
build log igc.txt
Well back to use a container for sycl development then :)
Maybe splitting the intel-media-driver and intel-gmmlib would be a nice move.
Thanks for the hard work !
Thanks. I could move other packages out. I've seen mixed opinions on putting stuff in one PR vs separate and it seems situational. If anyone has something they want now I can make a PR or someone else can and I'll cut it out of here.
I really expect this one to be merged, thank you for your efforts :)
Calandracas said clang/llvm/spirv 15 devel packages shouldn't be a problem. Though ik they take forever to build. If those get put in, this should be buildable again. musl will probably still have an issue
I adapted this PR locally and downgraded all relevant packages to build against LLVM 15, and this seems to work for me. I tested it with clinfo.
However the LLVM 17 builds do not compile on my machine.
Good news - able to compile and run opencl with llvm/clang/spirv 15.
Bad news - 6.7.3 kernel works for opencl on 6700k and a A770, but 6.8.0+ appears to have broken opencl (clinfo shows 0 devices)
newer libraries allow for running on newer kernels. working again
https://github.com/intel/media-driver/commit/632f240ad830655de7cb50893fc7884f530c9c37
Should be good for musl now. Will try to do arm/musl mix builds in a day or few.
https://github.com/intel/intel-graphics-compiler/issues/332
intel-graphics-compile not working for musl
Sounds like only llvm14 is officially supported. 14 was never in void (12 -> 15) and trying to build it falls to some 'swig' error? https://forums.gentoo.org/viewtopic-p-8755491.html?sid=216b6b968a7d942265029bf44921e1b0
Removed archs=x86_64* for musl. Not sure who is using musl for Intel openCL but for now I guess it's not doable unless someone else can figure out what's segfaulting and fix it. (See the above issue for vcb failing)
this is neat.
I'm probably going to version the spirv translator in llvm19, so it's good that you did it here
there's a lot of junk in the llvm14 package that's only needed for cross compiling. if its x86_64 only, you can safely remove it
ya i can remove it. afaik intel only supports x86_64 and i dont think anyone would try to use some intel gpu in a arm box anyway. will update once the vpl stuff goes through because i'm lazy and dont want to build llvm extra if i dont have to
look at the SPIRV-LLVM-Translator changes here: https://github.com/void-linux/void-packages/pull/51592/files