mlir/mlir.spec

400 lines
13 KiB
RPMSpec
Raw Normal View History

2023-04-06 17:12:22 +00:00
%global toolchain clang
2023-02-17 22:16:34 +00:00
%global maj_ver 16
2021-02-19 21:10:47 +00:00
%global min_ver 0
2023-06-06 17:10:10 +00:00
%global patch_ver 5
2023-03-23 18:49:11 +00:00
#global rc_ver 4
2021-06-03 04:49:39 +00:00
%global mlir_version %{maj_ver}.%{min_ver}.%{patch_ver}
2023-03-23 18:49:11 +00:00
%global mlir_srcdir mlir-%{mlir_version}%{?rc_ver:rc%{rc_ver}}.src
2020-09-02 07:05:41 +00:00
%ifarch riscv64
%global _lto_cflags %{nil}
%endif
2023-01-13 08:45:14 +00:00
# Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer
# https://bugzilla.redhat.com/show_bug.cgi?id=2158587
%undefine _include_frame_pointers
2020-09-02 07:05:41 +00:00
Name: mlir
2021-06-03 04:49:39 +00:00
Version: %{mlir_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1.0.riscv64%{?dist}
2020-09-02 07:05:41 +00:00
Summary: Multi-Level Intermediate Representation Overview
2022-09-12 11:18:56 +00:00
License: Apache-2.0 WITH LLVM-exception
2020-09-02 07:05:41 +00:00
URL: http://mlir.llvm.org
2022-01-12 10:01:26 +00:00
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{mlir_srcdir}.tar.xz
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:-rc%{rc_ver}}/%{mlir_srcdir}.tar.xz.sig
2022-08-03 09:44:49 +00:00
Source2: release-keys.asc
2023-03-23 18:49:11 +00:00
Patch0: 0001-mlir-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch
2023-02-17 22:16:34 +00:00
# Support for i686 upstream is unclear with lots of tests failling.
ExcludeArch: i686
2020-09-02 07:05:41 +00:00
2023-04-06 17:12:22 +00:00
BuildRequires: clang
2020-09-02 07:05:41 +00:00
BuildRequires: cmake
2022-02-28 10:23:27 +00:00
BuildRequires: ninja-build
2020-09-02 07:05:41 +00:00
BuildRequires: zlib-devel
BuildRequires: llvm-devel = %{version}
2023-02-17 22:16:34 +00:00
BuildRequires: llvm-googletest = %{version}
2020-09-02 07:05:41 +00:00
BuildRequires: llvm-test = %{version}
BuildRequires: python3-lit
2020-09-02 07:05:41 +00:00
# For origin certification
BuildRequires: gnupg2
%description
The MLIR project is a novel approach to building reusable and extensible
compiler infrastructure. MLIR aims to address software fragmentation,
improve compilation for heterogeneous hardware, significantly reduce
the cost of building domain specific compilers, and aid in connecting
existing compilers together.
2021-08-10 06:27:18 +00:00
%package static
Summary: MLIR static files
Requires: %{name}%{?_isa} = %{version}-%{release}
%description static
MLIR static files.
2020-09-02 07:05:41 +00:00
%package devel
Summary: MLIR development files
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: %{name}-static%{?_isa} = %{version}-%{release}
2020-09-02 07:05:41 +00:00
%description devel
MLIR development files.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
2023-03-23 18:49:11 +00:00
%autosetup -n %{mlir_srcdir} -p2
2020-09-02 07:05:41 +00:00
%build
2023-02-17 22:16:34 +00:00
%ifarch %ix86
%global debug_package %{nil}
%global _lto_cflags %{nil}
%endif
# On aarch64, dwz can take very long to process all the files. It either fails
# reaching a timeout or consumes too much RAM. Restrict its resources in
# order to stop dwz early. We prefer to miss the DWARF optimization than not
# not being able to build this package on aarch64.
%global _dwz_low_mem_die_limit_aarch64 1
%global _dwz_max_die_limit_aarch64 1000000
2023-02-17 22:16:34 +00:00
# On s390x, dwz consumes too much RAM. Restrict its resources in
# order to stop dwz early. We prefer to miss the DWARF optimization than not
# not being able to build this package on aarch64.
%global _dwz_low_mem_die_limit_s390x 1
%global _dwz_max_die_limit_s390x 1000000
2022-02-28 10:23:27 +00:00
%cmake -GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
2020-09-02 07:05:41 +00:00
-DCMAKE_SKIP_RPATH=ON \
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
2021-08-10 02:56:54 +00:00
-DLLVM_BUILD_LLVM_DYLIB=ON \
2020-09-02 07:05:41 +00:00
-DCMAKE_PREFIX_PATH=%{_libdir}/cmake/llvm/ \
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
-DLLVM_THIRD_PARTY_DIR=%{_datadir}/llvm/src/utils \
2023-03-23 18:49:11 +00:00
-DLLVM_COMMON_CMAKE_UTILS=%{_libdir}/cmake/llvm/ \
-DLLVM_BUILD_TOOLS:BOOL=ON \
2021-02-19 21:10:47 +00:00
-DLLVM_BUILD_UTILS:BOOL=ON \
2020-09-02 07:05:41 +00:00
-DMLIR_INCLUDE_DOCS:BOOL=ON \
-DMLIR_INCLUDE_TESTS:BOOL=ON \
2020-09-02 07:05:41 +00:00
-DMLIR_INCLUDE_INTEGRATION_TESTS:BOOL=OFF \
2021-02-20 01:18:13 +00:00
-DBUILD_SHARED_LIBS=OFF \
2022-03-02 09:35:14 +00:00
-DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF \
-DMLIR_BUILD_MLIR_C_DYLIB=ON \
%ifarch %ix86 ppc64le
2023-02-17 22:16:34 +00:00
-DLLVM_PARALLEL_LINK_JOBS=1 \
%endif
%ifarch %ix86
2023-02-17 22:16:34 +00:00
-DMLIR_RUN_X86VECTOR_TESTS:BOOL=OFF \
%endif
2020-09-02 07:05:41 +00:00
%if 0%{?__isa_bits} == 64
-DLLVM_LIBDIR_SUFFIX=64
%else
-DLLVM_LIBDIR_SUFFIX=
%endif
# build process .exe tools normally use rpath or static linkage
2021-02-19 21:10:47 +00:00
export LD_LIBRARY_PATH=%{_builddir}/%{mlir_srcdir}/%{name}/%{_build}/%{_lib}
2020-09-02 07:05:41 +00:00
%cmake_build
%install
%cmake_install
%check
# Remove tablegen tests, as they rely on includes from llvm/.
rm -rf test/mlir-tblgen
%ifarch %{ix86}
# TODO: Test currently fails on i686.
rm test/IR/file-metadata-resources.mlir
# TODO: There's two issues here (see https://github.com/llvm/llvm-project/issues/58357):
# 1. The async dialect hardcodes a 64-bit assumption.
# 2. The cpu runner tests call mlir-opt without awareness of the host index size.
# For this reason, skip mlir-cpu-runner tests on 32-bit.
rm -rf test/mlir-cpu-runner
# The following test requires AVX2.
rm -rf test/Dialect/Math/polynomial-approximation.mlir
# TODO: Can these vector tests pass on i386?
rm -rf test/Conversion/MathToLibm/convert-to-libm.mlir
rm -rf test/Dialect/Vector/canonicalize.mlir
rm -rf test/Dialect/Vector/vector-unroll-options.mlir
rm -rf test/Dialect/SparseTensor/sparse_vector_ops.mlir
# TODO: Investigate the following issues.
rm -rf test/mlir-pdll-lsp-server/compilation_database.test
rm -rf test/mlir-pdll-lsp-server/completion.test
rm -rf test/mlir-pdll-lsp-server/definition-split-file.test
rm -rf test/mlir-pdll-lsp-server/definition.test
rm -rf test/mlir-pdll-lsp-server/document-links.test
rm -rf test/mlir-pdll-lsp-server/document-symbols.test
rm -rf test/mlir-pdll-lsp-server/exit-eof.test
rm -rf test/mlir-pdll-lsp-server/exit-with-shutdown.test
rm -rf test/mlir-pdll-lsp-server/exit-without-shutdown.test
rm -rf test/mlir-pdll-lsp-server/hover.test
rm -rf test/mlir-pdll-lsp-server/initialize-params-invalid.test
rm -rf test/mlir-pdll-lsp-server/initialize-params.test
rm -rf test/mlir-pdll-lsp-server/inlay-hints.test
rm -rf test/mlir-pdll-lsp-server/references.test
rm -rf test/mlir-pdll-lsp-server/signature-help.test
rm -rf test/mlir-pdll-lsp-server/textdocument-didchange.test
rm -rf test/mlir-pdll-lsp-server/view-output.test
%endif
# Test execution normally relies on RPATH, so set LD_LIBRARY_PATH instead.
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
%cmake_build --target check-mlir
2020-09-02 07:05:41 +00:00
%files
%license LICENSE.TXT
2021-08-10 02:56:54 +00:00
%{_libdir}/libMLIR*.so.%{maj_ver}*
2022-08-03 09:44:49 +00:00
%{_libdir}/libmlir_async_runtime.so.%{maj_ver}*
%{_libdir}/libmlir_c_runner_utils.so.%{maj_ver}*
2023-02-17 22:16:34 +00:00
%{_libdir}/libmlir_float16_utils.so.%{maj_ver}*
2022-08-03 09:44:49 +00:00
%{_libdir}/libmlir_runner_utils.so.%{maj_ver}*
2021-08-10 02:56:54 +00:00
2021-08-10 06:27:18 +00:00
%files static
%{_libdir}/libMLIR*.a
2020-09-02 07:05:41 +00:00
%files devel
%{_bindir}/mlir-cpu-runner
%{_bindir}/mlir-linalg-ods-yaml-gen
%{_bindir}/mlir-lsp-server
%{_bindir}/mlir-opt
2023-02-17 22:16:34 +00:00
%{_bindir}/mlir-pdll
%{_bindir}/mlir-pdll-lsp-server
%{_bindir}/mlir-reduce
2020-09-03 15:51:07 +00:00
%{_bindir}/mlir-tblgen
%{_bindir}/mlir-translate
%{_bindir}/tblgen-lsp-server
2021-08-10 02:56:54 +00:00
%{_libdir}/libMLIR*.so
2022-08-03 09:44:49 +00:00
%{_libdir}/libmlir_async_runtime.so
%{_libdir}/libmlir_c_runner_utils.so
2023-02-17 22:16:34 +00:00
%{_libdir}/libmlir_float16_utils.so
2022-08-03 09:44:49 +00:00
%{_libdir}/libmlir_runner_utils.so
2020-09-02 07:05:41 +00:00
%{_includedir}/mlir
%{_includedir}/mlir-c
%{_libdir}/cmake/mlir
%changelog
* Sun Jun 25 2023 David Abdurachmanov <davidlt@rivosinc.com> - 16.0.5-1.0.riscv64
- Disable LTO on riscv64
2023-06-06 17:10:10 +00:00
* Tue Jun 06 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.5-1
- Update to LLVM 16.0.5
2023-05-20 00:09:51 +00:00
* Fri May 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.4-1
- Update to LLVM 16.0.4
2023-05-10 20:06:17 +00:00
* Wed May 10 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.3-1
- Update to LLVM 16.0.3
2023-04-27 14:58:56 +00:00
* Thu Apr 27 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.2-1
- Update to LLVM 16.0.2
2023-04-13 13:01:56 +00:00
* Thu Apr 13 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.1-1
- Update to LLVM 16.0.1
2023-04-06 17:12:22 +00:00
* Thu Apr 06 2023 Nikita Popov <npopov@redhat.com> - 16.0.0-4
- Build with clang
* Mon Apr 03 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.0-3
- Re-enable s390x builds
- Link ppc64le serially in order to avoid hitting memory limits
2023-04-03 19:00:22 +00:00
* Mon Apr 03 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.0-2
- Disable s390x builds temporarily
2023-03-23 18:49:11 +00:00
* Tue Mar 21 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.0-1
- Update to LLVM 16.0.0
* Wed Mar 15 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.0~rc4-1
- Update to LLVM 16.0.0 RC4
2023-02-23 19:51:10 +00:00
* Thu Feb 23 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.0~rc3-1
- Update to LLVM 16.0.0 RC3
2023-02-17 22:16:34 +00:00
* Wed Feb 15 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.0~rc1-1
- Update to LLVM 16.0.0 RC1
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 15.0.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
2023-01-13 08:54:22 +00:00
* Fri Jan 13 2023 Nikita Popov <npopov@redhat.com> - 15.0.7-1
- Update to LLVM 15.0.7
2023-01-13 08:45:14 +00:00
* Fri Jan 13 2023 Nikita Popov <npopov@redhat.com> - 15.0.6-3
- Omit frame pointers when building
* Thu Dec 22 2022 Nikita Popov <npopov@redhat.com> - 15.0.6-2
- rhbz#2127916: Add mlir tools to mlir-devel
2022-12-05 16:35:13 +00:00
* Mon Dec 05 2022 Nikita Popov <npopov@redhat.com> - 15.0.6-1
- Update to LLVM 15.0.6
2022-11-07 08:52:37 +00:00
* Mon Nov 07 2022 Nikita Popov <npopov@redhat.com> - 15.0.4-1
- Update to LLVM 15.0.4
* Thu Sep 15 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-4
- Rebuild
* Wed Sep 14 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-3
- Run tests during the build
* Mon Sep 12 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-2
- Add explicit requires from mlir-devel to mlir
2022-08-03 09:44:49 +00:00
* Tue Sep 06 2022 Nikita Popov <npopov@redhat.com> - 15.0.0-1
- Update to LLVM 15.0.0
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 14.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
2022-06-20 06:11:36 +00:00
* Mon Jun 20 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.5-1
- Update to 14.0.5
2022-03-02 09:35:14 +00:00
* Thu Mar 24 2022 Timm Bäder <tbaeder@redhat.com> - 14.0.0-1
- Update to 14.0.0
* Mon Feb 07 2022 Nikita Popov <npopov@redhat.com> - 13.0.1-2
- Reenable build on armv7hl
2022-02-03 09:52:01 +00:00
* Thu Feb 03 2022 Nikita Popov <npopov@redhat.com> - 13.0.1-1
- Update to LLVM 13.0.1 final
2022-02-01 08:25:01 +00:00
* Tue Feb 01 2022 Nikita Popov <npopov@redhat.com> - 13.0.1~rc3-1
- Update to LLVM 13.0.1rc3
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 13.0.1~rc2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
2022-01-14 08:19:53 +00:00
* Fri Jan 14 2022 Nikita Popov <npopov@redhat.com> - 13.0.1~rc2-1
- Update to LLVM 13.0.1rc2
2022-01-12 10:01:26 +00:00
* Wed Jan 12 2022 Nikita Popov <npopov@redhat.com> - 13.0.1~rc1-1
- Update to LLVM 13.0.1rc1
2021-10-06 01:30:53 +00:00
* Wed Oct 06 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-2
- Rebuild for llvm soname bump
2021-10-01 21:18:18 +00:00
* Fri Oct 01 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0-1
- 13.0.0 Release
2021-09-22 23:11:10 +00:00
* Wed Sep 22 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc3-1
- 13.0.0-rc3 Release
* Tue Aug 10 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc1-3
- Add -static requires back to -devel package
2021-08-10 06:27:18 +00:00
* Tue Aug 10 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc1-2
- Add back the -static sub-package
2021-08-09 23:47:07 +00:00
* Mon Aug 09 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc1-1
- 13.0.0-rc1 Release
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 12.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
2021-07-14 05:58:52 +00:00
* Tue Jul 13 2021 Tom Stellard <tstellar@redhat.com> - 12.0.1-1
- 12.0.1 Release
2021-07-01 17:56:57 +00:00
* Thu Jul 01 2021 Tom Stellard <tstellar@redhat.com> - 12.0.1~rc3-1
- 12.0.1-rc3 Release
2021-06-03 04:49:39 +00:00
* Wed Jun 02 2021 Tom Stellard <tstellar@redhat.com> - 12.0.1~rc1-1
- 12.0.1-rc1 Release
2021-04-17 05:29:05 +00:00
* Fri Apr 16 2021 Tom Stellard <tstellar@redhat.com> - 12.0.0-1
- 12.0.0 Release
2021-04-08 12:20:22 +00:00
* Thu Apr 08 2021 sguelton@redhat.com - 12.0.0-0.7.rc5
- New upstream release candidate
2021-04-02 10:32:20 +00:00
* Fri Apr 02 2021 sguelton@redhat.com - 12.0.0-0.6.rc4
- New upstream release candidate
* Wed Mar 31 2021 Jonathan Wakely <jwakely@redhat.com> - 12.0.0-0.5.rc3
- Rebuilt for removed libstdc++ symbols (#1937698)
2021-03-11 13:54:53 +00:00
* Thu Mar 11 2021 sguelton@redhat.com - 12.0.0-0.4.rc3
- LLVM 12.0.0 rc3
2021-03-10 06:34:00 +00:00
* Wed Mar 10 2021 sguelton@redhat.com - 12.0.0-0.3.rc2
- rebuilt
2021-02-24 15:25:14 +00:00
* Wed Feb 24 2021 sguelton@redhat.com - 12.0.0-0.2.rc2
- llvm 12.0.0-rc2 release
2021-02-19 21:10:47 +00:00
* Thu Feb 18 2021 sguelton@redhat.com - 12.0.0-0.1.rc1
- llvm 12.0.0-rc1 release
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 11.1.0-0.3.rc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2021-01-23 15:43:30 +00:00
* Fri Jan 22 2021 Serge Guelton - 11.1.0-0.2.rc2
- llvm 11.1.0-rc2 release
2021-01-14 16:13:17 +00:00
* Thu Jan 14 2021 Serge Guelton - 11.1.0-0.1.rc1
- 11.1.0-rc1 release
2021-01-06 09:43:25 +00:00
* Wed Jan 06 2021 Serge Guelton - 11.0.1-3
- LLVM 11.0.1 final
2020-12-22 20:45:46 +00:00
* Tue Dec 22 2020 sguelton@redhat.com - 11.0.1-2.rc2
- llvm 11.0.1-rc2
2020-12-02 10:03:22 +00:00
* Tue Dec 01 2020 sguelton@redhat.com - 11.0.1-1.rc1
- llvm 11.0.1-rc1
2020-10-15 05:26:53 +00:00
* Thu Oct 15 2020 sguelton@redhat.com - 11.0.0-1
- Fix NVR
2020-10-12 11:30:17 +00:00
* Mon Oct 12 2020 sguelton@redhat.com - 11.0.0-0.6
- llvm 11.0.0 - final release
2020-10-08 09:12:22 +00:00
* Thu Oct 08 2020 sguelton@redhat.com - 11.0.0-0.5.rc6
- 11.0.0-rc6
2020-10-02 07:15:07 +00:00
* Fri Oct 02 2020 sguelton@redhat.com - 11.0.0-0.4.rc5
- 11.0.0-rc5 Release
2020-09-27 13:20:27 +00:00
* Sun Sep 27 2020 sguelton@redhat.com - 11.0.0-0.3.rc3
- Fix NVR
2020-09-24 14:30:18 +00:00
* Thu Sep 24 2020 sguelton@redhat.com - 11.0.0-0.1.rc3
- 11.0.0-rc3 Release
2020-09-03 15:51:07 +00:00
* Wed Sep 02 2020 sguelton@redhat.com - 11.0.0-0.2.rc2
- Package mlir-tblgen
2020-09-02 07:05:41 +00:00
* Wed Aug 12 2020 Cristian Balint <cristian.balint@gmail.com> - 11.0.0-0.1.rc1
- Initial version.