Commit Graph

1450 Commits

Author SHA1 Message Date
Yijia Gu
2289c7f760 set correct mlir dir for td file 2023-08-23 21:42:02 -07:00
Yijia Gu
83cc73a3d4 add openmp python binding in bazel 2023-08-23 21:39:28 -07:00
Yijia Gu
7d889c044a fix format error in python/BUILD.bazel 2023-08-23 18:24:33 -07:00
Yijia Gu
ad7e6e90c2 update bazel for python binding 2023-08-23 17:50:29 -07:00
Krasimir Georgiev
4d4ed5b215 [bazel] keep args one-per-line
Allows more easily to manage custom additions and removals.
2023-08-23 08:44:13 +00:00
Benjamin Kramer
cb9b3ad50b [bazel] Port 23459f13fc 2023-08-22 12:16:35 +02:00
Christian Sigg
c78b6c059c [Bazel][mlir] Add more missing dependencies after 7c4e8c6 2023-08-22 08:02:00 +02:00
Christian Sigg
3eba48b84c [Bazel][mlir] Add missing dependencies after 7c4e8c6 2023-08-22 06:26:47 +02:00
Benjamin Kramer
b0ce19209f [bazel][libc] Add missing dependency for cd96aa7e10 2023-08-21 13:58:01 +02:00
Adrian Kuegel
45325a2de9 [mlir][Bazel] Add missing dependencies after 14de5a2a4f 2023-08-21 09:48:44 +02:00
Benjamin Kramer
e940926f3a [bazel] Make transitive OpBase.td inclusions visible to pdll tests 2023-08-19 20:02:02 +02:00
Benjamin Kramer
e51b21a1ff [bazel] Add new files from b448fe0c12 2023-08-19 19:56:24 +02:00
Dmitry Chernenkov
b7d304300a [Bazel] Add BitcodeConvenience.h 2023-08-18 12:25:01 +00:00
Dmitry Chernenkov
d2aff81285 [Bazel] Fix MLIR build 2023-08-18 09:40:34 +00:00
Dmitry Chernenkov
8f4a0b701f [Bazel] Fix for Enable multicall driver 2023-08-17 23:26:51 +00:00
Dmitry Chernenkov
c9f8aeec5f Revert "[Bazel] Fix for Enable multicall driver"
This reverts commit 4a235f65fa.
2023-08-17 08:33:52 +00:00
Dmitry Chernenkov
4a235f65fa [Bazel] Fix for Enable multicall driver 2023-08-17 07:56:24 +00:00
Adrian Kuegel
fb2264f269 [mlir][Bazel] Remove superfluous (?) strip_include_prefix settings.
Differential Revision: https://reviews.llvm.org/D157854
2023-08-14 13:07:36 +02:00
Johannes Reifferscheid
28f13124f8 [Bazel] [python bindings] Bindings for vendor GPU dialects
Reviewed By: olegshyshkov

Differential Revision: https://reviews.llvm.org/D157841
2023-08-14 10:55:36 +02:00
Angus Lees
87554d1c0e [bazel] Use binary_alias instead of symlinks for ld.lld and friends
Symlinks are poorly supported in Bazel+remote-exec.  Create the links from `ld.lld`,
`ld64.lld`, `lld-link`, `wasm-ld` to `lld` using LLVM's `binary_alias` instead.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D157830
2023-08-13 21:01:57 -07:00
Lei Zhang
1a38843f86 [mlir][spirv] Fix BUILD.bazel for the SPIRVConversion target 2023-08-12 19:58:45 -07:00
Benjamin Kramer
bb32e91f33 [bazel] Port 8ae074b195 2023-08-12 12:00:13 +02:00
Benjamin Kramer
88c2254440 [bazel] Add missing dependencies for b43068e870 2023-08-12 11:54:50 +02:00
Benjamin Kramer
a5425c2893 [bazel] Port 43752a2aa3 2023-08-12 11:48:34 +02:00
Benjamin Kramer
9a4bf6c3b9 [bazel] Port 6a0feb1503 2023-08-12 11:44:38 +02:00
Anlun Xu
d3e217d461 [bazel] Fix build
Differential Revision: https://reviews.llvm.org/D157758
2023-08-11 14:50:32 -07:00
Dmitri Gribenko
95fbe70a13 [bazel][libc] Add a missing dependency 2023-08-11 15:00:16 +02:00
Matthias Springer
1fdbbd158d [mlir][Conversion] Implement ConvertToLLVMPatternInterface for FuncDialect
Also a new pass option `ConvertToLLVMPass` to populate only patterns from the specified dialects. This is needed because the existing test cases expect that only ops from certain dialects are lowered. (E.g., "arith-to-llvm" expects that only "arith" ops are lowered but not "func" ops.)

Differential Revision: https://reviews.llvm.org/D157627
2023-08-11 10:05:30 +02:00
Adrian Kuegel
1040750193 [clang][Bazel] Add missing dependency after a563ced78b 2023-08-11 09:35:33 +02:00
Oleg Shyshkov
da947ea175 [mlir][bazel] Fix bazel build. 2023-08-11 08:17:09 +02:00
Nicolas Vasilache
920c461219 [mlir][Transform] Add support to drive conversions of func to LLVM with TD
This revision adds a `transform.apply_conversion_patterns.func.func_to_llvm` transformation.

It is unclear at this point whether this should be spelled out as a standalone transformation
or whether it should resemble `transform.apply_conversion_patterns.dialect_to_llvm "fun"`.

This is dependent on how we want to handle the type converter creation.
In particular the current implementation exhibits the fact that
`transform.apply_conversion_patterns.memref.memref_to_llvm_type_converter` was not rich enough
and did not match the LowerToLLVMOptions.

