1136 Commits

Author SHA1 Message Date
Pranav Kant
a4fbc6f78f
[bazel] Fix a typo (#135460) 2025-04-11 17:05:52 -07:00
Pranav Kant
b74dbf7fb2
[bazel] Add support for SMT Dialect (#135454)
This fixes #131480
2025-04-11 16:34:49 -07:00
Pranav Kant
4d06d22da0
[bazel] Fix after #133692 (#135098)
Avoid failures like these:
https://buildkite.com/llvm-project/upstream-bazel/builds/131707#01961bb5-2a7b-4dea-a387-cdfd8bb4db48
2025-04-09 16:22:31 -07:00
Jakub Kuderski
b92f4d4c33
[bazel][mlir] Add missing dep for X86Vector (#135069)
Follow up fix to https://github.com/llvm/llvm-project/pull/133692
2025-04-09 15:25:44 -04:00
Adam Siemieniuk
0c2a6f2d62
[mlir][x86vector] Simplify intrinsic generation (#133692)
Replaces separate x86vector named intrinsic operations with direct calls
to LLVM intrinsic functions.
    
This rework reduces the number of named ops leaving only high-level MLIR
equivalents of whole intrinsic classes e.g., variants of AVX512 dot on
BF16 inputs. Dialect conversion applies LLVM intrinsic name mangling
further simplifying lowering logic.
    
The separate conversion step translating x86vector intrinsics into LLVM
IR is also eliminated. Instead, this step is now performed by the
existing llvm dialect infrastructure.

RFC:
https://discourse.llvm.org/t/rfc-simplify-x86-intrinsic-generation/85581
2025-04-09 19:59:37 +02:00
Yijia Gu
836476660e [mlir][bazel] add missing deps for LLVMOpsTdFiles 2025-04-08 11:36:18 -07:00
Christian Sigg
3a6b9b3a87 [mlir][bazel] Fix after dae0ef53a0b99c6c2b74143baee5896e8bc5c8e7
Remove unnecessary include.
2025-04-08 15:47:14 +02:00
Christian Sigg
9fe6f6a0d4
[bazel] Change gentbl_cc_library(tbl_outs) to dicts (#134349)
Follow up from https://github.com/llvm/llvm-project/pull/134271
2025-04-07 14:23:22 +02:00
Jorge Gorbe Moya
158684a80f [bazel] Add missing dep after 586c5e3083428e7473e880dafd5939e8707bc1c9 2025-04-03 11:25:44 -07:00
Christian Sigg
6ddf7cf780
[mlir][bazel] Allow gentbl_cc_library(tbl_outs) to be a dict. (#134271)
This makes the BUILD file shorter and more readable.
I will follow up with converting the other instances.
2025-04-03 18:47:56 +02:00
Jeremy Kun
179062b2dc
[mlir][bazel] add alwayslink=True to mlir-runner utils (#133787)
MacOS platforms using mlir-runner in lit tests consistently hit the
following error:

```
# .---command stderr------------
# | JIT session error: Symbols not found: [ __mlir_ciface_printMemrefI32 ]
# | Error: Failed to materialize symbols: { (main, { __mlir_printMemrefI32, ... }) }
# `-----------------------------
```

https://github.com/google/heir/issues/1521#issuecomment-2751303404
confirms the issue is fixed by using `alwayslink` on these two targets,
and I confirmed on a separate Apple M1 (OSX version Sequoia 15.3.2.).

I'm not an expert on the mlir runner internals, but given the
mlir-runner is purely for testing, and alwayslink at worst adds some
overhead by not removing symbols, it seems low risk.
2025-04-01 08:58:32 -07:00
Karlo Basioli
36b36060a1
[mlir][spirv] Fix cyclical dependency in bazel (#132785) 2025-03-25 10:39:04 +00:00
Jordan Rupprecht
c7e6ee7b9f
[bazel] Port 3aa20c266c97a638c63b5368d89fe25757885178 (#132774) 2025-03-24 11:39:09 -05:00
Karlo Basioli
ad9630d5ee
Fix bazel build for QuantDialectBytecodeGen (caused by #120172) (#132716) 2025-03-24 11:22:40 +00:00
Benjamin Kramer
dd3addf954 [bazel] Add missing dependency for ff3341ca35fe4ce05b52e89d654ff4c696d3602e 2025-03-20 19:02:19 +01:00
Joel Wee
f84bc1ca43 Fix after 2b8f88791502 2025-03-19 17:32:36 +00:00
Benjamin Kramer
94dc397c7e [bazel] Add missing dependencies for fd24805c8e67c921991e82463bdc23563caf744e 2025-03-15 11:29:52 +01:00
Bart Chrzaszcz
e45090e5f0
Fix BUILD.bazel due to a16c225 2025-03-14 11:56:32 +00:00
Bart Chrzaszcz
497a3df6bb
[mlir] Fix bazel build after f3dcc0f TD files 2025-03-10 16:34:15 +00:00
Bart Chrzaszcz
8885b5c062
[mlir] Fix bazel build after f3dcc0fe228f6a1a69147ead0a76ce0fe02d316d 2025-03-10 14:36:40 +00:00
Benjamin Chetioui
308f933f75
[mlir] Fix bazel build after 95767a9903208e545badd920a1a16e5476ae09f9. (#130283) 2025-03-07 14:37:31 +01:00
Augie Fackler
995c0f7bb7 [bazel] update mlir python deps for 95767a9903208e545badd920a1a16e5476ae09f9 2025-03-07 08:13:50 -05:00
Augie Fackler
35842f354e [bazel] add missing another missing dep in mlir 2025-03-06 11:33:19 -05:00
Augie Fackler
3c74262604 [bazel] add missing deps in mlir 2025-03-06 11:13:33 -05:00
Benjamin Chetioui
4396237972
[mlir][bazel] Fix Bazel build after db0e7c72aff622849abbc92c3ed0d06efb8e2d16. (#129532)
db0e7c72aff622849abbc92c3ed0d06efb8e2d16.
2025-03-03 15:02:01 +01:00
Mikhail Goncharov
9a4320adb1 [bazel] port 42526d240cc953963ea48bae0b4c2ab548e9d897
include "../" looks wrong
2025-02-27 09:25:03 +01:00
Mikhail Goncharov
2d12c9e83f [bazel] add missing header for RelayoutOptInterface
for a778930f85b6d17cf31ff0e15964a7c7116e2a9d
2025-02-26 11:07:33 +01:00
Sterling-Augustine
864071dd7e
Bazel fixes for a778930f85b6d17cf31ff0e15964a7c7116e2a9d (#128783) 2025-02-25 14:56:38 -08:00
Mikhail Goncharov
d7211693af [bazel] port e5ce0304335dc1cae6856c880d1d4e14dcf8265d 2025-02-25 10:13:33 +01:00
Christian Sigg
c645981f2d [mlir][bazel] Port ab166d4d10
Second attempt.
2025-02-22 07:42:56 +01:00
Christian Sigg
ef6e3ed14e [mlir][bazel] Port ab166d4d10 2025-02-21 19:38:14 +01:00
Christian Sigg
25e12726f7 [mlir][bazel] Move OpAsmOpInterface.h.inc from hdrs to srcs
This file internal to the target and should not be exposed as a public (textual) header.
2025-02-21 12:28:12 +01:00
Danial Klimkin
d6858dd9bd
Rename TosaComplianceData.h to TosaComplianceData.h.inc (#128153)
The file can't be parsed on it's own, except when included in the .cc.
Should be .h.inc to avoid build errors.
2025-02-21 10:42:33 +01:00
Christian Sigg
43d71baae3 [mlir][bazel] Fix build after @11468c3, @f0134e6.
- 11468c3b07
- f0134e6d31
2025-02-21 07:37:06 +01:00
TatWai Chong
11468c3b07
[mlir][tosa] Add profile-based operation validation (#126992)
TOSA MLIR profile-based validation is designed to identify the
profile/extension requirements for each operation in TOSA MLIR graph,
ensuring that TOSA operators conform to the profiles and extensions
enabled by the target implementation.

The available profiles/extensions are reflected in the availability
property attached to each TOSA operator in the dialect. The design of
availability, the profile/extension classes, and their interface, is
inspired by the SPIRV implementation.

This patch includes the following changes:
- Introduces profile and extension knowledge within the dialect and
establishes an interface to query this information.
 - Implements profile-based validation logic in the pass.
- Adds a TargetEnv class that represents the capabilities enabled in the
target implementation, such as profiles, extensions, and levels.
- Adds a set of tests to ensure that profile and extension requirements
are properly attached to the operations and that validation correctly
verifies the requirements of a given operation against the target
implementation.
2025-02-20 11:47:01 -08:00
Benjamin Kramer
f34f21a1f6 [bazel] Fix mlir python build after a72616de18c0814ad37b5748d6bdc60b825dd889 2025-02-20 20:30:31 +01:00
Christian Sigg
083f80ff6b [mlir][bazel] Remove implementation from LinalgInterfaces target.
Move LinalgInterfaces.cpp from LinalgInterfaces to LinalgDialect target.

This allows TensorDialect to use header-only RelayoutOpInterface without introducing a hidden dependency on LinalgDialect (producing an `no-allow-shlib-undefined` error if a target depends on TensorDialect but not LinalgDialect).

Also reverts d64f177a2f because it's no longer needed.
2025-02-18 20:49:39 +01:00
Benjamin Kramer
d9803af3eb [bazel] Port 7c104b63c7aae66cf91fa65b04011c49641b456d 2025-02-18 19:37:03 +01:00
Benjamin Kramer
3305d9f08d [bazel] Fix build after 4cc7d60fe3e060e33cb01f054e2d26870d6256b7 2025-02-18 16:43:04 +01:00
Christian Sigg
ab8d99530d
[mlir][bazel] Fix after https://github.com/llvm/llvm-project/pull/127544 2025-02-18 07:38:23 +01:00
Christian Sigg
a5e6ccf546
[mlir][bazel] Port 517800e37e (#127544)
Introduces a `LinalgInterfaces` target so that `TensorDialect` doesn't
need to depend on `LinalgDialect`, which would introduce a circular
dependency.
2025-02-18 07:13:59 +01:00
Mikhail Goncharov
21811818d6 [bazel] port aecb764cc2e026ecb5c418dd56f2722c6f263e8b 2025-02-13 17:05:33 +01:00
Oleg Shyshkov
95bb61bba9 [mlir][bazel] Port 1935f84856a9297e725770e6f4b9c50fbcec365c 2025-02-13 14:36:02 +00:00
Christian Sigg
cd21e0f08b [mlir][bazel] Port a472147af4ad 2025-02-13 09:52:36 +01:00
Christian Sigg
f3a1d55811
[mlir][bazel] Fix after 0fd50ec9a3
Second attempt.
2025-02-12 14:28:37 +01:00
Christian Sigg
238563653f
[mlir][bazel] Fix after 0fd50ec9a3 2025-02-12 14:25:23 +01:00
Mikhail Goncharov
d51750dba1 [bazel] port c03325cead2244ef0a89bb1cf365bddf16021daf 2025-02-12 11:33:49 +01:00
Benjamin Kramer
4df287a171
[bazel] Add missing dependency for 5a0075adbb623c8661862b9af1272b8f430d9e5c 2025-02-07 20:09:10 +01:00
Haojian Wu
e40610d762 [bazel] Port for f497fe464bad8743b8a87ba04a5c53579a03711a 2025-02-06 20:15:13 +01:00
Alexander Belyaev
7ebacf3a99 [mlir][tensor] Fix bazel build after 80fd902573f860001af08d75f15d8f92005bae90. 2025-02-06 11:54:59 +01:00