1002 Commits

Author SHA1 Message Date
Nicolas Vasilache
c624027633 [mlir][linalg][TransformOps] Connect hoistRedundantVectorTransfers
Connect the hoistRedundantVectorTransfers functionality to the transform
dialect.

Authored-by: Quentin Colombet <quentin.colombet@gmail.com>

Differential Revision: https://reviews.llvm.org/D144260
2023-02-20 01:50:29 -08:00
Tue Ly
4d5fd9b79f [libc][bazel] Fix missing dependency in test/src/stdlib targets. 2023-02-18 10:16:13 -05:00
Tue Ly
df82394e7a [libc][bazel] Export .bzl files for libc/test and libc/test/src/math. 2023-02-17 11:03:04 -05:00
Pranav Kant
f83e6c6d7a [Bazel][mlir] Fix build errors
Fallback from https://reviews.llvm.org/D143925

Differential Revision: https://reviews.llvm.org/D144212
2023-02-16 20:17:39 +00:00
Michael Jones
dccd1d736c [libc][bazel] add string to float targets
This patch adds atof, strtof, strtod, and strtold to the bazel build, as
well as their tests.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D144140
2023-02-16 11:22:08 -08:00
Pranav Kant
9a2cb3a692 Fix bazel build
Fallback from 66b3f4a407316004df11307b92aa603b20c0b349
2023-02-16 01:31:19 +00:00
Tue Ly
66b3f4a407 [libc][bazel] Add missing dependency for stdlib tests. 2023-02-15 18:03:43 -05:00
Aart Bik
c3ca29080c [mlir] bazel fix
Reviewed By: olegshyshkov

Differential Revision: https://reviews.llvm.org/D144124
2023-02-15 10:35:49 -08:00
Guillaume Chatelet
b67ee5d505 [reland][libc] Separate memcpy implementations per arch
As x86_64 implementations is likely to grow up to a point where it's no more manageable to have all implementations in the same file.
2023-02-15 14:40:07 +00:00
Matthias Springer
c645eb0d03 [mlir][memref] Bufferize memref.tensor_store op
This change adds the BufferizableOpInterface implementation for memref.tensor_store.

Differential Revision: https://reviews.llvm.org/D144080
2023-02-15 15:26:57 +01:00
Guillaume Chatelet
7a282bd2aa [bazel] Fix missing dependency in clang-tools-extra/clang-tidy:llvmlibc 2023-02-15 13:54:45 +00:00
Guillaume Chatelet
15b90805bc Revert "[libc] Separate memcpy implementations per arch"
This is patch is still breaking downstream users...
This reverts commit 97e441dc6cfae31bc56b375e43899946ec7f08a8.
2023-02-15 13:29:07 +00:00
Guillaume Chatelet
97e441dc6c [libc] Separate memcpy implementations per arch
As x86_64 implementations is likely to grow up to a point where it's no more manageable to have all implementations in the same file.
2023-02-15 13:22:01 +00:00
Jathu Satkunarajah
f702822371 [bazel] create a clang-tidy binary target
Create a binary target for clang-tidy. Tested by running:

```
$ bazel build --config=generic_clang @llvm-project//clang-tools-extra/...
$ bazel test --config=generic_clang @llvm-project//clang-tools-extra/...
$ bazel run --config=generic_clang @llvm-project//clang-tools-extra/clang-tidy -- --help
```

Reviewed By: #bazel_build, aaronmondal

Differential Revision: https://reviews.llvm.org/D143804
2023-02-15 13:56:06 +01:00
Guillaume Chatelet
c3228714cc [libc][NFC] Make tuning macros start with LIBC_COPT_
Rename preprocessor definitions that control tuning of llvm libc.

Differential Revision: https://reviews.llvm.org/D143913
2023-02-15 10:00:16 +00:00
Benjamin Kramer
7d9cf97f80 [bazel][mlir][examples] Add missing dependency for 72429a42ac33564fa82449d99dc234da32a05498 2023-02-15 10:33:49 +01:00
Adrian Kuegel
41628d050a [mlir][Bazel] Add missing dependencies for 72429a42ac33564fa82449d99dc234da32a05498 2023-02-15 08:30:57 +01:00
Adrian Kuegel
d7ca25342f [mlir][Bazel] Add dependency needed for e9b82a5c 2023-02-15 07:37:26 +01:00
wren romano
f708a549b8 [mlir][sparse] Factoring out SparseTensorType class
This change adds a new `SparseTensorType` class for making the "dim" vs "lvl" distinction more overt, and for abstracting over the differences between sparse-tensors and dense-tensors.  In addition, this change also adds new type aliases `Dimension`, `Level`, and `FieldIndex` to make code more self-documenting.

Although the diff is very large, the majority of the changes are mechanical in nature (e.g., changing types to use the new aliases, updating variable names to match, etc).  Along the way I also made many variables `const` when they could be; the majority of which required only adding the keyword.  A few places had conditional definitions of these variables, requiring actual code changes; however, that was only done when the overall change was extremely local and easy to extract.  All these changes are included in the current patch only because it would be too onerous to split them off into a separate patch.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D143800
2023-02-14 19:17:19 -08:00
Fangrui Song
a211d79cac [bazel] Port 26662ac010ef50e65e2774eab84f325aa09360fe 2023-02-14 17:42:48 -08:00
Guillaume Chatelet
9a8d64a66a Revert "[libc] Separate memcpy implementations per arch"
Reverting as it broke downstream users.
This reverts commit 26541d4176346f8510302c74d6f3b958a4e523db.
2023-02-14 16:14:51 +00:00
Guillaume Chatelet
26541d4176 [libc] Separate memcpy implementations per arch
As x86_64 implementations is likely to grow up to a point where it's no more manageable to have all implementations in the same file.
2023-02-14 15:58:08 +00:00
Aart Bik
9700eb4fbf [bazel] build fix
Differential Revision: https://reviews.llvm.org/D143973
2023-02-13 19:31:55 -08:00
Jakub Kuderski
81566001e0 [mlir][tosa] Enable apply_scale unrolling
Make `tosa.apply_scale` implement `VectorUnrollOpInterface` so that we
can unroll it.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D143944
2023-02-13 17:02:23 -05:00
Tue Ly
7156d3b1fe [libc][bazel] Update math function unit tests' dependency computation. 2023-02-13 15:52:51 -05:00
Quentin Colombet
b838b62876 [mlir][MemRef][Transform] Don't apply multibuffer on "useless" allocs
`alloc`s that have users outside of loops are guaranteed to fail in
`multibuffer`.

