%global neo_major 22 %global neo_minor 03 %global neo_build 22192 Name: intel-compute-runtime Version: %{neo_major}.%{neo_minor}.%{neo_build} Release: 1%{?dist} Summary: Compute API support for Intel graphics %global optflags %{optflags} -Wno-error=odr -Wno-error=implicit-fallthrough= -Wno-error=mismatched-new-delete License: MIT URL: https://github.com/intel/compute-runtime Source0: %{url}/archive/%{version}/compute-runtime-%{version}.tar.gz # GCC 12 Patch01: 0001-std-unique_ptr-is-defined-in-header-memory.patch BuildRequires: cmake BuildRequires: make BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: intel-gmmlib-devel BuildRequires: libva-devel BuildRequires: libdrm-devel BuildRequires: intel-igc-devel BuildRequires: ninja-build #BuildRequires: libglvnd-devel #BuildRequires: ocl-icd-devel #BuildRequires: opencl-headers # level-zero to be added later on # This doesn't get added automatically, so specify it explicitly Requires: intel-igc # Let compute-runtime be a meta package for intel-ocloc and intel-opencl Requires: intel-ocloc = %{version}-%{release} Requires: intel-opencl = %{version}-%{release} Provides: bundled(sse2neon) # prelim/drm Provides: bundled(drm-uapi-helper) # drm.h and others Provides: bundled(libdrm-devel) %description The Intel Graphics Compute Runtime for oneAPI Level Zero and OpenCL Driver is an open source project providing compute API support (Level Zero, OpenCL) for Intel graphics hardware architectures (HD Graphics, Xe). %package -n intel-ocloc Summary: ocloc part of Intel Compute Runtime %description -n intel-ocloc ocloc part of Intel Compute Runtime. %package -n intel-ocloc-devel Summary: ocloc part of Intel Compute Runtime - Devel Files Requires: intel-ocloc%{?_isa} = %{version}-%{release} %description -n intel-ocloc-devel Devel files for ocloc part of Intel Compute Runtime. %package -n intel-opencl Summary: OpenCL support for Intel graphics %description -n intel-opencl OpenCL support for Intel graphics. %prep %autosetup -p1 -n compute-runtime-%{version} # Replace bundled drm.h and i915_drm.h with files provided by libdrm-devel # Uncomment once upstream gets the missing definitions #find %%{_builddir}/compute-runtime-%%{version}/third_party/uapi/ ! -name 'intel_hwconfig_types.h' ! -name 'i915_drm_prelim.h' -type f -delete #cp /usr/include/libdrm/drm_fourcc.h %%{_builddir}/compute-runtime-%%{version}/third_party/uapi/drm/ #cp /usr/include/libdrm/drm.h %%{_builddir}/compute-runtime-%%{version}/third_party/uapi/drm/ #cp /usr/include/libdrm/drm_mode.h %%{_builddir}/compute-runtime-%%{version}/third_party/uapi/drm/ #cp /usr/include/libdrm/i915_drm.h %%{_builddir}/compute-runtime-%%{version}/third_party/uapi/drm/ #cp -r %%{_builddir}/compute-runtime-%%{version}/third_party/uapi/drm %%{_builddir}/compute-runtime-%%{version}/third_party/uapi/prelim/ #cp -r %%{_builddir}/compute-runtime-%%{version}/third_party/uapi/drm %%{_builddir}/compute-runtime-%%{version}/third_party/uapi/dg1/ %build # -DNEO_DISABLE_LD_GOLD=1 for https://bugzilla.redhat.com/show_bug.cgi?id=2043178 and https://bugzilla.redhat.com/show_bug.cgi?id=2043758 # -DNEO_DISABLE_BUILTINS_COMPILATION=ON for https://github.com/intel/intel-graphics-compiler/issues/204 # -DKHRONOS_HEADERS_DIR="/usr/include/CL/" \ # -DKHRONOS_GL_HEADERS_DIR="/usr/include/GL/" \ # https://github.com/intel/compute-runtime/issues/496 %cmake \ -DCMAKE_BUILD_TYPE=Release \ -DNEO_OCL_VERSION_MAJOR=%{neo_major} \ -DNEO_OCL_VERSION_MINOR=%{neo_minor} \ -DNEO_VERSION_BUILD=%{neo_build} \ -DSUPPORT_DG1=ON \ -DSKIP_UNIT_TESTS=1 \ -DNEO_DISABLE_BUILTINS_COMPILATION=ON \ -DNEO_DISABLE_LD_GOLD=1 \ -DCL_TARGET_OPENCL_VERSION=300 \ -G Ninja %cmake_build %install %cmake_install %files %files -n intel-opencl %license LICENSE.md %{_libdir}/intel-opencl/libigdrcl.so # Uncomment once we get level-zero #%%{_libdir}/libze_intel_gpu.so* %{_sysconfdir}/OpenCL/vendors/intel.icd %files -n intel-ocloc %license LICENSE.md %{_bindir}/ocloc %{_libdir}/libocloc.so %files -n intel-ocloc-devel %{_includedir}/ocloc_api.h %doc %changelog * Mon Dec 27 2021 Frantisek Zatloukal - 22.03.22192-1 - Initial package