summaryrefslogtreecommitdiff
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* [mlir] don't hardcode PDL_Operation in Transform dialect extensionsAlex Zinenko2023-05-171-9/+0
| | | | | | | | | | | | | | | | | Update operations in Transform dialect extensions defined in the Affine, GPU, MemRef and Tensor dialects to use the more generic `TransformHandleTypeInterface` type constraint instead of hardcoding `PDL_Operation`. See https://discourse.llvm.org/t/rfc-type-system-for-the-transform-dialect/65702 for motivation. Remove the dependency on PDLDialect from these extensions. Update tests to use `!transform.any_op` instead of `!pdl.operation`. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D150781
* [bazel] Port c8a581c331f27a1ece8e42206831e56b7a222d26Benjamin Kramer2023-05-171-0/+24
|
* [bazel] Fix missing deps for layering checkDmitri Gribenko2023-05-171-0/+1
| | | | | Dependency was introduced by https://github.com/llvm/llvm-project/commit/2c874d2128e35bb38817f349cfdfe9eca7281c9d
* [bazel] Fix missing dependencies for OpenMPGuillaume Chatelet2023-05-171-0/+1
| | | | Differential Revision: https://reviews.llvm.org/D150764
* [bazel] Fix buildAnlun Xu2023-05-161-1/+1
| | | | Differential Revision: https://reviews.llvm.org/D150734
* [bazel] Fix buildAnlun Xu2023-05-161-0/+1
| | | | Differential Revision: https://reviews.llvm.org/D150732
* [bazel] Fix build after 0c4d7d14e94dGoran Flegar2023-05-161-0/+1
|
* [mlir] make structured transform ops use typesAlex Zinenko2023-05-161-2/+0
| | | | | | | | | | | | | | | | | | | | | Types have been introduced a while ago and provide for better readability and transform-time verification. Use them in the ops from the structured transform dialect extension. In most cases, the types are appended as trailing functional types or a derived format of the functional type that allows for an empty right hand size without the annoying `-> ()` syntax (similarly to `func.func` declaration that may omit the arrow). When handles are used inside mixed static/dynamic lists, such as tile sizes, types of those handles follow them immediately as in `sizes [%0 : !transform.any_value, 42]`. This allows for better readability than matching the trailing type. Update code to remove hardcoded PDL dependencies and expunge PDL from structured transform op code. Reviewed By: nicolasvasilache Differential Revision: https://reviews.llvm.org/D144515
* [mlir][gpu][sparse] add gpu ops for sparse matrix computationsAart Bik2023-05-121-0/+1
| | | | | | | | | | | | | | | | This revision extends the GPU dialect with ops that can be lowered to host-oriented sparse matrix library calls (in this case cuSparse focused although the ops could be generalized to support more GPUs in principle). This will allow the "sparse compiler pipeline" to accelerate sparse operations (see follow up revisions with examples of this). For some background; https://discourse.llvm.org/t/sparse-compiler-and-gpu-code-generation/69786/2 Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D150152
* [bazel] fix bazelPeiming Liu2023-05-111-0/+1
| | | | | | Reviewed By: wrengr Differential Revision: https://reviews.llvm.org/D150405
* [bazel][NFC] Add missing dep after 5ac48ef51393e6d8392182ad439a22002571d554Jordan Rupprecht2023-05-111-0/+1
|
* [bazel] Port BUILD rules for 92cc30aca78703174e89880aca85e5a5ff41cc98.Benjamin Chetioui2023-05-091-18/+18
|
* [mlir][vector] Generalize vector.transpose lowering to n-D vectorsHanhan Wang2023-05-081-0/+1
| | | | | | | | | | | | | The existing vector.transpose lowering patterns only triggers if the input vector is 2D. The revision extends the pattern to handle n-D vectors which are effectively 2-D vectors (e.g., vector<1x4x1x8x1). It refactors a common check about 2-D vectors from X86Vector lowering to VectorUtils.h so it can be reused by both sides. Reviewed By: dcaballe Differential Revision: https://reviews.llvm.org/D149908
* [bazel] Make labels to third-party dependencies explicitAaron Siddhartha Mondal2023-05-073-10/+10
| | | | | | | | | | | | | | | | | | | | | | Prefix occurrences of `//utils/bazel` with an explicit `@llvm-raw`. This change lets us reuse code from `configure.bzl` in future compatibility patches for the bzlmod module system. The llvm-project overlay will be made available as an `@llvm-project-overlay` (name WIP) module in the Bazel Central Registry. This means that we will have an `@llvm-project-overlay` workspace in addition to the `@llvm-raw` and `@llvm-project` workspaces currently involved in the build. To keep future patches to the existing build files as small as possible, the explicit naming proposed in this change appears to be the simplest way to not confuse the module workspace resolution. This is not a functional change to the current WORKSPACE build. It is a foundation for future patches. GitHub Issue in the BCR: https://github.com/bazelbuild/bazel-central-registry/issues/206 GitHub Issue in LLVM: https://github.com/llvm/llvm-project/issues/55924 Reviewed By: csigg Differential Revision: https://reviews.llvm.org/D136496
* [bazel] Fix missing deps for layering checkAaron Siddhartha Mondal2023-05-075-0/+7
| | | | | | Reviewed By: #bazel_build, stellaraccident Differential Revision: https://reviews.llvm.org/D150058
* [bazel] Add missing dependency for b8e878da5c2ee65cc7a357890d83445625b59c79Benjamin Kramer2023-05-051-1/+4
|
* Update BUILD.bazel for Mem2Reg deps.Wenzhi Cui2023-05-051-0/+3
| | | | | | Reviewed By: csigg Differential Revision: https://reviews.llvm.org/D149930
* [mlir][Bazel] Update BUILD.bazel file for ↵Adrian Kuegel2023-05-041-16/+73
| | | | | | cc4703745ffa398b66f985b483cb8b61eb2ed425 Differential Revision: https://reviews.llvm.org/D149823
* [mlir][memref] Add helper to make alloca ops independentMatthias Springer2023-05-041-0/+3
| | | | | | Add a helper function that makes dynamic sizes of `memref.alloca` ops independent of a given set of values. This functionality can be used to make dynamic allocations hoistable from loops. Differential Revision: https://reviews.llvm.org/D149316
* Update BUILD file for bazel.Wenzhi Cui2023-05-032-0/+2
| | | | | | | | llvm::CodeGen was missing so add them to deps Reviewed By: csigg Differential Revision: https://reviews.llvm.org/D149720
* [libc][bazel] static link test targetsMichael Jones2023-05-021-0/+1
| | | | | | | | | | | This solves issues caused by the symbols for internal components being marked as hidden. When dynamically linked, the tests of internal components, such as printf_parser_test, fail due to the symbols being unavailable. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149674
* Try to fix CodeGenTypes issues in mlirNAKAMURA Takumi2023-05-031-0/+1
|
* Switch `llvm/CodeGen/MachineValueType.h` to the generated oneNAKAMURA Takumi2023-05-032-12/+11
| | | | | | | | Prune `SupportTests/MVTTest` since it is no longer needed. Depends on D148769 Differential Revision: https://reviews.llvm.org/D148770
* Split out `CodeGenTypes` from `CodeGen` for LLT/MVTNAKAMURA Takumi2023-05-033-9/+41
| | | | | | | | | | | | This reduces dependencies on `llvm-tblgen` so much. `CodeGenTypes` depends on `Support` at the moment. Be careful to append deps on this, since Targets' tablegens depend on this. Depends on D149024 Differential Revision: https://reviews.llvm.org/D148769
* Restore CodeGen/LowLevelType from `Support`NAKAMURA Takumi2023-05-031-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | This is rework of; - D30046 (LLT) Since I have introduced `llvm-min-tblgen` as D146352, `llvm-tblgen` may depend on `CodeGen`. `LowLevlType.h` originally belonged to `CodeGen`. Almost all userse are still under `CodeGen` or `Target`. I think `CodeGen` is the right place to put `LowLevelType.h`. `MachineValueType.h` may be moved as well. (later, D149024) I have made many modules depend on `CodeGen`. It is consistent but inefficient. It will be split out later, D148769 Besides, I had to isolate MVT and LLT in modmap, since `llvm::PredicateInfo` clashes between `TableGen/CodeGenSchedule.h` and `Transforms/Utils/PredicateInfo.h`. (I think better to introduce namespace llvm::TableGen) Depends on D145937, D146352, and D148768. Differential Revision: https://reviews.llvm.org/D148767
* [Bazel] Update for D148308 (riscv-sifive)NAKAMURA Takumi2023-05-031-0/+49
|
* [mlir][Bazel] Adjust BUILD file for changes in ↵Adrian Kuegel2023-05-021-0/+1
| | | | 5e118f933b6590cecd7f1afb30845a1594bc4a5d
* Introduce `llvm-min-tblgen` to build public header filesNAKAMURA Takumi2023-05-022-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | `llvm-min-tblgen` is capable of building `llvm/include/llvm`; - `-gen-attrs` - `-gen-directive-*` - `-gen-intrinsics-*` - `-gen-riscv-target-def` `llvm-min-tblgen` is built and used only when `llvm-tblgen` is built in-tree. This is not installed. `llvm-tblgen` is built with complete set and may be installed. `check-llvm` uses not `llvm-min-tblgen` but `llvm-tblgen`. `LLVM_TABLEGEN_PROJECT` overrides the definition of `tablegen(project)`. `LLVM_HEADERS` is used as the overridden prefix for LLVM header generators. If `EXPORT` is not specified in `add_tablegen`, its tablegen is treated as internal. Let `llvm-tblgen` depend on `intrinsics_gen` Depends on D149072 Differential Revision: https://reviews.llvm.org/D146352
* [bazel] Fix layering check after 0610e2fChristian Sigg2023-05-011-1/+1
| | | | | | `BytecodeWriter.h` is now included in `IR.h`, and the corresponding dependency should be moved to `header_deps`. This change fixes Google's internal build, which seems to have a stricter layering check than bazel's, but it's still the right thing to do. Differential Revision: https://reviews.llvm.org/D149576
* [llvm-gsymutil] Add gsymutil to llvm driver buildAlex Brachet2023-04-281-1/+10
| | | | Differential Revision: https://reviews.llvm.org/D149283
* [mlir][tensor] Add transform to make tensor.pad loop-independentMatthias Springer2023-04-281-0/+38
| | | | | | | | | | | | | | | | | | | | | | | Add a transform to make `tensor.pad` and `tensor.empty` ops independent of SCF loop IVs. Such ops can then be hoisted. E.g.: ``` scf.for %iv = %lb to %ub step %step { %high = affine.apply affine_map<(d0)[s0] -> (s0 - d0)> (%i)[%ub] %p = tensor.pad %t low[5] high[%high] ... ... } ``` Is transformed to: ``` %high_new = affine.apply affine_map<()[s0, s1] -> (-s0 + s1)> ()[%lb, %ub] %p_hoistable = tensor.pad %t low[5] high[%high_new] %dim = tensor.dim %t, %c0 %size = affine.apply affine_map<(d0)[s0, s1] -> (-d0 + s0 + s1 + 5)>(%iv)[%ub, %dim] %slice = tensor.extract_slice %p_hoistable [0] [%size] [1] ``` Differential Revision: https://reviews.llvm.org/D143910
* [bazel][mlir] fix build for transform utilsMikhail Goncharov2023-04-271-0/+1
|
* [bazel][mlir] update build for mem2reg f88f8fd0bca34dc8e5571cb828b1a159a50fd504Mikhail Goncharov2023-04-271-2/+46
| | | | Differential Revision: https://reviews.llvm.org/D149326
* [bazel][NFC] Run buildifier on libc/libc_build_rules.bzl.Jorge Gorbe Moya2023-04-261-0/+1
|
* [libc][bazel] add file printf targets and supportMichael Jones2023-04-264-19/+170
| | | | | | | | | | | This patch adds targets for printf and fprintf to the bazel build. Additionally, it adds support for the build system to specify where files should be written for testing purposes. This was necessary to enable the fprintf test under bazel. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D147008
* [bazel][mlir] fix for d3f9388ffEmilio Cota2023-04-261-0/+1
|
* [llvm-gsymutil] Switch to OptTableAlex Brachet2023-04-261-0/+14
| | | | Differential Revision: https://reviews.llvm.org/D148775
* [bazel] Fix //libc:errno deps after d9f033146b47ceef94c1f041afcd339ef007279e.Jorge Gorbe Moya2023-04-251-0/+1
|
* [mlir] reorgnize Linalg TransformOps files. NFCAlex Zinenko2023-04-251-3/+5
| | | | | | | | | | | Mirror the separation between LinalgTransformOps and LinalgMatchOps in headers. Create a separate pair of files for the extension. Depends on D148017 Reviewed By: springerm Differential Revision: https://reviews.llvm.org/D148075
* [bazel] Fix libc target deps after 7090c102731192d5abafb7e0b2b49adb4912efaeJorge Gorbe Moya2023-04-251-1/+7
|
* [bazel] update build for MLIR test for c8d1388e6c8bd57299d5801f170719218f735c4cMikhail Goncharov2023-04-251-0/+1
|
* [bazel][mlir] Fold :Observers and :BreakpointManagers into :DebugEmilio Cota2023-04-252-33/+8
| | | | | | To avoid circular deps. While at it, add missing dep on CAPIIR.
* [bazel][mlir] Build Debug/BreakpointManagers only from a single targetEmilio Cota2023-04-241-2/+0
| | | | | | | | When writing 5f2b0892d "[bazel][mlir] BreakpointManager fixes for 7f069f5", I did not notice that 17c6de3f1 "[bazel] Fix bazel build for 7f069f5ef.." had added Debug/BreakpointManagers globs to the Debug target. But these are already being built in the "BreakpointManagers" target; remove them from "Debug".
* [bazel][mlir] BreakpointManager fixes for 7f069f5ef4feEmilio Cota2023-04-241-0/+1
|
* [mlir] Dialect type/attr bytecode read/write generator.Jacques Pienaar2023-04-241-0/+22
| | | | | | | | | | | | | | | Tool to help generate dialect bytecode Attribute & Type reader/writing. Show usage by flipping builtin dialect. It helps reduce boilerplate when writing dialect bytecode attribute and type readers/writers. It is not an attempt at a generic spec mechanism but rather practically focussing on boilerplate reduction while also considering that it need not be the only in memory format and make it relatively easy to change. There should be some cleanup in follow up as we expand to more dialects. Differential Revision: https://reviews.llvm.org/D144820
* [bazel] test files for IRDL 8ac8c922fb3f15706f5cb1db2cc655d30b095766Mikhail Goncharov2023-04-241-0/+2
| | | | Differential Revision: https://reviews.llvm.org/D149056
* Drop MLIR Bazel dependency on LLVM AnalysisAlex Zinenko2023-04-241-1/+0
| | | | | | | | | This is no longer necessary after f5425c128a30 and significatly decreases the build time and the binary footprint. Reviewed By: Dinistro Differential Revision: https://reviews.llvm.org/D149042
* [bazel] update for ba38640b9901d239e32e12c6569f7364d00af922Mikhail Goncharov2023-04-241-0/+1
|
* [bazel] Port for 8ac8c922fb3f15706f5cb1db2cc655d30b095766Haojian Wu2023-04-231-1/+6
|
* [Bazel] Rename LLVMTableGenGlobalISel to TableGenGlobalISelNAKAMURA Takumi2023-04-232-3/+3
|