Compare commits

...

53 Commits

Author SHA1 Message Date
0be293ffd3
Add support for riscv64
Tests are allowed to fail to gather information about failing ones.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-10-14 13:55:09 +03:00
Timm Bäder
bfcabf0eac Update to 19.1.0 2024-09-19 17:22:28 +02:00
Timm Bäder
dff7e0feb4 Update to 19.1.0-rc4 2024-09-19 17:22:22 +02:00
Fedora Release Engineering
2a6c26ec46 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-18 18:19:57 +00:00
Jesus Checa Hidalgo
532a4de271 18.1.8 Release 2024-07-12 11:57:17 +02:00
Tom Stellard
668f732dd7 18.1.7 Release 2024-06-13 22:38:23 +00:00
Python Maint
44229aecf4 Rebuilt for Python 3.13 2024-06-08 08:09:50 +02:00
Tom Stellard
896d5c5fde 18.1.6 Release 2024-05-21 00:47:44 +00:00
Tom Stellard
51ab4109c9 18.1.4 Release 2024-05-03 13:19:00 +00:00
Tom Stellard
fb8fe50863 18.1.3 Release 2024-04-17 18:39:37 +00:00
Tom Stellard
cffd46bf2d 18.1.2 Release 2024-03-22 04:54:32 +00:00
Tom Stellard
cd572a4cfa 18.1.1 Release 2024-03-12 15:18:28 +00:00
Tom Stellard
f82feb738d 18.1.0-rc4 Release 2024-02-29 06:11:51 +00:00
Fedora Release Engineering
01867b26d4 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-25 07:36:13 +00:00
Fedora Release Engineering
574ae14071 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-21 08:21:45 +00:00
Tulio Magno Quites Machado Filho
d863d6bd20 Update to LLVM 17.0.6 2023-11-29 13:58:00 -03:00
Tulio Magno Quites Machado Filho
9fa3d4359a Update to LLVM 17.0.4 2023-11-01 22:31:02 -03:00
Tulio Magno Quites Machado Filho
fd21b9a2ec Update to LLVM 17.0.3 2023-10-18 04:05:49 -03:00
Tulio Magno Quites Machado Filho
3e450e4b88 Restrict the number of jobs based on RAM
There have been builds failing recently because the number of jobs was
too high causing processes to be killed due to OOM.
Reuse the same mechanism available on flang in order to restrict the
number of jobs.
2023-10-05 12:05:44 -03:00
Tulio Magno Quites Machado Filho
b952a4ffcc Update to LLVM 17.0.2 2023-10-05 12:05:29 -03:00
Tulio Magno Quites Machado Filho
b5fbdbd8e5 Update to LLVM 17.0.1 2023-09-23 17:50:46 -03:00
Tulio Magno Quites Machado Filho
402f799ebd Update to LLVM 17.0.0 RC4 2023-09-10 08:41:13 -03:00
Tulio Magno Quites Machado Filho
40e722027e Restrict link jobs on aarch64
Try to reduce the chances of memory exhaustion when linking mlir on aarch64.
2023-09-08 19:27:50 -03:00
Tulio Magno Quites Machado Filho
d5802648fa Enable Python bindings
Create package python3-mlir that distributes all the MLIR Python bindings.
2023-09-06 08:10:31 -03:00
Tulio Magno Quites Machado Filho
037ead5935 Restrict link jobs on x86_64
Try to reduce the chances of memory exhaustion when linking mlir on x86_64.
2023-08-28 10:03:47 -03:00
Tulio Magno Quites Machado Filho
019c81d3ab Update to LLVM 17.0.0 RC3 2023-08-25 19:09:36 -03:00
Tulio Magno Quites Machado Filho
a2714c30e0 Update to LLVM 17.0.0 RC2 2023-08-23 15:18:16 -03:00
Tulio Magno Quites Machado Filho
5018058d45 Update to LLVM 17.0.0 RC1 2023-08-11 10:27:16 -03:00
Fedora Release Engineering
56c706c034 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 15:26:40 +00:00
Tulio Magno Quites Machado Filho
366c00fbd0 Update to LLVM 16.0.6 2023-07-10 15:29:53 -03:00
Nikita Popov
001d44fe22 Use llvm-cmake-utils package 2023-06-15 17:03:30 +02:00
Tulio Magno Quites Machado Filho
34e5ccbe26 Update to LLVM 16.0.5 2023-06-06 14:10:10 -03:00
Tulio Magno Quites Machado Filho
daf8afb754 Update to LLVM 16.0.4 2023-05-19 21:09:51 -03:00
Tulio Magno Quites Machado Filho
7eacdb93c8 Update to LLVM 16.0.3 2023-05-10 17:06:17 -03:00
Tulio Magno Quites Machado Filho
751fb3fb46 Update to LLVM 16.0.2 2023-04-27 11:58:56 -03:00
Tulio Magno Quites Machado Filho
eb160436fa Update to LLVM 16.0.1 2023-04-13 10:01:56 -03:00
Nikita Popov
c47520ce45 Build with clang 2023-04-06 19:13:06 +02:00
Tulio Magno Quites Machado Filho
5f0584640a Deal with memory limits on ppc64le and s390x
- Decrease dwz limits on s390x.
- Link ppc64le files with a single job.
2023-04-04 18:08:09 -03:00
Tulio Magno Quites Machado Filho
e01cab0851 Disable s390x builds temporarily 2023-04-03 16:00:22 -03:00
Tulio Magno Quites Machado Filho
a67f2a093a Update to LLVM 16.0.0 2023-03-27 12:22:58 -03:00
Tulio Magno Quites Machado Filho
579338f8dc Stop building on i686
The test results have worsen recently and it's unclear if upstream has
been actively supporting i686.
2023-03-23 15:49:42 -03:00
Tulio Magno Quites Machado Filho
806f38d805 Update to LLVM 16.0.0 RC4
Start using LLVM_THIRD_PARTY_DIR in order to remove
0001-Changes-the-path-to-gtest.patch.
2023-03-23 15:49:42 -03:00
Tulio Magno Quites Machado Filho
53b54148fb Tune dwz on aarch64
Reduce the dwz limits on aarch64 in order to reduce memory footprint and
avoid OOMs.
2023-03-15 16:53:33 -03:00
Tulio Magno Quites Machado Filho
94faead4aa Disable tests on i386
Some of these tests should not be executed on i386, but most of them
need to be reviewed first if they are safe to run or not.
2023-03-15 16:52:19 -03:00
Tulio Magno Quites Machado Filho
328986c9eb Update to LLVM 16.0.0 RC3 2023-02-23 16:51:10 -03:00
Tulio Magno Quites Machado Filho
8b50db1b55 Remove many entries from .gitignore
Replace them with a new globs.
2023-02-23 16:12:57 -03:00
Tulio Magno Quites Machado Filho
22454e1cd5 Update to LLVM 16.0.0 RC1 2023-02-23 16:12:46 -03:00
Fedora Release Engineering
f258df125a Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 20:25:44 +00:00
Nikita Popov
48083a1fc9 Update to LLVM 15.0.7 2023-01-13 09:54:22 +01:00
Nikita Popov
9efc5db023 Omit frame pointers when building 2023-01-13 09:46:05 +01:00
Nikita Popov
600e14fd37 Add gating.yaml 2023-01-02 14:53:11 +01:00
Nikita Popov
6eee1753a8 rhbz#2127916: Add mlir tools to mlir-devel 2022-12-23 16:17:26 +01:00
Nikita Popov
b9db26a7fb Update to LLVM 15.0.6 2022-12-05 17:35:13 +01:00
6 changed files with 548 additions and 76 deletions

