| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Remove the ability to print an attribute without a type, but allow for attributes to elide the type under certain circumstances. This fixes a bug where attributes within ArrayAttr, and other collection attributes, would never print the type.
PiperOrigin-RevId: 255306974
|
|
|
|
|
|
|
|
| |
Split out class to command line parser for translate methods into standalone
class. Similar to splitting up mlir-opt to reuse functionality with different
initialization.
PiperOrigin-RevId: 255225790
|
|
|
|
|
|
|
|
|
| |
annotations.
Getters are required as there are currently no global constants in MLIR and this
is an easy way to unblock CUDA execution while waiting for those.
PiperOrigin-RevId: 255169002
|
|
|
|
|
|
|
|
|
|
|
| |
The actual transformation from PTX source to a CUDA binary is now factored out,
enabling compiling and testing the transformations independently of a CUDA
runtime.
MLIR has still to be built with NVPTX target support for the conversions to be
built and tested.
PiperOrigin-RevId: 255167139
|
|
|
|
|
|
|
|
| |
into the mlir namespace.
Now that Locations are attributes, they have direct access to the MLIR context. This allows for simplifying error emission by removing unnecessary context lookups.
PiperOrigin-RevId: 255112791
|
|
|
|
|
|
|
|
|
|
|
| |
The current syntax separates the name and value with ':', but ':' is already overloaded by several other things(e.g. trailing types). This makes the syntax difficult to parse in some situtations:
Old:
"foo: 10 : i32"
New:
"foo = 10 : i32"
PiperOrigin-RevId: 255097928
|
|
|
|
| |
PiperOrigin-RevId: 255078768
|
|
|
|
|
|
|
|
|
| |
This is the standard syntax for types on operations, and is also already used by IntegerAttr and FloatAttr.
Example:
dense<5> : tensor<i32>
dense<[3]> : tensor<1xi32>
PiperOrigin-RevId: 255069157
|
|
|
|
| |
PiperOrigin-RevId: 255054639
|
|
|
|
| |
PiperOrigin-RevId: 255022564
|
|
|
|
|
|
| |
This iterator is useful for implementing random access iterators based upon an index and an object pointer. Moving it to STLExtras allows for reuse elsewhere throughout the codebase, e.g. simplifying the DenseElementsAttr iterators.
PiperOrigin-RevId: 255020377
|
|
|
|
| |
PiperOrigin-RevId: 255018853
|
|
|
|
| |
PiperOrigin-RevId: 254997746
|
|
|
|
|
|
|
|
| |
materializing constants.
The OperationFolder currently just inserts into the entry block of a Function, but regions may be isolated above, i.e. explicit capture only, and blindly inserting constants may break the invariants of these regions.
PiperOrigin-RevId: 254987796
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GPU dialect operations (launch and launch_func) use `index` type for thread and
block index values inside the kernel, for compatibility with affine loops.
NVVM dialect operations, following the NVVM intrinsics, use `!llvm.i32` type,
which does not necessarily have the same bit width as the lowered `index` type.
Optionally sign-extend (indices are signed) or truncate the result of the NVVM
dialect operation to the bit width of the lowered `index` type before passing
it to other operations. This behavior is consistent with `std.index_cast`. We
cannot use the latter since we are targeting LLVM dialect types directly,
rather than standard integer types.
PiperOrigin-RevId: 254980868
|
|
|
|
|
|
| |
Also some mild cleanup of the kernel to cubin conversion pass.
PiperOrigin-RevId: 254959303
|
|
|
|
| |
PiperOrigin-RevId: 254957980
|
|
|
|
|
|
|
|
|
|
| |
PTX backend in LLVM expects additional module-level metadata
`!nvvm.annotations` that lists functions that can be used as GPU kernels.
Generate this metadata based on the `gpu.kernel` attribute attached to
functions. This attribute is added automatically by the kernel outlining pass
in the GPU dialect lowering flow.
PiperOrigin-RevId: 254957345
|
|
|
|
|
|
|
|
| |
Add accessor functions that return `gpu::KernelDim3` containing the respective
operands for grid and block size accepted by `gpu.launch_func`. Use the same
signature as for `gpu.launch`.
PiperOrigin-RevId: 254942674
|
|
|
|
|
|
|
|
|
|
| |
Values (NFC)
The error would look like:
path/filename.mlir:32:23: error: use of value '%28' expects different type than prior uses: ''i32'' vs ''!_tf.control''
PiperOrigin-RevId: 254874859
|
|
|
|
| |
PiperOrigin-RevId: 254872695
|
|
|
|
| |
PiperOrigin-RevId: 254847773
|
|
|
|
|
|
| |
Instead put their impl in test/lib and link them into mlir-test-opt
PiperOrigin-RevId: 254837439
|
|
|
|
|
|
| |
LLVM is not thread-safe which means that several of the 'get' methods for LLVMType must be double locked to ensure thread-safety. This cl adds static caching, i.e. no lookups or locking, for several simple LLVM types(i1, half, void, etc.). It also cleans up the implementation of the double locking that is required for some types. In the future we could add a form of dynamic caching to only need to lock one mutex in the best case, but that requires analysis on the memory overhead/vs time lost to taking two locks.
PiperOrigin-RevId: 254806747
|
|
|
|
|
|
| |
operands being None, Volatile, Aligned and Nontemporal
PiperOrigin-RevId: 254792353
|
|
|
|
| |
PiperOrigin-RevId: 254771979
|
|
|
|
| |
PiperOrigin-RevId: 254770395
|
|
|
|
|
|
|
|
|
| |
This CL makes use of view_slice in tiling and fusion.
Using a higher level IR element greatly simplifies the IR produced during tiling and fusion.
Lowering to LLVM is updated to first translate view_slice into a sequence of dim, range and cmpi.
This level will also be useful when lowering to affine.
PiperOrigin-RevId: 254767814
|
|
|
|
| |
PiperOrigin-RevId: 254767366
|
|
|
|
|
|
|
|
| |
Enable reusing the real mlir-opt main from unit tests and in case where
additional initialization needs to happen before main is invoked (e.g., when
using different command line flag libraries).
PiperOrigin-RevId: 254764575
|
|
|
|
|
|
| |
This will be useful to simplify the IR emitted during transformations as well as lowering to affine.
PiperOrigin-RevId: 254757641
|
|
|
|
|
|
|
| |
The new operations affine.load and affine.store will take composed affine maps by construction.
These operations will eventually replace load and store operations currently used in affine regions and operated on by affine transformation and analysis passes.
PiperOrigin-RevId: 254754048
|
|
|
|
|
|
| |
also removes the unused 'NthRegionIsIsolatedFromAbove' trait as it was replaced with a more general 'IsIsolatedFromAbove'.
PiperOrigin-RevId: 254709704
|
|
|
|
| |
PiperOrigin-RevId: 254580672
|
|
|
|
|
|
| |
behavior of InFlightDiagnostic and enables notes to be converted to failure.
PiperOrigin-RevId: 254579098
|
|
|
|
| |
PiperOrigin-RevId: 254578530
|
|
|
|
|
|
| |
that materializes an attribute value with the given type. This effectively adds support for dialect specific constant values that have different invariants than std.constant. 'OperationFolder' is updated to use this new hook, or attempt to default to std.constant when legal.
PiperOrigin-RevId: 254570153
|
|
|
|
|
|
| |
Now that Locations are Attributes they contain a direct reference to the MLIRContext, i.e. the context can be directly accessed from the given location instead of being explicitly passed in.
PiperOrigin-RevId: 254568329
|
|
|
|
| |
PiperOrigin-RevId: 254557652
|
|
|
|
| |
PiperOrigin-RevId: 254519710
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ModuleOp contains a single region that must contain a single block. This block must be terminated by a new pseudo operation 'module_terminator'. The syntax for this operations is as follows:
`module` (`attributes` attr-dict)? region
Example:
module {
...
}
module attributes { ... } {
...
}
PiperOrigin-RevId: 254513752
|
|
|
|
| |
PiperOrigin-RevId: 254507641
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds a conv op that corresponds to the TF description along with its lowering to loops (https://www.tensorflow.org/api_docs/python/tf/nn/convolution).
The dimension of the convolution is inferred from the rank of the views. The other logical
dimensions correspond to the TF description.
The computation of tiled views need to be updated to work for the input tensor. This is left for a future CL.
PiperOrigin-RevId: 254505644
|
|
|
|
|
|
| |
This will allow for locations to be used in the same contexts as attributes. Given that attributes are nullable types, the 'Location' class now represents a non-nullable wrapper around a 'LocationAttr'. This preserves the desired semantics we have for non-optional locations.
PiperOrigin-RevId: 254505278
|
|
|
|
| |
PiperOrigin-RevId: 254495164
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds the basic SPIR-V serializer and deserializer for converting
SPIR-V module into the binary format and back. Right now only an empty
module with addressing model and memory model is supported; (de)serialize
other components will be added gradually with subsequent CLs.
The purpose of this library is to enable importing SPIR-V binary modules
to run transformations on them and exporting SPIR-V modules to be consumed
by execution environments. The focus is transformations, which inevitably
means changes to the binary module; so it is not designed to be a general
tool for investigating the SPIR-V binary module and does not guarantee
roundtrip equivalence (at least for now).
PiperOrigin-RevId: 254473019
|
|
|
|
|
|
| |
a historical dependency that is no longer needed.
PiperOrigin-RevId: 254460518
|
|
|
|
|
|
| |
allows for them to be used with llvm::enumerate and other various iterator utilities.
PiperOrigin-RevId: 254460201
|
|
|
|
|
|
| |
that they can be used with llvm::enumerate.
PiperOrigin-RevId: 254422623
|
|
|
|
|
|
| |
the test suite.
PiperOrigin-RevId: 254421795
|