* dyn_cast_or_null
- This will first check if the operation is null before trying to 'dyn_cast':
Value *v = ...;
if (auto forOp = dyn_cast_or_null<AffineForOp>(v->getDefiningOp()))
...
* isa_nonnull
- This will first check if the pointer is null before trying to 'isa':
Value *v = ...;
if (isa_nonnull<AffineForOp>(v->getDefiningOp());
...
--
PiperOrigin-RevId: 242171343
Use MLIR's ExecutionEngine to demonstrate how one can implement a simple
JIT-compiler and executor after fully lowering the Linalg dialect to the LLVM
IR dialect, using the direct conversion (not going through standard
loads/stores).
--
PiperOrigin-RevId: 242127690
This CL adds declarative tiling support in the linalg dialect by providing:
1. loop tiling on linalg ops by simply calling into mlir::tile
2. view tiling on linalg ops by:
a. computing the subview between for each tile dimension based on the loop tile size and the mapping of loops to operand ranges.
b. declaring that the tiled form of a tensorcontraction is the same tensorcontraction on subviews, which essentially gives us a recursive form.
Point 2.b is potentially subject to change in the future.
--
PiperOrigin-RevId: 242058658
This CL adds the last bit to convert from linalg.LoadOp and linalg.StoreOp to the affine dialect, as well as a unit test to exercise the conversion.
--
PiperOrigin-RevId: 242045826
Load and Store Linalg operations are converter to their LLVM IR counterparts
preceded by a sequence of operations that recover the effective address of the
accessed element. The address is computed given the subscripts and the view
descriptor as
base_pointer + base_offset + SUM_i subscript_i * stride_i.
Manual testing shows that the resulting LLVM IR for the matrix multiplication
example can be compiled and executed, producing correct results.
--
PiperOrigin-RevId: 241889003