Instead of exposing ourselves to that failure in the transform dialect,
filter out the `alloc`s that fall in this category.

To be able to do this filtering we have to change the `multibuffer`
transform op from `TransformEachOpTrait` to a plain `TransformOp`. This is
because `TransformEachOpTrait` expects that every successful `applyToOne`
returns a non-empty result.

Couple of notes:
- I changed the assembly syntax to make sure we only get `alloc` ops as
  input. (And added a test case to make sure we reject invalid inputs.)
- `multibuffer` can still fail pretty easily when you know its limitations.
  See the updated `op failed to multibuffer` test case for instance.
  Longer term, instead of leaking/coupling the actual implementation (in
  this case the checks normally done in `memref::multiBuffer`) with the
  transform dialect (the added check in `::apply`), we may want to refactor
  how we structure the underlying implementation. E.g., we could imagine a
  `canApply` method for all the implementations that we want to hook up in
  the transform dialect.
  This has some implications on how not to duplicate work between
  `canApply` and the actual implementation but I thought I throw that here
  to have us think about it :).

Differential Revision: https://reviews.llvm.org/D143747
2023-02-13 14:19:10 +01:00
Guillaume Chatelet
30f515a910 [libc] Fix LIBC_LOOP_NOUNROLL being a noop 2023-02-13 11:15:05 +00:00
Benjamin Kramer
c697119daf [bazel][libc] Add a few more missing dependency that show up when parsing headers 2023-02-12 13:08:36 +01:00
Tue Ly
f543614ce6 [libc] Update dependency for __support_fputil_nearest_integer in bazel overlay. 2023-02-11 10:49:01 -05:00
Tue Ly
4663d784dd [libc] Update macros/optimization.h build dependency for CMake and Bazel.
Update macros/optimization.h build dependency for CMake and Bazel.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D143805
2023-02-11 01:24:48 -05:00
Fangrui Song
9e57a5739d [bazel] Fix {clang,llvm}/unittests 2023-02-10 14:41:21 -08:00
Tue Ly
ae2d8b4971 [libc][math] Update exceptional cases for logf, log10f, log2f, log1pf.
Properly set floating point exceptions and add more exceptional
values for non-FMA x86-64 targets.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D143699
2023-02-10 14:08:50 -05:00
Benjamin Kramer
185dbf9d6f [bazel] Port 81a79ee446 2023-02-10 19:02:19 +01:00
Guillaume Chatelet
737e1cd161 [libc] Move likely/unlikely to the optimization header 2023-02-10 15:31:28 +00:00
Guillaume Chatelet
1842b5885b [bazel] Fix build and make all target respect layering_check
Tested with `bazelisk-linux-amd64 query //... + @llvm-project//... | xargs bazelisk-linux-amd64 test --config=ci --features=layering_check`
2023-02-10 11:41:19 +00:00
Benjamin Kramer
09c52a4940 [bazel] Add missing dependency after 687f78210d0 2023-02-10 10:22:18 +01:00
Mikhail Goncharov
6eb13809fb [bazel] fix build for 6470706bc0ed 2023-02-10 10:03:47 +01:00
Guillaume Chatelet
b7a2ff2963 [libc] Fix layering for bazel 2023-02-09 21:35:41 +00:00
Benjamin Kramer
c7c910caee [bazel] Port 499abb243c 2023-02-09 21:35:08 +01:00
Fangrui Song
bd11b2bdf3 [bazel] Fix libc 2023-02-09 18:46:25 +00:00
Guillaume Chatelet
6fb61ed549 [libc] Introduce a config macro file 2023-02-09 14:00:23 +00:00
Guillaume Chatelet
406b3f2cbb [libc] Add an optimization macro header 2023-02-09 13:35:49 +00:00
Guillaume Chatelet
e2f8c55664 [libc][NFC] separate macros in several targets 2023-02-09 10:51:19 +00:00
Guillaume Chatelet
46aa02cb84 [libc][NFC] Format bazel file 2023-02-09 09:33:40 +00:00
Guillaume Chatelet
a6db871e85 [libc][NFC] Move cpu_features.h to properties subfolder 2023-02-09 09:30:24 +00:00
Guillaume Chatelet
c53e15e841 [libc][NFC] Move compiler_features.h to properties subfolder 2023-02-09 09:26:38 +00:00
Guillaume Chatelet
f100ec2517 [libc][NFC] Move architectures.h to properties subfolder 2023-02-09 09:20:46 +00:00
Guillaume Chatelet
6064742b52 [libc][bazel] Add missing libc_root dep 2023-02-08 14:24:15 +00:00
Benjamin Kramer
938fdfc40f [bazel] Actually put Importer in the right library
Fixes a81136c332
2023-02-08 13:08:26 +01:00
Benjamin Kramer
a81136c332 [bazel] Port b83caa32dc 2023-02-08 13:05:19 +01:00