summaryrefslogtreecommitdiffstats
path: root/mlir/lib/EDSC/Helpers.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [mlir] NFC: Rename index_t to index_typeRainer Orth2020-03-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | mlir currently fails to build on Solaris: /vol/llvm/src/llvm-project/dist/mlir/lib/Conversion/VectorToLoops/ConvertVectorToLoops.cpp:78:20: error: reference to 'index_t' is ambiguous IndexHandle zero(index_t(0)), one(index_t(1)); ^ /usr/include/sys/types.h:103:16: note: candidate found by name lookup is 'index_t' typedef short index_t; ^ /vol/llvm/src/llvm-project/dist/mlir/include/mlir/EDSC/Builders.h:27:8: note: candidate found by name lookup is 'mlir::edsc::index_t' struct index_t { ^ and many more. Given that POSIX reserves all identifiers ending in `_t` 2.2.2 The Name Space <https://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html>, it seems quite unwise to use such identifiers in user code, even more so without a distinguished prefix. The following patch fixes this by renaming `index_t` to `index_type`. cases. Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`. Differential Revision: https://reviews.llvm.org/D72619 (cherry picked from commit 002ec79f979b9da9dedafe7ea036e00c90a9fbb7)
* [mlir] NFC: Remove Value::operator* and Value::operator-> now that Value is ↵River Riddle2020-01-111-3/+3
| | | | | | | | | | properly value-typed. Summary: These were temporary methods used to simplify the transition. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D72548
* NFC: Replace ValuePtr with Value and remove it now that Value is value-typed.River Riddle2019-12-231-3/+3
| | | | | | ValuePtr was a temporary typedef during the transition to a value-typed Value. PiperOrigin-RevId: 286945714
* Adjust License.txt file to use the LLVM licenseMehdi Amini2019-12-231-13/+4
| | | | PiperOrigin-RevId: 286906740
* NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transition to ↵River Riddle2019-12-221-3/+3
| | | | | | | | | | Value being value-typed. This is an initial step to refactoring the representation of OpResult as proposed in: https://groups.google.com/a/tensorflow.org/g/mlir/c/XXzzKhqqF_0/m/v6bKb08WCgAJ This change will make it much simpler to incrementally transition all of the existing code to use value-typed semantics. PiperOrigin-RevId: 286844725
* Lower vector transfer ops to loop.for operations.Nicolas Vasilache2019-10-181-4/+1
| | | | | | This allows mixing linalg operations with vector transfer operations (with additional modifications to affine ops) and is a step towards solving tensorflow/mlir#189. PiperOrigin-RevId: 275543361
* NFC: Move LLVMIR, SDBM, and StandardOps to the Dialect/ directory.River Riddle2019-08-191-1/+1
| | | | PiperOrigin-RevId: 264193915
* Remove unnecessary C++ specifier in CPP files. NFC.Jacques Pienaar2019-05-201-1/+1
| | | | | | | | These are only required in .h files to disambiguate between C and C++ header files. -- PiperOrigin-RevId: 248219135
* Make edsc::IndexedValue templated - NFCNicolas Vasilache2019-03-291-35/+0
| | | | | | | This allows the indexing sugar to just work naturally with other type of load and store ops than the affine ones we currently have. This is needed for the EuroLLVM tutorial. PiperOrigin-RevId: 239602257
* Remove LOAD/STORE/RETURN boilerplate in declarative builders.Nicolas Vasilache2019-03-291-4/+4
| | | | | | | | | | | | | This CL introduces a ValueArrayHandle helper to manage the implicit conversion of ArrayRef<ValueHandle> -> ArrayRef<Value*> by converting first to ValueArrayHandle. Without this, boilerplate operations that take ArrayRef<Value*> cannot be removed easily. This all seems to boil down to decoupling Value from Type. Alternative solutions exist (e.g. MLIR using Value by value everywhere) but they would be very intrusive. This seems to be the lowest impedance change. Intrinsics are also lowercased by popular demand. PiperOrigin-RevId: 238974125
* Port LowerVectorTransfers from EDSC + AST to declarative buildersNicolas Vasilache2019-03-291-25/+15
| | | | | | | | | | | | | | | This CL removes the dependency of LowerVectorTransfers on the AST version of EDSCs which will be retired. This exhibited a pretty fundamental staging difference in AST-based vs declarative based emission. Since the delayed creation with an AST was staged, the loop order came into existence after the clipping expressions were computed. This now changes as the loops first need to be created declaratively in fixed order and then the clipping expressions are created. Also, due to lack of staging, coalescing cannot be done on the fly anymore and needs to be done either as a pre-pass (current implementation) or as a local transformation on the generated IR (future work). Tests are updated accordingly. PiperOrigin-RevId: 238971631
* Add support for custom ops in declarative builders.Nicolas Vasilache2019-03-291-4/+4
| | | | | | | | This CL adds support for named custom instructions in declarative builders. To allow this, it introduces a templated `CustomInstruction` class. This CL also splits ValueHandle which can capture only the **value** in single-valued instructions from InstructionHandle which can capture any instruction but provide no typing and sugaring to extract the potential Value*. PiperOrigin-RevId: 237543222
* Fix opt build.MLIR Team2019-03-291-0/+1
| | | | PiperOrigin-RevId: 237141751
* Fix an incorrect comment in builder-api-test.Nicolas Vasilache2019-03-291-2/+0
| | | | | | Also address post commit cleanups that were missed. PiperOrigin-RevId: 237122077
* Add helper classes to declarative builders to help write end-to-end custom ops.Nicolas Vasilache2019-03-291-0/+110
This CL adds the same helper classes that exist in the AST form of EDSCs to support a basic indexing notation and emit the proper load and store operations and capture MemRefViews as function arguments. This CL also adds a wrapper class LoopNestBuilder to allow generic rank-agnostic loops over indices. PiperOrigin-RevId: 237113755
OpenPOWER on IntegriCloud