131 lines
4.9 KiB
RPMSpec
131 lines
4.9 KiB
RPMSpec
|
|
# 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 openeuler_release 1
|
||
|
|
%global so_ver 14
|
||
|
|
|
||
|
|
Name: intel-graphics-compiler
|
||
|
|
Version: %{lib_ver}
|
||
|
|
Release: %{openeuler_release}%{?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
|
||
|
|
|
||
|
|
#This package is x86 only
|
||
|
|
ExclusiveArch: x86_64
|
||
|
|
|
||
|
|
# Details for building igc tree
|
||
|
|
#<workspace>
|
||
|
|
# |- 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
|
||
|
|
%autosetup -p1 -n igc-%{version}
|
||
|
|
|
||
|
|
%build
|
||
|
|
export CFLAGS="$CFLAGS -Wno-unused-but-set-variable -Wno-unused-variable"
|
||
|
|
export CXXFLAGS="$CXXFLAGS -Wno-reorder -Wno-restrict -Wno-catch-value -Wno-unused-but-set-variable -Wno-class-memaccess -Wno-parentheses -Wno-unused-variable -Wno-unused-function -Wno-comment -Wno-pessimizing-move -Wno-range-loop-construct -Wno-sequence-point -Wno-misleading-indentation -Wno-int-in-bool-context -Wno-delete-non-virtual-dtor -Wno-sizeof-array-div -Wno-stringop-truncation -Wno-nonnull-compare -Wno-array-bounds -Wno-odr -Wno-unused-local-typedefs"
|
||
|
|
|
||
|
|
export CFLAGS=`echo $CFLAGS | %{__sed} 's/ -flto=auto -ffat-lto-objects//'`
|
||
|
|
export CXXFLAGS=`echo $CXXFLAGS | %{__sed} 's/ -flto=auto -ffat-lto-objects//'`
|
||
|
|
|
||
|
|
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}/igc-%{version}/llvm-project/ \
|
||
|
|
-DIGC_OPTION__SPIRV_TOOLS_MODE=Source \
|
||
|
|
-DLLVM_EXTERNAL_SPIRV_HEADERS_SOURCE_DIR=%{_builddir}/igc-%{version}/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
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Thu Nov 16 2023 Aubrey Li <aubrey.li@linux.intel.com> - 1.0.14828.26-1
|
||
|
|
- Initial spec file
|