Keeping those options in sync across all the passes that lower to LLVM is very error prone.
Instead, we should have a single `to_llvm_type_converter`.

Differential Revision: https://reviews.llvm.org/D157553
2023-08-10 13:17:00 +00:00
Guillaume Chatelet
bc2b1193b5 [libc] add the CPP algorithm header for min/max
Reviewed By: jhuber6, sivachandra

Differential Revision: https://reviews.llvm.org/D157405
2023-08-10 08:00:18 +00:00
Jorge Gorbe Moya
6556e29025 [bazel] Add missing dep after 99475f5b4a 2023-08-09 10:10:52 -07:00
Matthias Springer
977cb4fdf8 [mlir][linalg][transform] PadOp: Add option to generate linalg.copy copy_back op
Three different options can be specified:
* `bufferization.copy_tensor` (default)
* `linalg.copy`
* `none` (no copy_back)

Differential Revision: https://reviews.llvm.org/D156173
2023-08-09 17:10:16 +02:00
Nicolas Vasilache
99475f5b4a [mlir][transform] Add NVGPU to NVVM conversion via transform.apply_conversion_patterns
Differential Revision: https://reviews.llvm.org/D157501
2023-08-09 14:09:57 +00:00
Oleg Shyshkov
b27e08892f [mlir][bazel] Fix bazel build for 0bb4d4d32f 2023-08-09 14:39:56 +02:00
Matthias Springer
0bb4d4d32f [mlir][transform] Add ApplyToLLVMConversionPatternsOp
This op populates conversion patterns by querying the
ConvertToLLVMPatternInterface. Only dialects that support this interface
are supported.

Differential Revision: https://reviews.llvm.org/D157487
2023-08-09 13:44:47 +02:00
Dmitri Gribenko
c2a8f22043 [bazel] Fix bazel build for c4769ef59c 2023-08-09 13:32:16 +02:00
Dmitri Gribenko
f04b5bae4a [bazel] Fix bazel build for bfdc4723 2023-08-09 11:47:53 +02:00
Matthias Springer
7ec88f06d5 [mlir][memref][transform] Add vector_to_llvm conversion patterns
These patterns are exposed via a new "apply_conversion_patterns" op.

Also provide a new type converter that converts from memref to LLVM types. Conversion patterns that lower to LLVM are special: they require an `LLVMTypeConverter`; a normal `TypeConverter` is not enough. This revision also adds a new interface method to pattern descriptor ops to verify that the default type converter of the enclosing "apply_conversion_patterns" op is compatible with the set of patterns. At the moment, a simple `StringRef` is used. This can evolve to a richer type in the future if needed.

Differential Revision: https://reviews.llvm.org/D157369
2023-08-09 11:27:53 +02:00
Dmitri Gribenko
76e624860f [bazel] Fix bazel build for 876a480c and c4769ef5 2023-08-09 11:15:43 +02:00
Guillaume Chatelet
b555912e70 [libc] Better IntegerToString API
This patch is an alternative to D155902. It provides the following benefits:
 - No buffer manual allocation and error handling for the general case
 - More flexible API : width specifier, sign and prefix handling
 - Simpler code

The more flexible API removes the need for manually tweaking the buffer afterwards, and so prevents relying on implementation details of IntegerToString.

Reviewed By: michaelrj, jhuber6

Differential Revision: https://reviews.llvm.org/D156981
2023-08-09 07:33:29 +00:00
Guillaume Chatelet
98ab87f44d Revert "[libc] Better IntegerToString API"
This reverts commit 910cc05aae.
2023-08-08 20:52:50 +00:00
Jorge Gorbe Moya
d0ca66ad75 [bazel] Fix mlir bazel build.
Fixes for recent mlir changes, including a3cd2eeb2d, 86c4dfa209,
895c4ac33f, 211c9752c8, and 9fa7b9ef21.
2023-08-08 13:39:53 -07:00
Guillaume Chatelet
910cc05aae [libc] Better IntegerToString API
This patch is an alternative to D155902. It provides the following benefits:
 - No buffer manual allocation and error handling for the general case
 - More flexible API : width specifier, sign and prefix handling
 - Simpler code

The more flexible API removes the need for manually tweaking the buffer afterwards, and so prevents relying on implementation details of IntegerToString.

Reviewed By: michaelrj, jhuber6

Differential Revision: https://reviews.llvm.org/D156981
2023-08-08 20:39:13 +00:00
Dmitri Gribenko
27e15513da [bazel] Add '$(STACK_FRAME_UNLIMITED)' to //mlir:Analysis
This target goes over the limit in some build modes.
2023-08-08 17:56:01 +02:00
Dmitri Gribenko
f9a609c555 [bazel] Fix the second bazel buildbot for 4529797a9d 2023-08-08 12:23:49 +02:00
Dmitri Gribenko
7f32088c75 [bazel] Fix bazel build for 4529797a9d 2023-08-08 11:35:00 +02:00
Jorge Gorbe Moya
df3800f0f3 [bazel][libc] Add more missing deps for parsing headers standalone.
Commit c192b3d missed some targets when fixing standalone header parsing
after 019a477.
2023-08-07 15:26:35 -07:00
Michael Jones
f0a3954ef1 [libc][cleanup] Fix most conversion warnings
This patch is large, but is almost entirely just adding casts to calls
to syscall_impl. Much of the work was done programatically, with human
checking when the syntax or types got confusing.

Reviewed By: mcgrathr

Differential Revision: https://reviews.llvm.org/D156950
2023-08-07 15:03:01 -07:00