summaryrefslogtreecommitdiffstats
path: root/mlir
Commit message (Collapse)AuthorAgeFilesLines
...
* Annotate outlined kernel functions with the attribute `gpu.kernel`.Thomas Joerg2019-05-103-0/+8
| | | | | | -- PiperOrigin-RevId: 247589560
* Add gpu.launch_func builder taking KernelDim3 arguments (NFC).Thomas Joerg2019-05-104-10/+41
| | | | | | -- PiperOrigin-RevId: 247577649
* Pass for outlining gpu.launch operation bodies into kernel functions ↵Thomas Joerg2019-05-106-4/+229
| | | | | | | | called by gpu.launch_func operations. -- PiperOrigin-RevId: 247564213
* Remove unused PassID member from PassRegistry (NFC)Mehdi Amini2019-05-102-6/+1
| | | | | | | | Fix clang warning -- PiperOrigin-RevId: 247558931
* Remove unused MLIRContext member from MutableAffineMap class (NFC)Mehdi Amini2019-05-102-6/+2
| | | | | | | | Fix clang warning -- PiperOrigin-RevId: 247558650
* Make header-defined method inline instead of static (NFC)Mehdi Amini2019-05-101-1/+1
| | | | | | | | | This is fixing a clang warning when this header is included in a file that does not use this function. -- PiperOrigin-RevId: 247557803
* Fix class/struct mismatch between declaration/definition (NFC)Mehdi Amini2019-05-103-4/+4
| | | | | | | | Fix clang warnings -- PiperOrigin-RevId: 247557395
* Add override keyword on overidden virtual method (NFC)Mehdi Amini2019-05-102-12/+14
| | | | | | | | Fix clang warnings -- PiperOrigin-RevId: 247556495
* Move the diagnostic verification functionality out of mlir-opt and into ↵River Riddle2019-05-103-138/+239
| | | | | | | | a new llvm::SourceMgr diagnostic handler 'SourceMgrDiagnosticVerifierHandler'. This will allow for other tools to reuse the 'expected-*' functionality. -- PiperOrigin-RevId: 247514684
* Only forbid mixing tensor and vector when considering broadcasting behaviorLei Zhang2019-05-101-53/+32
| | | | | | | | | The previous approach is too restrictive; we end up forbidding all dialect-specific types as element types. Changed to not consider element types entirely. -- PiperOrigin-RevId: 247486537
* Add support in the SourceMgrDiagnosticHandler for handling source ↵River Riddle2019-05-102-5/+34
| | | | | | | | managers with multiple buffers. -- PiperOrigin-RevId: 247482733
* Move edsc python tests to FilecheckNicolas Vasilache2019-05-101-240/+271
| | | | | | -- PiperOrigin-RevId: 247479507
* Pipe Linalg to LLVM via mlir-cpu-runnerNicolas Vasilache2019-05-1014-150/+653
| | | | | | | | | | | This CL adds support for functions in the Linalg dialect to run with mlir-cpu-runner. For this purpose, this CL adds BufferAllocOp, BufferDeallocOp, LoadOp and StoreOp to the Linalg dialect as well as their lowering to LLVM. To avoid collisions with mlir::LoadOp/StoreOp (which should really become mlir::affine::LoadOp/StoreOp), the mlir::linalg namespace is added. The execution uses a dummy linalg_dot function that just returns for now. In the future a proper library call will be used. -- PiperOrigin-RevId: 247476061
* Fix OSS build (Linux)Nicolas Vasilache2019-05-104-3/+9
| | | | | | -- PiperOrigin-RevId: 247472005
* Update mlir::interleaveComma to work on ranges with types other than ↵River Riddle2019-05-101-3/+11
| | | | | | | | Container<T>. -- PiperOrigin-RevId: 247468184
* Add memref dimension bounds as upper/lower bounds on MemRefRegion ↵Andy Davis2019-05-106-9/+62
| | | | | | | | constraints, to guard against potential over-approximation from projection. -- PiperOrigin-RevId: 247431201
* Fix bug in DmaGenerate pass where MemRefRegion union was not propagated ↵Andy Davis2019-05-102-14/+72
| | | | | | | | | | to read region. Also cleaned up dma-generate.mlir a bit. -- PiperOrigin-RevId: 247417358
* Conversion to LLVM Dialect: integrate TypeConverter into LLVMLoweringAlex Zinenko2019-05-104-286/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, the conversion from standard and built-in types to the LLVM IR dialect types was performed by a dedicated class, TypeConverter. This class served to contain references to the LLVM IR dialect and to the LLVM IR Module to allow querying the data layout. Recently, the LLVMLowering class was introduced to make the conversion to the LLVM IR dialect extensible to other source dialects. This class also includes the references to the LLVM IR dialect and module. TypeConverter was extended with basic support for dialect-specific type conversion through callbacks. This is not sufficient in cases where dialect-specific types appear inside other types, such as function or container types. Integrate TypeConverter into LLVMLowering. Whenever a subtype needs to be converted during standard type conversion (e.g. an argument or a result of a FunctionType), the conversion will call to the virtual function `LLVMLowering::convertType`, which can be extended to support dialect-specific types. Provide a new LLVMOpConversion class that serves as a base class for all conversions to the LLVM IR dialect and gives them access to LLVMLowering for the purpose of type conversion. Update Linalg to LLVM IR lowering to use this class. -- PiperOrigin-RevId: 247407314
* Fix builder for LLVM::Alloca operation.Stephan Herhut2019-05-101-1/+2
| | | | | | -- PiperOrigin-RevId: 247402238
* Add gpu.launch_func builder.Thomas Joerg2019-05-102-0/+18
| | | | | | -- PiperOrigin-RevId: 247364893
* Simplify the emission of a few op parser diagnostics. This also adds the ↵River Riddle2019-05-106-22/+39
| | | | | | | | ability to stream an attribute into a Diagnostic. -- PiperOrigin-RevId: 247359911
* Move the definitions of AllocOp and DeallocOp to tablegen.River Riddle2019-05-103-109/+95
| | | | | | -- PiperOrigin-RevId: 247359472
* Add a utility diagnostic handler class, SourceMgrDiagnosticHandler, to ↵River Riddle2019-05-103-73/+114
| | | | | | | | interface with llvm::SourceMgr. This lowers the barrier of entry for tools to get rich diagnostic handling when using llvm::SourceMgr. -- PiperOrigin-RevId: 247358610
* Add an AttrBase class to simplify defining derived Attributes. This ↵River Riddle2019-05-1012-253/+300
| | | | | | | | class serves the same purpose as TypeBase, and thus the duplicated functionality has been split into a new support class 'StorageUserBase'. -- PiperOrigin-RevId: 247358373
* Rename DialectTypeRegistry to DialectSymbolRegistry in preparation for ↵River Riddle2019-05-102-23/+23
| | | | | | | | dialect defined attributes. -- PiperOrigin-RevId: 247357665
* Simplify the parser/printer of ConstantOp now that all attributes have ↵River Riddle2019-05-1022-155/+139
| | | | | | | | types. This has the added benefit of removing type redundancy from the pretty form. As a consequence, IntegerAttr/FloatAttr will now always print the type even if it is i64/f64. -- PiperOrigin-RevId: 247295828
* Add utility to accept any tensor type.MLIR Team2019-05-102-0/+12
| | | | | | -- PiperOrigin-RevId: 247264423
* Verify that attribute type and constant op return type matches.Jacques Pienaar2019-05-104-45/+33
| | | | | | -- PiperOrigin-RevId: 247263129
* Add support for using the new diagnostics infrastructure in the parser. ↵River Riddle2019-05-106-69/+117
| | | | | | | | This also adds support for streaming in ranges(e.g. ArrayRef) into a diagnostic with an optional element delimiter. -- PiperOrigin-RevId: 247239436
* Add a new ClassID utility class that allows for generating unique ↵River Riddle2019-05-108-28/+21
| | | | | | | | identifiers for class types. This replaces the duplicated functionality of AnalysisID/PassID/etc. -- PiperOrigin-RevId: 247237835
* Inline a string used in lambda function to fix capture errorLei Zhang2019-05-101-3/+2
| | | | | | | | | | | | The string was referenced but not captured in the lambda, which causes a failure when compiling with MSVC. This issue was discovered by @loic-joly-sonarsource with a proposed fix in https://github.com/tensorflow/mlir/pull/22. -- PiperOrigin-RevId: 247085897
* Fix a few typos in the Toy tutorial documentationThomas Joerg2019-05-101-10/+10
| | | | | | -- PiperOrigin-RevId: 247047009
* Add operations to produce block/index ids and dimensions to the gpu dialect.Thomas Joerg2019-05-105-9/+143
| | | | | | -- PiperOrigin-RevId: 246976227
* NFC: Make ParseResult public and update the OpAsmParser(and thus all of ↵River Riddle2019-05-1030-543/+591
| | | | | | | | the custom operation parsers) to use it instead of bool. -- PiperOrigin-RevId: 246955523
* NFC: Convert the ParseResult enum into a simple struct wrapper around ↵River Riddle2019-05-101-153/+161
| | | | | | | | LogicalResult. This allows for using the existing infrastructure for LogicalResult while retaining the ability to easily chain together parse rules. This will also simplify the transition of the parser to use the new diagnostics infrastructure. -- PiperOrigin-RevId: 246955372
* Simplify the emission of various diagnostics created in Analysis/ and ↵River Riddle2019-05-105-28/+19
| | | | | | | | Transforms/ by using the new diagnostic infrastructure. -- PiperOrigin-RevId: 246955332
* CmpFOp. Add float comparison opGeoffrey Martin-Noble2019-05-107-12/+491
| | | | | | | | | | This closely mirrors the llvm fcmp instruction, defining 16 different predicates Constant folding is unsupported for NaN and Inf because there's no way to represent those as constants at the moment -- PiperOrigin-RevId: 246932358
* Add split-input-file to constant fold testGeoffrey Martin-Noble2019-05-101-13/+53
| | | | | | | | Better to keep tests as separate as possible -- PiperOrigin-RevId: 246900564
* Simplify several usages of attributes now that they always have a type ↵River Riddle2019-05-1013-68/+95
| | | | | | | | | | and, transitively, access to the context. This also fixes a bug where FunctionAttrs were not being remapped for function and function argument attributes. -- PiperOrigin-RevId: 246876924
* Refactor the support for AffineMap and IntegerSet aliases in the parser ↵River Riddle2019-05-107-308/+211
| | | | | | | | | | | | | | | | | | | | | | | | | into more general support for attribute aliases. `#` alias `=` attribute-value This also allows for dialects to define aliases for attributes in the AsmPrinter. The printer supports two types of attribute aliases, 'direct' and 'kind'. * Direct aliases are synonymous with the current support for type aliases, i.e. this maps an alias to a specific instance of an attribute. // A direct alias ("foo_str") for the string attribute "foo". #foo_str = "foo" * Kind aliases generates unique names for all instances of a given attribute kind. The generated aliases are of the form: `alias[0-9]+`. // A kind alias ("strattr") for all string attributes could generate. #strattr0 = "foo" #strattr1 = "bar" ... #strattrN = "baz" -- PiperOrigin-RevId: 246851916
* Simplify the emission of various diagnostics emitted by the different ↵River Riddle2019-05-1010-60/+64
| | | | | | | | dialects (Affine/Standard/etc.) by using the new stream interface instead of Twine. -- PiperOrigin-RevId: 246842016
* Fix MacOS build: static constexpr must be definedMehdi Amini2019-05-061-0/+3
| | | | | | | | This can be removed in C++17. -- PiperOrigin-RevId: 246827022
* Fix the indentation of CHECKs in test/GPU/ops.mlir.MLIR Team2019-05-061-8/+8
| | | | | | -- PiperOrigin-RevId: 246809906
* Add the "gpu.launch_func" op to the GPU dialect.MLIR Team2019-05-066-2/+179
| | | | | | | | The idea is to lower `gpu.launch` operations into `gpu.launch_func` operations by outlining the kernel body into a function, which is closer to the NVVM model. -- PiperOrigin-RevId: 246806890
* GPU dialect: introduce custom syntax for gpu.launchAlex Zinenko2019-05-066-45/+238
| | | | | | | | | | | | This syntax removes boilerplate and verbose list of region arguments in the header of the entry block. It groups operands into segments related to GPU blocks, GPU threads as well as the operands that are forwarded to the kernel. The two former segments are also used to give names to the region arguments that are used for GPU blocks and threads inside the kernel body region. -- PiperOrigin-RevId: 246792329
* Change syntax of regions in the generic form of operationsAlex Zinenko2019-05-0610-97/+120
| | | | | | | | | | | | | | | The generic form of operations currently supports optional regions to be located after the operation type. As we are going to add a type to each region in a leading position in the region syntax, similarly to functions, it becomes ambiguous to have regions immediately after the operation type. Put regions between operands the optional list of successors in the generic operation syntax and wrap them in parentheses. The effect on the exisitng IR syntax is minimal since only three operations (`affine.for`, `affine.if` and `gpu.kernel`) currently use regions. -- PiperOrigin-RevId: 246787087
* Specify Regions in LangRefMehdi Amini2019-05-061-5/+107
| | | | | | | | Region is the generalization of a function body (a list of blocks forming a CFG) to be allowed to be enclosed inside any operation. This nesting of IR is already leveraged in the affine dialect to support `affine.for`, `affine.if`, and `gpu.launch` operations. -- PiperOrigin-RevId: 246766830
* Add a static utility to FloatAttr for converting an APFloat to double.River Riddle2019-05-062-4/+6
| | | | | | -- PiperOrigin-RevId: 246671765
* Remove redundant ;Jacques Pienaar2019-05-061-1/+1
| | | | | | -- PiperOrigin-RevId: 246664861
* Namespaceify a few explicit template specializations to appease errors ↵River Riddle2019-05-063-29/+33
| | | | | | | | | | caused by a bug in gcc versions < 7.0. (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480) -- PiperOrigin-RevId: 246664463
OpenPOWER on IntegriCloud