diff --git a/igc-1.0.14828.26.tar.gz.part00 b/igc-1.0.14828.26.tar.gz.part00 new file mode 100644 index 0000000000000000000000000000000000000000..7719aa92ed24a89b485dbcc581bafbd4f97ed7a9 Binary files /dev/null and b/igc-1.0.14828.26.tar.gz.part00 differ diff --git a/igc-1.0.14828.26.tar.gz.part01 b/igc-1.0.14828.26.tar.gz.part01 new file mode 100644 index 0000000000000000000000000000000000000000..4af8085a5f38ab2a1b95783c1e8ee25162e035e3 Binary files /dev/null and b/igc-1.0.14828.26.tar.gz.part01 differ diff --git a/igc-1.0.14828.26.tar.gz.part02 b/igc-1.0.14828.26.tar.gz.part02 new file mode 100644 index 0000000000000000000000000000000000000000..b87ecb90c566ee47a10c73669ff5320fa457854d Binary files /dev/null and b/igc-1.0.14828.26.tar.gz.part02 differ diff --git a/igc-1.0.14828.26.tar.gz.part03 b/igc-1.0.14828.26.tar.gz.part03 new file mode 100644 index 0000000000000000000000000000000000000000..d2d20f75c0dfc365f70ebd50e9504379d59899be Binary files /dev/null and b/igc-1.0.14828.26.tar.gz.part03 differ diff --git a/igc.spec b/igc.spec new file mode 100644 index 0000000000000000000000000000000000000000..824c7e4e43cc0d092981a6a93f8f9fe2bc9c86d5 --- /dev/null +++ b/igc.spec @@ -0,0 +1,137 @@ +# Copyright (C) 2023 Intel Corporation +# SPDX-License-Identifier: MIT +# +# This package is downstreamed from Intel GPU RHEL9.2 Package repository: +# https://dgpu-docs.intel.com/driver/installation.html#rhel-install-steps + +%global lib_ver 1.0.14828.26 +%global lib_rel 1 +%global so_ver 14 + +Name: intel-graphics-compiler +Version: %{lib_ver} +Release: %{lib_rel}%{?dist} +Summary: Intel(R) Graphics Compiler for OpenCL(TM) +License: MIT +Group: System Environment/Libraries +URL: https://github.com/intel/intel-graphics-compiler +Source0: igc-%{version}.tar.gz.part00 +Source1: igc-%{version}.tar.gz.part01 +Source2: igc-%{version}.tar.gz.part02 +Source3: igc-%{version}.tar.gz.part03 + +#This package is x86 only +ExclusiveArch: x86_64 i686 + +# Details for building igc tree +# +# |- igc https://github.com/intel/intel-graphics-compiler, tag: igc-1.0.14828.26 +# |- vc-intrinsics https://github.com/intel/vc-intrinsics, tag: v0.13.0 +# |- SPIRV-Tools https://github.com/KhronosGroup/SPIRV-Tools, main/8ee3ae5244f5 +# |- SPIRV-Headers https://github.com/KhronosGroup/SPIRV-Headers, main/be3c81e3fdd1 +# |- llvm-project https://github.com/llvm/llvm-project, release/14.x, tag: llvmorg-14.0.5 +# |- llvm/projects/opencl-clang https://github.com/intel/opencl-clang, ocl-open-140/980f1691c5ba +# |- llvm/projects/llvm-spirv https://github.com/KhronosGroup/SPIRV-LLVM-Translator, llvm_release_140/9f4955693403 + +BuildRequires: cmake gcc-c++ make patch flex bison python3 pkg-config +BuildRequires: libxml2-devel git valgrind python3-mako spirv-tools-devel + +%description +Intel(R) Graphics compiler for OpenCL(TM) +The Intel(R) Graphics Compiler for OpenCL(TM) is an llvm based compiler +for OpenCL(TM) targeting Intel Gen graphics hardware architecture. + +%package -n intel-igc-core +Summary: Intel(R) Graphics Compiler Core +%description -n intel-igc-core +Intel graphics compiler for OpenCL -- core libs +The Intel(R) Graphics Compiler for OpenCL(TM) is an llvm based compiler +for OpenCL(TM) targeting Intel Gen graphics hardware architecture. +This package includes the core libraries. + +%package -n intel-igc-opencl +Summary: Intel(R) Graphics Compiler Frontend +Requires: intel-igc-core = %{version} +%description -n intel-igc-opencl +Intel graphics compiler for OpenCL -- OpenCL library +The Intel(R) Graphics Compiler for OpenCL(TM) is an llvm based compiler +for OpenCL(TM) targeting Intel Gen graphics hardware architecture. +This package includes the library for OpenCL. + +%package -n intel-igc-opencl-devel +Summary: Intel(R) Graphics Compiler development package +Requires: intel-igc-opencl = %{version} +%description -n intel-igc-opencl-devel +Intel graphics compiler for OpenCL -- OpenCL development files +The Intel(R) Graphics Compiler for OpenCL(TM) is an llvm based compiler +for OpenCL(TM) targeting Intel Gen graphics hardware architecture. +This package includes files for IGC OpenCL development. + +%prep +# In order to work around the file size limit of gitee +rm -rf build +cp %{SOURCE0} . +cp %{SOURCE1} . +cp %{SOURCE2} . +cp %{SOURCE3} . +cat igc-%{version}.tar.gz.part* > igc-%{version}.tar.gz +rm igc-%{version}.tar.gz.part* +tar zxf igc-%{version}.tar.gz --strip-components=1 + +%build +mkdir build +pushd build +cmake ../igc \ + -Wno-dev \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DLLVM_ENABLE_Z3_SOLVER=OFF \ + -DIGC_OPTION__ARCHITECTURE_TARGET=Linux64 \ + -DIGC_OPTION__LLVM_MODE=Source \ + -DIGC_OPTION__LLVM_SOURCES_DIR=%{_builddir}/llvm-project/ \ + -DIGC_OPTION__SPIRV_TOOLS_MODE=Source \ + -DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=%{_builddir}/SPIRV-Headers +%make_build +popd + +%install +pushd build +%make_install +rm -fv $RPM_BUILD_ROOT/usr/bin/GenX_IR +rm -fv $RPM_BUILD_ROOT/usr/bin/clang-%{so_ver} +rm -fv $RPM_BUILD_ROOT/usr/bin/lld +# Change permissions otherwise opencl install will fail +chmod +x $RPM_BUILD_ROOT/usr/lib64/libopencl-clang.so.%{so_ver} +popd + +%files -n intel-igc-core +%defattr(-,root,root) +%license ./igc/LICENSE.md +/usr/lib64/libiga64.so.* +/usr/lib64/libigc.so.* +/usr/bin/iga64 + +%files -n intel-igc-opencl +%defattr(-,root,root) +%license ./igc/LICENSE.md +/usr/lib64/libopencl-clang.so.%{so_ver} +/usr/lib64/libigdfcl.so.* +/usr/include/opencl-c.h +/usr/include/opencl-c-base.h + +%files -n intel-igc-opencl-devel +%defattr(-,root,root) +/usr/include/igc/* +/usr/include/iga/* +/usr/include/visa/* +/usr/lib64/libiga64.so +/usr/lib64/libigc.so +/usr/lib64/libigdfcl.so +/usr/lib64/pkgconfig/* +/usr/lib64/igc/NOTICES.txt + +%doc + +%changelog +* Thu Nov 16 2023 Aubrey Li - 1.0.14828.26-1 +- Initial spec file