63
.gitignore vendored
View File

@ -1,60 +1,3 @@
/llvm-project-11.0.0rc2.tar.xz
/llvm-project-11.0.0rc2.tar.xz.sig
/llvm-project-11.0.0rc3.tar.xz
/llvm-project-11.0.0rc3.tar.xz.sig
/llvm-project-11.0.0rc5.tar.xz
/llvm-project-11.0.0rc5.tar.xz.sig
/llvm-project-11.0.0rc6.tar.xz
/llvm-project-11.0.0rc6.tar.xz.sig
/llvm-project-11.0.0.tar.xz.sig
/llvm-project-11.0.0.tar.xz
/llvm-project-11.0.1rc1.src.tar.xz
/llvm-project-11.0.1rc1.src.tar.xz.sig
/llvm-project-11.0.1rc2.src.tar.xz
/llvm-project-11.0.1rc2.src.tar.xz.sig
/llvm-project-11.0.1.src.tar.xz
/llvm-project-11.0.1.src.tar.xz.sig
/llvm-project-11.1.0rc1.src.tar.xz
/llvm-project-11.1.0rc1.src.tar.xz.sig
/llvm-project-11.1.0rc2.src.tar.xz
/llvm-project-11.1.0rc2.src.tar.xz.sig
/llvm-project-12.0.0rc1.src.tar.xz
/llvm-project-12.0.0rc1.src.tar.xz.sig
/llvm-project-12.0.0rc2.src.tar.xz
/llvm-project-12.0.0rc2.src.tar.xz.sig
/llvm-project-12.0.0rc3.src.tar.xz
/llvm-project-12.0.0rc3.src.tar.xz.sig
/llvm-project-12.0.0rc4.src.tar.xz
/llvm-project-12.0.0rc4.src.tar.xz.sig
/llvm-project-12.0.0rc5.src.tar.xz
/llvm-project-12.0.0rc5.src.tar.xz.sig
/llvm-project-12.0.0.src.tar.xz
/llvm-project-12.0.0.src.tar.xz.sig
/llvm-project-12.0.1rc1.src.tar.xz
/llvm-project-12.0.1rc1.src.tar.xz.sig
/llvm-project-12.0.1rc3.src.tar.xz
/llvm-project-12.0.1rc3.src.tar.xz.sig
/llvm-project-12.0.1.src.tar.xz
/llvm-project-12.0.1.src.tar.xz.sig
/llvm-project-13.0.0rc1.src.tar.xz
/llvm-project-13.0.0rc1.src.tar.xz.sig
/llvm-project-13.0.0rc3.src.tar.xz
/llvm-project-13.0.0rc3.src.tar.xz.sig
/llvm-project-13.0.0.src.tar.xz
/llvm-project-13.0.0.src.tar.xz.sig
/llvm-project-13.0.1rc1.src.tar.xz
/llvm-project-13.0.1rc1.src.tar.xz.sig
/llvm-project-13.0.1rc2.src.tar.xz
/llvm-project-13.0.1rc2.src.tar.xz.sig
/llvm-project-13.0.1rc3.src.tar.xz
/llvm-project-13.0.1rc3.src.tar.xz.sig
/llvm-project-13.0.1.src.tar.xz
/llvm-project-13.0.1.src.tar.xz.sig
/llvm-project-14.0.0.src.tar.xz
/llvm-project-14.0.0.src.tar.xz.sig
/llvm-project-14.0.5.src.tar.xz.sig
/llvm-project-14.0.5.src.tar.xz
/llvm-project-15.0.0.src.tar.xz
/llvm-project-15.0.0.src.tar.xz.sig
/llvm-project-15.0.4.src.tar.xz
/llvm-project-15.0.4.src.tar.xz.sig
/*.tar.xz
/*.tar.xz.sig
/*.src.rpm

View File

@ -0,0 +1,129 @@
From 17ff6161b83e6a5e86fcb6a13c5551bba1438405 Mon Sep 17 00:00:00 2001
From: Erick Ochoa <github@ceci-nest-pas.me>
Date: Thu, 12 Sep 2024 21:16:58 -0400
Subject: [PATCH 1/9] [CMake] Add missing dependency (#108461)
The [`mlir-capi-execution-engine-test` test
executable](https://github.com/llvm/llvm-project/blob/main/mlir/test/CAPI/CMakeLists.txt#L26-L34)
```cmake
if(MLIR_ENABLE_EXECUTION_ENGINE)
_add_capi_test_executable(mlir-capi-execution-engine-test
execution_engine.c
LINK_LIBS PRIVATE
MLIRCAPIConversion
MLIRCAPIExecutionEngine
MLIRCAPIRegisterEverything
)
endif()
```
is run by lit tests, but it is not properly listed as a dependency. It
is added in places conditionally across the file
[`tests/CMakeLists.txt`](https://github.com/llvm/llvm-project/blob/main/mlir/test/CMakeLists.txt#L130-L143)
```cmake
# The native target may not be enabled, in this case we won't
# run tests that involves executing on the host: do not build
# useless binaries.
if(LLVM_ENABLE_PIC AND TARGET ${LLVM_NATIVE_ARCH})
list(APPEND MLIR_TEST_DEPENDS
mlir-cpu-runner
llc
mlir_async_runtime
mlir-capi-execution-engine-test
mlir_c_runner_utils
mlir_runner_utils
mlir_float16_utils
)
endif()
```
But this condition is not the same as the one where the test executable
is added. [It has been reported on discord that the following error
occurred:](https://discord.com/channels/636084430946959380/642426447167881246/1283811636725022730)
```
FAIL: MLIR :: CAPI/execution_engine.c (2 of 2121)
******************** TEST 'MLIR :: CAPI/execution_engine.c' FAILED ********************
Exit Code: 127
Command Output (stdout):
--
# RUN: at line 10
/usr/bin/mlir-capi-execution-engine-test 2>&1 | /usr/bin/FileCheck /builddir/build/BUILD/mlir-19.1.0_rc4-build/mlir-19.1.0-rc4.src/test/CAPI/execution_engine.c
# executed command: /usr/bin/mlir-capi-execution-engine-test
# .---command stderr------------
# | '/usr/bin/mlir-capi-execution-engine-test': command not found
# `-----------------------------
```
This error will not be deterministic and is dependent on the order in
which tools are built. If by any chance,
`mlir-capi-execution-engine-test` is built before the lit tests run,
then nothing will happen. But lit tests can be run before
`mlir-capi-execution-engine-test` is built.
This patch adds the `mlir-capi-execution-engine` to the
`MLIR_TEST_DEPENDS` list when the `MLIR_ENABLE_EXECUTION_ENGINE` flag is
present.
Happy to make changes like:
* removing `mlir-capi-execution-engine-test` from the other place where
it is included in the tests
* and merge and sort alphabetically these two commands
```cmake
set(MLIR_TEST_DEPENDS
FileCheck count not split-file
mlir-capi-ir-test
mlir-capi-irdl-test
mlir-capi-llvm-test
mlir-capi-pass-test
mlir-capi-quant-test
mlir-capi-rewrite-test
mlir-capi-sparse-tensor-test
mlir-capi-transform-test
mlir-capi-transform-interpreter-test
mlir-capi-translation-test
mlir-linalg-ods-yaml-gen
mlir-lsp-server
mlir-opt
mlir-query
mlir-reduce
mlir-tblgen
mlir-translate
tblgen-lsp-server
tblgen-to-irdl
)
set(MLIR_TEST_DEPENDS ${MLIR_TEST_DEPENDS}
mlir-capi-pdl-test
mlir-pdll-lsp-server
mlir-pdll
)
```
Co-authored-by: Erick Ochoa <erick@ceci-nest-pas.me>
---
mlir/test/CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/mlir/test/CMakeLists.txt b/mlir/test/CMakeLists.txt
index df95e5db11f1..4d2d738b734e 100644
--- a/mlir/test/CMakeLists.txt
+++ b/mlir/test/CMakeLists.txt
@@ -150,6 +150,10 @@ if(MLIR_ENABLE_CUDA_RUNNER)
list(APPEND MLIR_TEST_DEPENDS mlir_cuda_runtime)
endif()
+if(MLIR_ENABLE_EXECUTION_ENGINE)
+ list(APPEND MLIR_TEST_DEPENDS mlir-capi-execution-engine-test)
+endif()
+
if(MLIR_ENABLE_ROCM_RUNNER)
list(APPEND MLIR_TEST_DEPENDS mlir_rocm_runtime)
endif()
--
2.46.0

View File

@ -0,0 +1,77 @@
From 1d043550c7601ca776b0318b9b913e5ecf325baf Mon Sep 17 00:00:00 2001
From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
Date: Tue, 5 Sep 2023 10:35:37 -0300
Subject: [PATCH] Reuse the library directory
Prefer to get the path to the shared libraries from config.llvm_shlib_dir.
Fallback to the previous path only if config.llvm_shlib_dir is not
defined.
This ensures the test will pass regardless of the build configuration
used downstream.
---
mlir/test/lit.cfg.py | 1 +
mlir/test/python/execution_engine.py | 12 +++++++-----
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
--- a/mlir/test/lit.cfg.py 2024-08-05 10:40:33.000000000 +0200
+++ b/mlir/test/lit.cfg.py 2024-08-14 19:17:55.160470316 +0200
@@ -164,6 +164,7 @@
ToolSubst("transform-opt-ch2", unresolved="ignore"),
ToolSubst("transform-opt-ch3", unresolved="ignore"),
ToolSubst("transform-opt-ch4", unresolved="ignore"),
+ ToolSubst("%llvm_shlib_dir", config.llvm_shlib_dir, unresolved="ignore"),
ToolSubst("mlir-transform-opt", unresolved="ignore"),
ToolSubst("%mlir_lib_dir", config.mlir_lib_dir, unresolved="ignore"),
ToolSubst("%mlir_src_dir", config.mlir_src_root, unresolved="ignore"),
diff -ruN mlir-19.1.0-rc2.src.orig/test/python/execution_engine.py mlir-19.1.0-rc2.src/test/python/execution_engine.py
--- a/mlir/test/python/execution_engine.py 2024-08-05 10:40:33.000000000 +0200
+++ b/mlir/test/python/execution_engine.py 2024-08-14 19:17:20.822219824 +0200
@@ -1,4 +1,4 @@
-# RUN: %PYTHON %s 2>&1 | FileCheck %s
+# RUN: env LLVM_SHLIB_DIR=%llvm_shlib_dir %PYTHON %s 2>&1 | FileCheck %s
# REQUIRES: host-supports-jit
import gc, sys, os, tempfile
from mlir.ir import *
@@ -6,6 +6,9 @@
from mlir.execution_engine import *
from mlir.runtime import *
+_DEFAULT_LIB_DIR = "../../../../lib"
+LIB_DIR = os.getenv("LLVM_SHLIB_DIR", _DEFAULT_LIB_DIR)
+
# Log everything to stderr and flush so that we have a unified stream to match
# errors/info emitted by MLIR to stderr.
@@ -613,6 +616,7 @@
shared_libs = [
"../../../../bin/mlir_runner_utils.dll",
"../../../../bin/mlir_c_runner_utils.dll",
+
]
elif sys.platform == "darwin":
shared_libs = [
@@ -621,8 +625,9 @@
]
else:
shared_libs = [
- "../../../../lib/libmlir_runner_utils.so",
- "../../../../lib/libmlir_c_runner_utils.so",
+ LIB_DIR + "/libmlir_runner_utils.so",
+ LIB_DIR + "/libmlir_c_runner_utils.so",
+
]
execution_engine = ExecutionEngine(
@@ -664,8 +669,8 @@
]
else:
shared_libs = [
- "../../../../lib/libmlir_runner_utils.so",
- "../../../../lib/libmlir_c_runner_utils.so",
+ LIB_DIR + "/libmlir_runner_utils.so",
+ LIB_DIR + "/libmlir_c_runner_utils.so",
]
execution_engine = ExecutionEngine(

9
gating.yaml Normal file
View File

@ -0,0 +1,9 @@
--- !Policy
product_versions:
- fedora-*
decision_contexts:
- bodhi_update_push_testing
- bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

342
mlir.spec
View File

@ -1,13 +1,18 @@
%global maj_ver 15
%global min_ver 0
#global rc_ver 3
%global patch_ver 4
%global toolchain clang
%global maj_ver 19
%global min_ver 1
%global patch_ver 0
#global rc_ver 4
%global mlir_version %{maj_ver}.%{min_ver}.%{patch_ver}
%global mlir_srcdir llvm-project-%{mlir_version}%{?rc_ver:rc%{rc_ver}}.src
%global mlir_srcdir mlir-%{mlir_version}%{?rc_ver:-rc%{rc_ver}}.src
# 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
Name: mlir
Version: %{mlir_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist}
Release: 1.0.riscv64%{?dist}
Summary: Multi-Level Intermediate Representation Overview
License: Apache-2.0 WITH LLVM-exception
@ -16,14 +21,66 @@ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{maj_ve
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
Source2: release-keys.asc
BuildRequires: gcc
BuildRequires: gcc-c++
Patch1: 0001-mlir-python-Reuse-the-library-directory.patch
Patch2: 0001-CMake-Add-missing-dependency-108461.patch
%{lua:
-- Return the maximum number of parallel jobs a build can run based on the
-- amount of maximum memory used per process (per_proc_mem).
function print_max_procs(per_proc_mem)
local f = io.open("/proc/meminfo", "r")
local mem = 0
local nproc_str = nil
for line in f:lines() do
_, _, mem = string.find(line, "MemTotal:%s+(%d+)%s+kB")
if mem then
break
end
end
f:close()
local proc_handle = io.popen("nproc")
_, _, nproc_str = string.find(proc_handle:read("*a"), "(%d+)")
proc_handle:close()
local nproc = tonumber(nproc_str)
if nproc < 1 then
nproc = 1
end
local mem_mb = mem / 1024
local cpu = math.floor(mem_mb / per_proc_mem)
if cpu < 1 then
cpu = 1
end
if cpu > nproc then
cpu = nproc
end
print(cpu)
end
}
# The amount of RAM used per process has been set by trial and error.
# This number may increase/decrease from time to time and may require changes.
# We prefer to be on the safe side in order to avoid spurious errors.
%global _smp_mflags -j%{lua: print_max_procs(6144)}
# Support for i686 upstream is unclear with lots of tests failling.
ExcludeArch: i686
BuildRequires: clang
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: zlib-devel
BuildRequires: llvm-devel = %{version}
BuildRequires: llvm-cmake-utils = %{version}
BuildRequires: llvm-googletest = %{version}
BuildRequires: llvm-test = %{version}
BuildRequires: python3-lit
BuildRequires: python3-devel
BuildRequires: python3-numpy
BuildRequires: python3-pybind11
BuildRequires: python3-pyyaml
# For origin certification
BuildRequires: gnupg2
@ -50,14 +107,43 @@ Requires: %{name}-static%{?_isa} = %{version}-%{release}
%description devel
MLIR development files.
%package -n python3-%{name}
Summary: MLIR python bindings
Requires: python3
Requires: python3-numpy
%description -n python3-%{name}
%{summary}
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -n %{mlir_srcdir}/%{name} -p2
# remove all but keep mlir
find ../* -maxdepth 0 ! -name '%{name}' -exec rm -rf {} +
%autosetup -n %{mlir_srcdir} -p2
%build
%ifarch %ix86 riscv64
%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
# riscv64 builders are slow and don't have a lot of RAM
%global _dwz_low_mem_die_limit_riscv64 1
%global _dwz_max_die_limit_riscv64 1000000
# 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
%cmake -GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_RPATH=ON \
@ -65,13 +151,25 @@ find ../* -maxdepth 0 ! -name '%{name}' -exec rm -rf {} +
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DCMAKE_PREFIX_PATH=%{_libdir}/cmake/llvm/ \
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
-DLLVM_THIRD_PARTY_DIR=%{_datadir}/llvm/src/utils \
-DLLVM_COMMON_CMAKE_UTILS=%{_datadir}/llvm/cmake \
-DLLVM_BUILD_TOOLS:BOOL=ON \
-DLLVM_BUILD_UTILS:BOOL=ON \
-DLLVM_LIBRARY_OUTPUT_INTDIR="." \
-DLLVM_SHLIB_OUTPUT_INTDIR="%{_builddir}/%{mlir_srcdir}/%{__cmake_builddir}/lib/ExecutionEngine/" \
-DMLIR_INCLUDE_DOCS:BOOL=ON \
-DMLIR_INCLUDE_TESTS:BOOL=ON \
-DMLIR_INCLUDE_INTEGRATION_TESTS:BOOL=OFF \
-DBUILD_SHARED_LIBS=OFF \
-DMLIR_INSTALL_AGGREGATE_OBJECTS=OFF \
-DMLIR_BUILD_MLIR_C_DYLIB=ON \
%ifarch aarch64 %ix86 ppc64le x86_64 riscv64
-DLLVM_PARALLEL_LINK_JOBS=1 \
%endif
%ifarch %ix86
-DMLIR_RUN_X86VECTOR_TESTS:BOOL=OFF \
%endif
-DMLIR_ENABLE_BINDINGS_PYTHON:BOOL=ON \
%if 0%{?__isa_bits} == 64
-DLLVM_LIBDIR_SUFFIX=64
%else
@ -81,44 +179,260 @@ find ../* -maxdepth 0 ! -name '%{name}' -exec rm -rf {} +
export LD_LIBRARY_PATH=%{_builddir}/%{mlir_srcdir}/%{name}/%{_build}/%{_lib}
%cmake_build
%install
%cmake_install
mkdir -p %{buildroot}/%{python3_sitearch}
mv %{buildroot}/usr/python_packages/mlir_core/mlir %{buildroot}/%{python3_sitearch}
# These directories should be empty now.
rmdir %{buildroot}/usr/python_packages/mlir_core %{buildroot}/usr/python_packages
# Unneeded files.
rm -rf %{buildroot}/usr/src/python
%check
# Remove tablegen tests, as they rely on includes from llvm/.
rm -rf test/mlir-tblgen
# TODO: Test currently fails on i686.
%ifarch s390x
# s390x does not support half-float
rm test/python/execution_engine.py
# https://discourse.llvm.org/t/mlir-s390x-linux-failure/76695/25
rm test/Target/LLVMIR/llvmir.mlir
rm test/python/ir/array_attributes.py
%endif
%ifarch ppc64le
rm test/python/execution_engine.py
%endif
%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}
export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}:%{buildroot}/%{python3_sitearch}/mlir/_mlir_libs
export PYTHONPATH=%{buildroot}/%{python3_sitearch}
%ifarch riscv64
%cmake_build --target check-mlir || true
%else
%cmake_build --target check-mlir
%endif
%files
%license LICENSE.TXT
%{_libdir}/libMLIR*.so.%{maj_ver}*
%{_libdir}/libmlir_arm_runner_utils.so.%{maj_ver}*
%{_libdir}/libmlir_arm_sme_abi_stubs.so.%{maj_ver}*
%{_libdir}/libmlir_async_runtime.so.%{maj_ver}*
%{_libdir}/libmlir_c_runner_utils.so.%{maj_ver}*
%{_libdir}/libmlir_float16_utils.so.%{maj_ver}*
%{_libdir}/libmlir_runner_utils.so.%{maj_ver}*
%files static
%{_libdir}/libMLIR*.a
%files devel
%{_bindir}/mlir-cpu-runner
%{_bindir}/mlir-linalg-ods-yaml-gen
%{_bindir}/mlir-lsp-server
%{_bindir}/mlir-opt
%{_bindir}/mlir-pdll
%{_bindir}/mlir-pdll-lsp-server
%{_bindir}/mlir-reduce
%{_bindir}/mlir-tblgen
%{_bindir}/mlir-translate
%{_bindir}/mlir-query
%{_bindir}/tblgen-lsp-server
%{_bindir}/tblgen-to-irdl
%{_libdir}/libMLIR*.so
%{_libdir}/libmlir_arm_runner_utils.so
%{_libdir}/libmlir_arm_sme_abi_stubs.so
%{_libdir}/libmlir_async_runtime.so
%{_libdir}/libmlir_c_runner_utils.so
%{_libdir}/libmlir_float16_utils.so
%{_libdir}/libmlir_runner_utils.so
%{_includedir}/mlir
%{_includedir}/mlir-c
%{_libdir}/cmake/mlir
%files -n python3-%{name}
%{python3_sitearch}/mlir/
%changelog
* Mon Oct 14 2024 David Abdurachmanov <davidlt@rivosinc.com> - 19.1.0-1.0.riscv64
- Add support for riscv64
* Thu Sep 19 2024 Timm Bäder <tbaeder@redhat.com> - 19.1.0-1
- Update to 19.1.0
* Fri Sep 13 2024 Timm Bäder <tbaeder@redhat.com> - 19.1.0~rc4-1
- Update to 19.1.0-rc4
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 18.1.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jul 12 2024 Jesus Checa Hidalgo <jchecahi@redhat.com> - 18.1.8-1
- 18.1.8 Release
* Thu Jun 13 2024 Tom Stellard <tstellar@redhat.com> - 18.1.7-1
- 18.1.7 Release
* Sat Jun 08 2024 Python Maint <python-maint@redhat.com> - 18.1.6-2
- Rebuilt for Python 3.13
* Mon May 20 2024 Tom Stellard <tstellar@redhat.com> - 18.1.6-1
- 18.1.6 Release
* Fri May 03 2024 Tom Stellard <tstellar@redhat.com> - 18.1.4-1
- 18.1.4 Release
* Wed Apr 17 2024 Tom Stellard <tstellar@redhat.com> - 18.1.3-1
- 18.1.3 Release
* Thu Mar 21 2024 Tom Stellard <tstellar@redhat.com> - 18.1.2-1
- 18.1.2 Release
* Tue Mar 12 2024 Tom Stellard <tstellar@redhat.com> - 18.1.1-1
- 18.1.1 Release
* Wed Feb 28 2024 Tom Stellard <tstellar@redhat.com> - 18.1.0~rc4-1
- 18.1.0-rc4 Release
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 17.0.6-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 17.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Nov 29 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.6-1
- Update to LLVM 17.0.6
* Wed Nov 01 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.4-1
- Update to LLVM 17.0.4
* Wed Oct 18 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.3-1
- Update to LLVM 17.0.3
* Wed Oct 04 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.2-1
- Update to LLVM 17.0.2
* Sat Sep 23 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.1-1
- Update to LLVM 17.0.1
* Sun Sep 10 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc4-1
- Update to LLVM 17.0.0 RC4
* Tue Sep 05 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc3-3
- Enable python bindings. Fixes rhbz#2221241
* Mon Aug 28 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc3-2
- Restrict link jobs on x86_64
* Fri Aug 25 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc3-1
- Update to LLVM 17.0.0 RC3
* Wed Aug 23 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc2-1
- Update to LLVM 17.0.0 RC2
* Wed Aug 02 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc1-1
- Update to LLVM 17.0.0 RC1
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 16.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Jul 10 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.6-1
- Update to LLVM 16.0.6
* Thu Jun 15 2023 Nikita Popov <npopov@redhat.com> - 16.0.5-2
- Use llvm-cmake-utils package
* Tue Jun 06 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.5-1
- Update to LLVM 16.0.5
* Fri May 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.4-1
- Update to LLVM 16.0.4
* Wed May 10 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.3-1
- Update to LLVM 16.0.3
* Thu Apr 27 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.2-1
- Update to LLVM 16.0.2
* Thu Apr 13 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.1-1
- Update to LLVM 16.0.1
* 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
* Mon Apr 03 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.0-2
- Disable s390x builds temporarily
* 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
* Thu Feb 23 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.0~rc3-1
- Update to LLVM 16.0.0 RC3
* 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
* Fri Jan 13 2023 Nikita Popov <npopov@redhat.com> - 15.0.7-1
- Update to LLVM 15.0.7
* 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
* Mon Dec 05 2022 Nikita Popov <npopov@redhat.com> - 15.0.6-1
- Update to LLVM 15.0.6
* Mon Nov 07 2022 Nikita Popov <npopov@redhat.com> - 15.0.4-1
- Update to LLVM 15.0.4

View File

@ -1,2 +1,2 @@
SHA512 (llvm-project-15.0.4.src.tar.xz) = 9d5b664dd77c08130601636f9d6c006b257f369470ce823aa56d06698a9f0edfec42f2c90da934b9ad52c4d7960d9a024ea46dc9640275be6d191b1ba9869459
SHA512 (llvm-project-15.0.4.src.tar.xz.sig) = 35899ffbd13fc44cade54246a423450571cb4b62b8d706864daa3eef2377c48e24ef3113218e39e29de995b7f7fa307f9187552766576c9050fd924beb517f6e
SHA512 (mlir-19.1.0.src.tar.xz) = 09e09821c815ce38cbc028b02009e6848ceac55f3b034f67171509a66d9baa7c220d194535c86ed9d04c2febdc7d3f22ef80b5b726ade0952511a235303494b3
SHA512 (mlir-19.1.0.src.tar.xz.sig) = 375501c2890472e750ec69ec170aa88acd95c208017acb12ce68852498b17b88a0cf61c374d8f6f65d6e3d77f02f11d7beaecf3484d321e4192d847ea094781e