Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4 |
|
#
b9f73714 |
| 20-Oct-2023 |
Mehdi Amini <joker.eph@gmail.com> |
Apply clang-tidy fixes for llvm-qualified-auto in MLProgramOps.cpp (NFC)
|
Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1 |
|
#
cbd47504 |
| 18-Sep-2023 |
Rob Suderman <suderman@google.com> |
[mlir][mlprogram] Add `mlprogram-pipeline-globals` optimization pass
Added pass optimizes MLProgram global operations by reducing to only the minimal load/store operations for global tensors. This a
[mlir][mlprogram] Add `mlprogram-pipeline-globals` optimization pass
Added pass optimizes MLProgram global operations by reducing to only the minimal load/store operations for global tensors. This avoids unnecessary global operations throughout a program and potentially improves operation gusion.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D159228
show more ...
|
Revision tags: llvmorg-17.0.0, llvmorg-17.0.0-rc4 |
|
#
34a35a8b |
| 31-Aug-2023 |
Martin Erhart <merhart@google.com> |
[mlir] Move FunctionInterfaces to Interfaces directory and inherit from CallableOpInterface
Functions are always callable operations and thus every operation implementing the `FunctionOpInterface` a
[mlir] Move FunctionInterfaces to Interfaces directory and inherit from CallableOpInterface
Functions are always callable operations and thus every operation implementing the `FunctionOpInterface` also implements the `CallableOpInterface`. The only exception was the FuncOp in the toy example. To make implementation of the `FunctionOpInterface` easier, this commit lets `FunctionOpInterface` inherit from `CallableOpInterface` and merges some of their methods. More precisely, the `CallableOpInterface` has methods to get the argument and result attributes and a method to get the result types of the callable region. These methods are always implemented the same way as their analogues in `FunctionOpInterface` and thus this commit moves all the argument and result attribute handling methods to the callable interface as well as the methods to get the argument and result types. The `FuntionOpInterface` then does not have to declare them as well, but just inherits them from the `CallableOpInterface`. Adding the inheritance relation also required to move the `FunctionOpInterface` from the IR directory to the Interfaces directory since IR should not depend on Interfaces.
Reviewed By: jpienaar, springerm
Differential Revision: https://reviews.llvm.org/D157988
show more ...
|
Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7 |
|
#
53406427 |
| 06-Dec-2022 |
Jeff Niu <jeff@modular.com> |
[mlir] FunctionOpInterface: turn required attributes into interface methods (Reland)
Reland D139447, D139471 With flang actually working
- FunctionOpInterface: make get/setFunctionType interface me
[mlir] FunctionOpInterface: turn required attributes into interface methods (Reland)
Reland D139447, D139471 With flang actually working
- FunctionOpInterface: make get/setFunctionType interface methods
This patch removes the concept of a `function_type`-named type attribute as a requirement for implementors of FunctionOpInterface. Instead, this type should be provided through two interface methods, `getFunctionType` and `setFunctionTypeAttr` (*Attr because functions may use different concrete function types), which should be automatically implemented by ODS for ops that define a `$function_type` attribute.
This also allows FunctionOpInterface to materialize function types if they don't carry them in an attribute, for example.
Importantly, all the function "helper" still accept an attribute name to use in parsing and printing functions, for example.
- FunctionOpInterface: arg and result attrs dispatch to interface
This patch removes the `arg_attrs` and `res_attrs` named attributes as a requirement for FunctionOpInterface and replaces them with interface methods for the getters, setters, and removers of the relevent attributes. This allows operations to use their own storage for the argument and result attributes.
Reviewed By: jpienaar
Differential Revision: https://reviews.llvm.org/D139736
show more ...
|
#
cf98e827 |
| 09-Dec-2022 |
David Spickett <david.spickett@linaro.org> |
Revert "[mlir] FunctionOpInterface: make get/setFunctionType interface methods" and "[mlir] Fix examples build"
This reverts commit fbc253fe81da4e1d6bfa2519e01e03f21d8c40a8 and 96cf183bccd7d1c3083f1
Revert "[mlir] FunctionOpInterface: make get/setFunctionType interface methods" and "[mlir] Fix examples build"
This reverts commit fbc253fe81da4e1d6bfa2519e01e03f21d8c40a8 and 96cf183bccd7d1c3083f169a89a6af1f263b3aae.
Which I missed in the first revert in f3379feabe38fd3711b13ffcf6de4aab03b7ccdc.
show more ...
|
#
f3379fea |
| 09-Dec-2022 |
David Spickett <david.spickett@linaro.org> |
Revert "[mlir] FunctionOpInterface: arg and result attrs dispatch to interface" and "[flang] Fix flang after MLIR update"
This reverts commit dd74e6b6f4fb7a4685086a4895c1934e043f875b and 1897b67ae86
Revert "[mlir] FunctionOpInterface: arg and result attrs dispatch to interface" and "[flang] Fix flang after MLIR update"
This reverts commit dd74e6b6f4fb7a4685086a4895c1934e043f875b and 1897b67ae86470ad54f6baea6f220933d8053b5b due to ongoing test failures on flang bots e.g. https://lab.llvm.org/buildbot/#/builders/179/builds/5050
show more ...
|
#
dd74e6b6 |
| 06-Dec-2022 |
Jeff Niu <jeff@modular.com> |
[mlir] FunctionOpInterface: arg and result attrs dispatch to interface
This patch removes the `arg_attrs` and `res_attrs` named attributes as a requirement for FunctionOpInterface and replaces them
[mlir] FunctionOpInterface: arg and result attrs dispatch to interface
This patch removes the `arg_attrs` and `res_attrs` named attributes as a requirement for FunctionOpInterface and replaces them with interface methods for the getters, setters, and removers of the relevent attributes. This allows operations to use their own storage for the argument and result attributes.
Depends on D139471
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D139472
show more ...
|
#
fbc253fe |
| 06-Dec-2022 |
Jeff Niu <jeff@modular.com> |
[mlir] FunctionOpInterface: make get/setFunctionType interface methods
This patch removes the concept of a `function_type`-named type attribute as a requirement for implementors of FunctionOpInterfa
[mlir] FunctionOpInterface: make get/setFunctionType interface methods
This patch removes the concept of a `function_type`-named type attribute as a requirement for implementors of FunctionOpInterface. Instead, this type should be provided through two interface methods, `getFunctionType` and `setFunctionTypeAttr` (*Attr because functions may use different concrete function types), which should be automatically implemented by ODS for ops that define a `$function_type` attribute.
This also allows FunctionOpInterface to materialize function types if they don't carry them in an attribute, for example.
Importantly, all the function "helper" still accept an attribute name to use in parsing and printing functions, for example.
Reviewed By: rriddle, lattner
Differential Revision: https://reviews.llvm.org/D139447
show more ...
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6 |
|
#
d30c0221 |
| 17-Jun-2022 |
Jacques Pienaar <jpienaar@google.com> |
[mlir] Split MLProgram global load and store to Graph variants
* Split ops into X_graph variants as discussed; * Remove tokens from non-Graph region variants and rely on side-effect modelling ther
[mlir] Split MLProgram global load and store to Graph variants
* Split ops into X_graph variants as discussed; * Remove tokens from non-Graph region variants and rely on side-effect modelling there while removing side-effect modelling from Graph variants and relying on explicit ordering there; * Make tokens required to be produced by Graph variants - but kept explicit token type specification given previous discussion on this potentially being configurable in future;
This results in duplicating some code. I considered adding helper functions but decided against adding an abstraction there early given size of duplication and creating accidental coupling.
Differential Revision: https://reviews.llvm.org/D127813
show more ...
|
Revision tags: llvmorg-14.0.5 |
|
#
3bb79993 |
| 31-May-2022 |
Stella Laurenzo <stellaraccident@gmail.com> |
[mlir] Add global_load and global_store ops to ml_program.
* Adds simple, non-atomic, non-volatile, non-synchronized direct load/store ops.
Differential Revision: https://reviews.llvm.org/D126230
|
Revision tags: llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2 |
|
#
2bb25285 |
| 23-Apr-2022 |
Stella Laurenzo <stellaraccident@gmail.com> |
[mlir] Add GlobalOp, GlobalLoadConstOp to ml_program.
The approach I took was to define a dialect 'extern' attribute that a GlobalOp can take as a value to signify external linkage. I think this app
[mlir] Add GlobalOp, GlobalLoadConstOp to ml_program.
The approach I took was to define a dialect 'extern' attribute that a GlobalOp can take as a value to signify external linkage. I think this approach should compose well and should also work with wherever the OpaqueElements work goes in the future (since that is just another kind of attribute). I special cased the GlobalOp parser/printer for this case because it is significantly easier on the eyes.
In the discussion, Jeff Niu had proposed an alternative syntax for GlobalOp that I ended up not taking. I did try to implement it but a) I don't think it made anything easier to read in the common case, and b) it made the parsing/printing logic a lot more complicated (I think I would need a completely custom parser/printer to do it well). Please have a look at the common cases where the global type and initial value type match: I don't think how I have it is too bad. The less common cases seem ok to me.
I chose to only implement the direct, constant load op since that is non side effecting and there was still discussion pending on that.
Differential Revision: https://reviews.llvm.org/D124318
show more ...
|
#
61352a58 |
| 14-Apr-2022 |
Stella Laurenzo <stellaraccident@gmail.com> |
[mlir] Introduce ml_program dialect.
Differential Revision: https://reviews.llvm.org/D120203
|