Commit Graph

2064 Commits

Author SHA1 Message Date
Oleg Shyshkov
f89b1b8a68 [mlir][bazel] Fix bazel build. 2024-05-14 20:14:32 +02:00
quanwanandy
1355dcbb6e Fix Bazel Build (#92139) 2024-05-14 19:07:26 +02:00
Dmitri Gribenko
344c73ee83 [libc][bazel] Updates for 292b300c51 2024-05-14 19:04:40 +02:00
Fangrui Song
f608ac2617 [bazel] Actually port libc #91905 2024-05-14 03:54:24 +00:00
Fangrui Song
22cc4488c9 [bazel] Port libc #91905 2024-05-13 18:18:30 -07:00
Michael Jones
4c79d38f82 [libc] add errno_macro header to bazel build (#92044)
Patch #91150 added a proxy header for errno macros. This patch fixes the
bazel build since it needs to be added as a dependency.
2024-05-13 16:05:09 -07:00
Benoit Jacob
a1d43c14d8 [mlir][vector] Add Vector-dialect interleave-to-shuffle pattern, enable in VectorToSPIRV (#92012)
This is the second attempt at merging #91800, which bounced due to a
linker error apparently caused by an undeclared dependency.
`MLIRVectorToSPIRV` needed to depend on `MLIRVectorTransforms`. In fact
that was a preexisting issue already flagged by the tool in
https://discourse.llvm.org/t/ninja-can-now-check-for-missing-cmake-dependencies-on-generated-files/74344.

Context: https://github.com/iree-org/iree/issues/17346.

Test IREE integrate showing it's fixing the problem it's intended to
fix, i.e. it allows IREE to drop its local revert of
https://github.com/llvm/llvm-project/pull/89131:

https://github.com/iree-org/iree/pull/17359

This is added to VectorToSPIRV because SPIRV doesn't currently handle
`vector.interleave` (see motivating context above).

This is limited to 1D, non-scalable vectors.
2024-05-13 15:36:28 -04:00
Adrian Kuegel
ae2a18d6cb [mlir][Bazel] Adjust BUILD.bazel for eeafc9daa1 2024-05-13 07:47:33 +00:00
Adrian Kuegel
5ca368501a [mlir][Bazel] Update BUILD file for 1337622a49 2024-05-13 06:44:37 +00:00
Keith Smiley
666c686d59 [bazel] Codesign debugserver on macOS (#91789)
This tool doesn't work unless it's signed with the entitlements used
here. We should probably consider using the
macos_command_line_application rule from rules_apple which manages this
more flexibly for us, but for now this works. This uses apple_genrule as
opposed to genrule since the former encodes the Xcode environment info
into the action so it is correctly invalidated if that changes.
2024-05-10 14:20:09 -07:00
Keith Smiley
99f45b4c5b [bazel] Fix new CodeGen dep (#91654)
```
.../AMDGPUUtilsAndDesc/AMDGPUCallLowering.h:17:10: fatal error: 'llvm/CodeGen/GlobalISel/CallLowering.h' file not found
```

https://buildkite.com/llvm-project/upstream-bazel/builds/97166
2024-05-09 14:03:08 -07:00
Keith Smiley
d36b4abb51 [bazel] Rework liblldb (#91549)
Previously we were linking liblldb as a shared library, but also linking
the contents into the lldb binary. This is invalid and results in subtle
runtime issues because of duplicate constants, like the global plugin
registry. This now links the dylib to lldb directly. This requires we
switch to cc_binary instead because cc_shared_library expects your
library to export all symbols in your transitive dependency tree, where
we only want to export lldb symbols.
2024-05-09 13:14:03 -07:00
lntue
e1f279e92d [libc] Use __builtin_fma(f) by default if LIBC_TARGET_CPU_HAS_FMA is defined. (#91535) 2024-05-09 13:10:43 -04:00
Benjamin Kramer
3a83162168 [bazel] Add missing dependency for 6ed8434edc 2024-05-08 16:38:38 +02:00
Benjamin Kramer
d4fef93724 [bazel][libc] Split up mutex libraries like ab3a9e724d did 2024-05-08 11:57:19 +02:00
Keith Smiley
cf58c58e09 [bazel] Move HostMacOSXPrivateHeaders to macOS only dep (#91354) 2024-05-07 11:19:52 -07:00
Benjamin Kramer
9eb91f45fb [bazel] Add nobuildkite tags for incompatible targets 2024-05-07 15:58:47 +02:00
Benjamin Kramer
a775455cdc [bazel] Add nobuildkite tags for incompatible target 2024-05-07 15:57:36 +02:00
Keith Smiley
ee36dd20e7 [bazel] Fix layering_check with macOS targets (#91260) 2024-05-06 13:45:47 -07:00
Christian Sigg
e8cda376a7 [llvm][bazel] Fix BUILD after dcf376aae7. 2024-05-03 08:19:12 +02:00
Anlun Xu
9dca7dde3f Fix MLIR BUILD 2024-05-02 15:32:01 -07:00
Yinying Li
e71eacc5b1 [mlir][sparse] Support explicit/implicit value for complex type (#90771) 2024-05-02 12:28:34 -04:00
Christian Sigg
8bec96447f [lldb][bazel] Fix BUILD after dcbf0fcd0d. (#90825) 2024-05-02 08:56:03 +02:00
Benjamin Kramer
987c036f54 [bazel][clang] Add missing dependency for 6e31714d24 2024-05-01 18:40:33 +02:00
Gaurav Shukla
97069a8619 [MLIR] Generalize expand_shape to take shape as explicit input (#90040)
This patch generalizes tensor.expand_shape and memref.expand_shape to
consume the output shape as a list of SSA values. This enables us to
implement generic reshape operations with dynamic shapes using
collapse_shape/expand_shape pairs.

The output_shape input to expand_shape follows the static/dynamic
representation that's also used in `tensor.extract_slice`.

Differential Revision: https://reviews.llvm.org/D140821

---------

Signed-off-by: Gaurav Shukla<gaurav.shukla@amd.com>
Signed-off-by: Gaurav Shukla <gaurav.shukla@amd.com>
Co-authored-by: Ramiro Leal-Cavazos <ramiroleal050@gmail.com>
2024-04-30 09:28:35 -07:00
Christian Sigg
f4843acd83 [lldb][bazel] Fix BUILD after 975eca0e6a. (#90564) 2024-04-30 08:45:20 +02:00
Jordan Rupprecht
9d955a63c7 [driver] Allow ld as a driver alias to lld (#90515)
This adds a "hidden" alias kind that allows using LLD when symlinked as
`ld`; however, it does not install `ld` as a symlink. This is to allow
either using a mixed toolchain with both LLD and GNU ld, or a pure LLD
toolchain where LLD has been installed (or symlinked) to `ld` for
compatibility w/ older tools that expect `ld`.
2024-04-29 15:31:34 -05:00
Adrian Kuegel
fa8fda85c6 [mlir][Bazel] Add missing dependency after 145176dc0c 2024-04-29 05:32:10 +00:00
Aiden Grossman
90a959a8c9 [Bazel] Add llvm-mca unittests (#90309)
This patch refactors the llvm-mca rules slightly so that the source
files within the tool source directory but not the library source
directory are included in a separate cc_library. This patch also adds
the llvm-mca unittests.
2024-04-26 22:09:34 -07:00
Jeremy Kun
7045c14c84 fix LinalgTransforms bazel build (#90120) 2024-04-25 13:53:03 -07:00
Jeremy Kun
49586eacd3 remove duplicate td_library import (#90003)
Reverts bad part of one line from
ae22ac9535 (diff-9b538219c38ed73e193087a031284f10c62de8692ccc0efbe8c670fe9bfe868f)
2024-04-24 16:07:02 -07:00
Jeff Niu
ae22ac9535 [mlir][test] Shard the Test Dialect (NFC) (#89628)
This PR uses the new op sharding mechanism in tablegen to shard the test
dialect's op definitions. This breaks the definition of ops into
multiple source files, speeding up compile time of the test dialect
dramatically. This improves developer cycle times when iterating on the
test dialect.
2024-04-24 14:59:00 -07:00
Jeff Niu
1b232fa0e9 [mlir][ods] Allow sharding of op definitions (#89423)
Adds an option to `mlir-tblgen -gen-op-defs` `op-shard-count=N` that
divides the
op class definitions and op list into N segments, e.g.

```
// mlir-tblgen -gen-op-defs -op-shard-count=2

void FooDialect::initialize() {
  addOperations<
  >();
  addOperations<
  >();
}

```

When split across multiple source files, this can help significantly
improve
dialect compile time for dialects with a large opset.
2024-04-24 14:58:37 -07:00
Jeremy Kun
69bde04230 split XeGPU enums into a separate build rule (#89997)
Fixes the bazel build. Note the addition of the Arith dependency created
duplicate arith enum declarations in the two dialects, so it had to be
spit into its own build rule. This matches what the cmake build does for
this dialect.
2024-04-24 14:49:46 -07:00
Keith Smiley
57f0284efc [bazel] Mark linux LLDB plugin as linux only (#89961)
Otherwise if you bazel build //... on macOS this fails to build
2024-04-24 14:02:14 -04:00
Dmitry Chernenkov
c81ec1f35c [llvm][Bazel] Fix Bazel build for 71c5964f5c 2024-04-24 11:15:49 +00:00
Guillaume Chatelet
788d159821 [libc][bazel] Allow configure options to alter all targets (#89251)
The previous state was leading to inconsistencies. Some targets would
get the options and some wouldn't. As an example, the `MEMORY_COPTS`
definitions would only apply to the `:string_memory_utils` target but
not to the `:memcpy` target. This patch makes sure definitions are
applied throughout the LLVM libc targets as `local_defines`. This
ensures that the preprocessor definitions don't propagate to depending
targets outside of LLVM libc, and that all libc targets have consistent
preprocessor definitions.
2024-04-24 10:33:24 +02:00
Pranav Kant
dc5939d2b3 [Bazel][libc] Add fp_test_helper in deps 2024-04-24 01:51:55 +00:00
Pranav Kant
688c10d236 [Bazel][libc] Fix breakage after 837dab96d6 2024-04-23 22:56:40 +00:00
Roland McGrath
837dab96d6 [libc] Make fenv and math tests preserve fenv_t state (#89658)
This adds a new test fixture class FEnvSafeTest (usable as a base
class for other fixtures) that ensures each test doesn't perturb
the `fenv_t` state that the next test will start with.  It also
provides types and methods tests can use to explicitly wrap code
under test either to check that it doesn't perturb the state or
to save and restore the state around particular test code.

All the fenv and math tests are updated to use this so that none
can affect another.  Expectations that code under test and/or
tests themselves don't perturb state can be added later.
2024-04-23 13:21:25 -07:00
Adam Paszke
bc7204811d [bazel] Add a bazel flag to enable building MLIR with CUDA support (#88856)
This makes it possible to specify
`--@llvm-project//mlir:enable_cuda=true` on the bazel command line and
get a build that includes NVIDIA GPU support in MLIR.
2024-04-23 11:34:48 +02:00
Oleksandr "Alex" Zinenko
d5093aac54 [mlir][bazel] drop unnecessary rule
#75960 added a bazel rule for generating enums for the async dialects, but there are no enums defined, and no cmake rule for that. Delete this rule.
2024-04-23 11:01:09 +02:00
Adrian Kuegel
561b3decdf [mlir][Bazel] Add test data to adapt for 7922534974 2024-04-23 07:06:21 +00:00
Pranav Kant
28cea99845 [Bazel][libc] Fix build failure 2024-04-23 00:10:24 +00:00
Christian Sigg
8b2e50bdda [llvm][bazel] Fix BUILD after e86ebe4ff8. 2024-04-22 10:14:32 +02:00
Mehdi Amini
8c0341df02 Revert "[MLIR] Generalize expand_shape to take shape as explicit input" (#89540)
Reverts llvm/llvm-project#69267

this broke some bots.
2024-04-21 14:33:48 +02:00
Gaurav Shukla
e095d978ba [MLIR] Generalize expand_shape to take shape as explicit input (#69267)
This patch generalizes tensor.expand_shape and memref.expand_shape to
consume the output shape as a list of SSA values. This enables us to
implement generic reshape operations with dynamic shapes using
collapse_shape/expand_shape pairs.

The output_shape input to expand_shape follows the static/dynamic
representation that's also used in `tensor.extract_slice`.

Differential Revision: https://reviews.llvm.org/D140821

Co-authored-by: Ramiro Leal-Cavazos <ramiroleal050@gmail.com>
2024-04-21 07:37:02 -04:00
Abhishek Kulkarni
37fe3c6788 [mlir][python] Fix generation of Python bindings for async dialect (#75960)
The Python bindings generated for "async" dialect didn't include any of
the "async" dialect ops. This PR fixes issues with generation of Python
bindings for "async" dialect and adds a test case to use them.
2024-04-20 20:49:39 -05:00
Jorge Gorbe Moya
e4f63202b9 [bazel][mlir] Fix invalid quotation mark in BUILD file 2024-04-19 09:50:34 -07:00
Yijia Gu
cd9f98de73 [mlir][bazel] add bazel rule for XeGPU 2024-04-19 09:38:51 -07:00