FailedChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. Refactor getUsedValuesDefinedAbove to expose a variant taking a callback (details)
  2. Use "final" instead of marking method virtual in override (NFC) (details)
  3. Refactor PassTiming to support nested pipelines. (details)
  4. Add `parseGenericOperation()` to the OpAsmParser (details)
  5. Addressing some late review comments on kernel inlining. (details)
  6. Add support for coalescing adjacent nested pass pipelines. (details)
  7. Add warpsize and laneid intrinsics to NVVM dialect. (details)
  8. Overload LLVM::TerminatorOp::build() for empty operands list. (details)
  9. Explicitly declare the OpPassManager move constructor to avoid undefined (details)
  10. Convert per channel fake quant attributes to type (details)
  11. [NFC] Rename ExpressedToUniformQuantizedType to ExpressedToQuantizedType (details)
  12. Add quant.const_fake_quant_per_axis op (details)
  13. Add pass generate per block in a function a GraphViz Dot graph with ops (details)
  14. Avoid sign-compare warning (details)
  15. Remove redundant qualification (details)
  16. Remove unused variable (details)
  17. Convert ConstFakeQuantPerAxis to qcast and dcast pair (details)
  18. Remove the constraint that min / max should stride zero (details)
  19. Add folding rule for spv.CompositeExtract (details)
  20. Don't leak TargetMachine in ExecutionEngine::setupTargetTriple (details)
  21. Fix a typo in comments. The Inequality and Equality explanations were (details)
  22. Add logical groups to NVVM op definitions. (details)
  23. Fix typos in SDBMTest.cpp (details)
  24. Rename SDBMPositiveExpr to SDBMTermExpr (details)
  25. [spirv] Add support for spv.loop (de)serialization (details)
  26. NFC: Clean up constant fold tests (details)
  27. Cmpf constant folding for nan and inf (details)
  28. Log name of the generated illegal operation name in DialectConversion (details)
  29. Fixing typo in documentation. (details)
  30. NFC: Update comments about rank constraints (details)
  31. Refactor pass pipeline command line parsing to support explicit pipeline (details)
  32. Improve verifier error reporting on type mismatch (NFC) (details)
  33. Forward diagnostics from untracked threads in ParallelDiagnosticHandler. (details)
  34. Add tablegen class for memrefs with rank constraints (details)
  35. NFC: Finish replacing FunctionPassBase/ModulePassBase with OpPassBase. (details)
  36. Update SPIR-V symbols and use GLSL450 instead of VulkanKHR (details)
  37. Add type constraints for shaped types with same rank and element count (details)
  38. Publicly expose the functionality to parse a textual pass pipeline. (details)
  39. add missing memref cast fold pattern for dim op (details)
  40. Verify that ModuleOps only contain dialect specific attributes. (details)
  41. Add pattern to canonicalize for loop bounds (details)
  42. Update QuickstartRewrites.md regarding op definition and rewrites (details)
  43. NFC: Fix stray character in error message: 1 -> ' PiperOrigin-RevId: (details)
  44. Clean up build trip count analysis method - avoid mutating IR (details)
  45. update normalizeMemRef utility; handle missing failure check + add more (details)
  46. NFC - Move explicit copy/dma generation utility out of pass and into (details)
  47. Add convenience methods to create i8 and i16 attributes in Builder. (details)
  48. NFC: Merge OpPass with OperationPass into just OperationPass. (details)
  49. NFC: Pass PassInstrumentations by unique_ptr instead of raw pointer. (details)
  50. Update the IRPrinter instrumentation to work on non function/module (details)
  51. NFC: Update the expected outputs of pass-timing. (details)
  52. NFC: Update the PassInstrumentation section. (details)
  53. Fix typo in test/AffineOps/ops.mlir (details)
  54. Update the pass registration section and add a sub-section on the (details)
  55. Add mechanism to specify extended instruction sets in SPIR-V. (details)
  56. Drop makePositionAttr and the like in favor of Builder::getI64ArrayAttr (details)
  57. Error out when kernel function is not found while translating GPU calls. (details)
  58. Unify how errors are emitted in LaunchFuncOp verification. (details)
  59. Introduce SDBMDirect expression into the SDBM expression hierarchy (details)
  60. Overhaul the SDBM expression kind hierarchy (details)
  61. [spirv] Add support for BitEnumAttr (details)
  62. Add support for multi-level value mapping to DialectConversion. (details)
  63. [spirv] Add support for function calls. (details)
  64. Autogenerate (de)serialization for Extended Instruction Sets (details)
  65. Add missing CMake dependency from libAnalysis to the Vector dialect (details)
  66. Add rewrite pattern to compose maps into affine load/stores (details)
  67. Change MLIR translation functions signature (details)
  68. Support file-to-file translation in mlir-translate (details)
  69. Add a preprocess pass to remove sequences that are problematic with (details)
  70. Register a -test-spirv-roundtrip hook to mlir-translate (details)
  71. Add (de)serialization support for OpRuntimeArray. (details)
  72. Add support to OpAsmParser for parsing unknown keywords. (details)
  73. Simplify SDBM expressions more aggressively in operators and conversions (details)
  74. SDBM: support sum expressions on the LHS of stripe expressions (details)
  75. Unify error messages to start with lower-case. (details)
  76. Support symbolic operands for memref replacement; fix memrefNormalize (details)
  77. Fix nested dominance relationship between parent results and child (details)
  78. NFC: Remove stray logging from ~Block(). PiperOrigin-RevId: 269941815 (details)
  79. Outline GPU kernel function into a nested module. (details)
  80. Add address space attribute to LLVMIR's GlobalOp. (details)
  81. NFC: Fix return indentation in generated op definitions. (details)
  82. Quantize attribute values by per axis quantization parameters (details)
  83. Automated rollback of commit 5684a12434f923d03b6870f2aa16226bfb0b38b6 (details)
  84. Allow specification of decorators on SPIR-V StructType members. (details)
  85. Remove unused import and two import forms (details)
  86. Add utility to extract strides from layout map in MemRefType. (details)
  87. Fix public build (details)
  88. Use SmallVectorImpl in getStrides (details)
  89. NFC: Pass OpAsmParser by reference instead of by pointer. (details)
  90. Avoid iterator invalidation when recursively computing pattern depth. (details)
  91. NFC: Pass OperationState by reference instead of by pointer. (details)
  92. NFC: Pass OpAsmPrinter by reference instead of by pointer. (details)
  93. Make GlobalOp's value attribute optional. (details)
  94. [ODS] Add support for FloatElementsAttr (details)
  95. Add a note about the use of recursion in the developer guide (details)
  96. Upgrade/fix/simplify store to load forwarding (details)
  97. [spirv] Add OpControlBarrier and OpMemoryBarrier. (details)
  98. minor spelling tweaks (details)
  99. Add integer sign- and zero-extension and truncation to standard. (details)
  100. Fix undefined reference to mlir::getElementTypeOrSelf(mlir::Type) (details)
  101. update layout map examples in doc, drop stale ones (details)
  102. Update TruncateIOp builder to pass OperationState by reference. (details)
  103. Specalize f32->i8/u8 Quanitization with C++ native arithmetic to (details)
  104. [NFC] Replace std::clamp with inline implementation. (details)
  105. Fix a number of Clang-Tidy warnings. (details)
  106. Outline GPU kernel function into a nested module. (details)
  107. Add variants of interleave that take separator (details)
  108. NFC: Fix warning for uninitialized field. PiperOrigin-RevId: 270704572 (details)
  109. Update the Pass, Analysis, and PassManager sections of WritingAPass.md. (details)
  110. Refactor DiagnosticEngine to support multiple registered diagnostic (details)
  111. Add interfaces for call-like/callable operations. (details)
  112. Add initial callgraph support. (details)
  113. Add convenience methods to set an OpBuilder insertion point after an (details)
  114. Simplify the way spirv::StructTypes are parsed. (details)
  115. Use constant's location for reporting errors in parsing of hex constant (details)
  116. Handle OpMemberName instruction in SPIR-V deserializer. (details)
  117. Let mlir-translate support -split-input-file (details)
  118. Make spirv::RuntimeArrayType part of spirv::CompositeType. (details)
  119. [spirv] NFC: clean up (de)serialization tests (details)
  120. Allow null Attribute for value when building GlobalOp. (details)
  121. Clone called functions into nested GPU module. (details)
  122. Normalize lowering of MemRef types (details)
  123. Introduce splat op + provide its LLVM lowering (details)
  124. Allow attaching descriptions to OpInterfaces and InterfaceMethods. (details)
  125. NFC: Add a description to the ODS interface example. PiperOrigin-RevId: (details)
  126. [spirv] Replace bitwiseCast with llvm::bit_cast (details)
  127. Add support for GLSL Binary ops, and use it to implement GLSL FMax. (details)
  128. NFC: Add 'const' dereference method to OperandTypeIterator. (details)
  129. Miscellaneous fixes to SPIR-V Deserializer (details below). (details)
  130. Forward declare LogicalResult as a struct to be consistent (details)
  131. Fix memref-stride-calculation on Windows (details)
  132. Add tablegen verification traits for comparing different properties (details)
  133. Emit function name being tested in TestMemRefStrideCalculation (details)
  134. Minor spelling tweaks (details)
  135. [spirv] Add SPV_UnaryOp and spv.FNegate (details)
  136. Change the return type of createPrintCFGGraphPass to match other passes. (details)
  137. Add spv.Bitcast operation to SPIR-V dialect (details)
  138. Remove unused variables and methods to address compiler warnings (details)
  139. Add AllReduceOp to GPU dialect with lowering to NVVM. (details)
  140. Drop support for memrefs from JitRunner (details)
  141. Decouple tiling from fusion in Linalg. (details)
  142. Make result ops generated output deterministic (details)
  143. Disable failing tests (details)
  144. [ROCm] Adding ROCDL Dialect. (details)
  145. Fix missing links in the documentation (details)
  146. Fix Documentation OpDefinitions.md (details)
  147. Fix JitRunner.cpp Error creation pattern and reactivate tests. (details)
  148. Promote MemRefDescriptor to a pointer to struct when passing function (details)
  149. NFC - clean up op accessor usage, std.load/store op verify, other stale (details)
  150. Add TODO to revisit coupling of CallOp to MemRefType lowering (details)
  151. Remove spurious debug spew in tests (details)
  152. Append a newline when dumping a Value. (details)
  153. Tablegen helpers for accessing properties of shaped types (details)
  154. Switch explicit create methods to match generated build's order (details)
  155. Fix syntax of 'call' and 'splat' ops (details)
  156. Fix a typo in Toy Chapter 2 tutorial documentation (details)
  157. update Rationale.md - remove outdated info (details)
  158. Add InferTypeOpTrait & enable generating its member function definition (details)
  159. Switch comments from GPU dialect terms to CUDA terms (NFC). (details)
  160. Fix MemRefType::getStrides corner case (details)
  161. Use MaybeAlign when setting alignment (details)
  162. Add support for Logical Ops in SPIR-V dialect (details)
  163. [DRR] Explain result type deduction in doc (details)
  164. Normalize MemRefType lowering to LLVM as strided MemRef descriptor (details)
  165. Adding some missing SPIR-V core and GLSL extended ops. (details)
  166. NFC: Change `classof` on registered operations to use pointer (details)
  167. Enable autogenerating OpInterface method declarations (details)
  168. Add missing file from cmakelist (details)
  169. Adding signed integer ops for abs, sign, min, and max in the GLSL (details)
  170. [spirv] Add array length check. (details)
  171. Format markdown list. (details)
  172. Pass the pointer of the parent pipeline collection pass to (details)
  173. Fold away reduction over 0 dimensions. (details)
  174. Add integer shift ops to LLVM dialect. (details)
  175. Add verification error message for ops that require at least one operand (details)
  176. Change all_reduce lowering to support 2D and 3D blocks. (details)
  177. [spirv] NFC: rename SPV_ArithmeticOp to SPV_ArithmeticBinaryOp (details)
  178. Unify Linalg types by using strided memrefs (details)
  179. Fix and simplify CallOp/CallIndirectOp to LLVM::CallOp conversion (details)
  180. Add a pair of hooks to DominanceInfo. (details)
  181. [spirv] Change enum case uniquing in gen_spirv_dialect.py (details)
  182. Show type even if elementsattr is elided in graph (details)
  183. [ROCm] Adding pass to lower GPU Dialect to ROCDL Dialect. (details)
  184. Replace spurious `long` stride type by int64_t - NFC (details)
  185. Fix example in OpInterfaces documentation (details)
  186. [spirv] Add support for spv.selection (details)
  187. Extract MemRefType::getStridesAndOffset as a free function and fix (details)
  188. Disallow index types in memrefs. (details)
  189. NFC: rename Conversion/ControlFlowToCFG to Conversion/LoopToStandard (details)
  190. Add parentheses around boolean operators in assert (details)
  191. Give modules a name (details)
  192. Make Module::getName return Optional<StringRef> (details)
  193. Add syntactic sugar for strided memref parsing. This CL implements the (details)
  194. Generalize parse/printBinaryOp to parse/printOneResultOp. (details)
  195. Add fpext and fptrunc to the Standard dialect and includes conversion to (details)
  196. Add `axis` attribute to the quant.stats op (details)
  197. Update the Inliner pass to work on SCCs of the CallGraph. (details)
  198. Add support for inlining calls with different arg/result types from the (details)
  199. Fix typos, NFC. (details)
  200. Moving the GPUIndexIntrinsicOpLowering template to a common location (details)
  201. Add missing Linalg lowerings to allow roundtrip.mlir to lower to LLVM (details)
  202. Replace constexpr MemRefType::kDynamicStrideOrOffset by a (details)
  203. Add some utility builder functions for SPIR-V operations. (details)
  204. Add spv.Undef op to support OpUndef instruction in SPIR-V. (details)
  205. Add missing dependency on the TypeInferOpInterface from the Test dialect (details)
  206. [spirv] Allow return ops to be in control flow ops (details)
  207. NFC: Cleanup test ops and traits tests (details)
  208. Allow element type traits to operate on scalars (details)
  209. Enable emitting dialect summary & description during op generation (details)
  210. Support reduction of partial warps. (details)
  211. Add OpaqueLoc to MLIR locations. (details)
  212. Fix CMake build after adding TestOpaqueLoc.cpp (details)
  213. Add DialectType and generate docs for dialect types (details)
  214. Support AllocOp terminal in Linalg::AliasAnalysis. (details)
  215. Start a minimal mlir_utils runtime library for testing debugging (details)
  216. Fix a comment in the OperationInterface example. (details)
  217. Change Block::getParent() to be a const function. This is only necessary (details)
  218. fix simplify-affine-structures bug (details)
  219. [spirv] Fix function entry block erase after moving to spv.selection (details)
  220. Update UndefOp (de)serialization to generate OpUndef at module level. (details)
  221. Add a new class, OpPrintingFlags, to enable programmatic control of (details)
  222. [spirv] Disable a crashing spv.loop test (details)
  223. Do not add spirv::BitcastOp for cast from signed to unsigned type. (details)
  224. Expose `fuseProducerOf` in Linalg/Utils/Utils.h. (details)
  225. Print result types when dumping graphviz. (details)
  226. Add a flag to the AsmPrinter for eliding large ElementsAttrs. (details)
  227. Update upgrade some uses of mlir::interleave API to take container (details)
  228. Use named modules for gpu.launch_func (details)
  229. Fuse GenerateCubinAccessors pass into LaunchFunctToCuda (details)
  230. GPUToCUDA: emit addressof directly instead of wrapping it into a getter (details)
  231. GPUToCUDA: attach CUBIN to the nested module rather than to the function (details)
  232. Linalg to LLVM lowering: decrease the reliance on symbol lookup in a (details)
  233. NFC: Remove unused default cl::opt value. (details)
  234. Add support for walking the uses of a symbol. (details)
  235. unroll and jam: fix order of jammed bodies (details)
  236. Add a PatternRewriter hook for cloning a region into another. (details)
  237. [spirv] Add a pass to decorate the composite types with layout info. (details)
  238. [ROCm] Fix the return type for the device function calls from i32 to (details)
  239. Add support for parsing/printing non bare-identifier SymbolRefs. (details)
  240. Add Instance Specific Pass Options. (details)
  241. Update the symbol utility methods to handle the case of unknown (details)
  242. Allow dynamic but ranked types in ops with SameOperandsAndResultShape (details)
  243. NFC: Fully qualify use of std::string. PiperOrigin-RevId: 273668957 (details)
  244. Assert that region is not cloned into itself. (details)
  245. Change to doxygen comments. NFC. (details)
  246. Add exp operation to LLVMOPs.td. (details)
  247. Update the usage and comments in define_inst.sh. (details)
  248. Add support for some multi-store cases in affine fusion (details)
  249. Fix Windows linkage error (details)
  250. Make SPIR-V lowering infrastructure follow Vulkan SPIR-V validation. (details)
  251. Guard rewriter insertion point during signature conversion. (details)
  252. Add ::printAsTextualPipeline to Pass and OpPassManager. (details)
  253. minor spelling tweaks (details)
  254. Pre-allocate space for results from a regex match that uses 3 match (details)
  255. Fix typo in QuantizedType method names (details)
  256. Add test for fix to tablegen for custom folders for ops that return a (details)
  257. Use llvm.func to define functions with wrapped LLVM IR function type (details)
  258. NFC: Cleanup of type checking tests (details)
  259. Mark GPU dialect as illegal when lowering to NVVM. (details)
  260. Python bindings: export index_cast (details)
  261. Remove the need to convert operations in regions of operations that have (details)
  262. Add support for canonicalizing callable regions during inlining. (details)
  263. Add trait for specified shapes matching (details)
  264. Add lowering of constant ops to SPIR-V. (details)
  265. Translation to LLVM: check the validity of module-level Ops (details)
  266. Standard-to-LLVM conversion: check that operands have LLVM types (details)
  267. NFC: Initialize pass manager option fields inline instead of the class (details)
  268. Add support for generating reproducers on pass crash and failure. (details)
  269. NFC: Print the generic op form after pass failure. (details)
  270. LLVM conversion: harden a test to check for LLVM funcs rather than any (details)
  271. Add unary ops and ExpOp to Standard Dialect. (details)
  272. Rename LLVM::exp and LLVM::fmuladd to LLVM::ExpOP and LLVM::FMulAddOp. (details)
  273. Drop obsolete code from std to llvm memref lowering (details)
  274. LLVM Dialect: introduce llvm.mlir.null operation (details)
  275. Emit LLVM IR equivalent of sizeof when lowering alloc operations (details)
  276. Add LLVM IR dialect hooks for FP128 and X86_FP80 types (details)
  277. Add lowering of VectorOps dialect to LLVM to the Linalg LLVM lowering (details)
  278. Fix linalg.subview behavior in (partially) static cases. (details)
  279. Use single quotes to wrap '@HOST_LDFLAGS@' in LIT config file (details)
  280. Allowing replacing non-root operations in DialectConversion. (details)
  281. NFC: Replace usages of Value::getKind with explicit isa/casts. (details)
  282. Merge Ch3 of the Toy tutorial into chapter 2. (details)
  283. AsmPrinter: avoid unused-variable warning (details)
  284. Expose mlir::parseType to bindings (details)
  285. Add conversion for splat of vectors of 2+D (details)
  286. Consistent use of int in mlir_runner_utils.cpp (details)
  287. Fix typos in LangRef and OpDefinitions (details)
  288. Update Chapter 3 to demonstrate pattern match and rewrite optimizations (details)
  289. Fix typos in InferTypeOpInterface. (details)
  290. Fix minor typos (details)
  291. [spirv] Add support for SpecId decoration on spv.specConstant (details)
  292. Fix typo (details)
  293. NFC: Split out ToyOpsIncGen into a separate CMakeLists.txt. (details)
  294. Fix typos (details)
  295. Fix typo (details)
  296. Add support for OpBitwiseOr, OpBitwiseXor, and OpBitwiseAnd in SPIR-V (details)
  297. NFC: Various code cleanups for Ch3. (details)
  298. NFC: Remove NoSideEffect traits from all ops except for ConstantOp. (details)
  299. Implement simple loop-invariant-code-motion based on dialect interfaces. (details)
  300. Fix typo in VectorOps.td (details)
  301. Fix CMake configuration after introduction of LICM and LoopLikeInterface (details)
  302. Add support for PatternRewriter::eraseOp. (details)
  303. Allow for remapping argument to a Value in SignatureConversion. (details)
  304. Support custom accumulator provided as region to gpu.all_reduce. (details)
  305. Makes spv.module generated by GPU->SPIRV conversion spec compliant (details)
  306. NFC: Update VectorOrTensor -> Shaped (details)
  307. Update comments in ast.toy (details)
  308. Update Chapter 4 of the Toy tutorial (details)
  309. Code cleanups on Ch.4 (details)
  310. Add ComplexType to TableGen with Tensor support (details)
  311. Fix typo in tutorial. (details)
  312. Add support for inlining toy call operations. (details)
  313. Add Ch.5 of the toy tutorial. (details)
  314. [spirv] Implement inliner interface (details)
  315. Fix invalid transpose in example and add proper verification. (details)
  316. Add LLVM_DEBUG in RewritersGen.cpp and Pattern.cpp (details)
  317. Fix RewriterGen to support using NativeCodeCall as auxiliary pattern (details)
  318. [DRR] Allow capturing and referencing no-result ops (details)
  319. Use a SmallVector instead of an ArrayRef to materialize a temporary (details)
  320. Rename LoopNestBuilder to AffineLoopNestBuilder - NFC (details)
  321. Allow '_' when pretty printing dialect symbols (details)
  322. [spirv] Add a canonicalization pattern for spv.selection. (details)
  323. Decouple Linalg promotion from Linalg tiling - NFC (details)
  324. Add Ch.6 of the Toy tutorial. (details)
  325. NFC: Delete the Linalg tutorial. (details)
  326. Add EDSC support for loop.for operations (details)
  327. Introduce a wrapper around ConversionPattern that operates on the (details)
  328. Automated rollback of commit b65c8bb5d6ab418bb3fcd0302aee19d3615d90f1 (details)
  329. NFC: Remove trivial builder get methods. (details)
  330. Add gpu.barrier op to synchronize invocations of a local workgroup. (details)
  331. Add documentation on restrictions to dialect conversion rewrites (details)
  332. Use StrEnumAttr for gpu.allreduce op instead of StringAttr to better (details)
  333. Fix OSS target name GPUtoNVVMTransforms -> MLIRGPUtoNVVMTransforms (details)
  334. Automated rollback of commit 575405f4d6762830c1c4520569de4e4ed3c8eed5 (details)
  335. [DRR] Use eraseOp() to replace no-result ops (details)
  336. Slightly rephrase a difficult-to-parse sentence. (details)
  337. Implement lowering of VectorTypeCastOp to LLVM (details)
  338. Lower vector transfer ops to loop.for operations. (details)
  339. Add support for function result attributes. (details)
  340. NFC: Rename SPIR-V serializer find*ID() to get*ID() to be consistent (details)
  341. NFC: Add missing include for StringMap. PiperOrigin-RevId: 275588019 (details)
  342. NFC: Cleanup the implementation of walkSymbolUses. (details)
  343. Get active source lane predicate from shuffle instruction. (details)
  344. Use new eraseOp instead of replaceOp with empty values (details)
  345. Slight rewording in toy ch2 to make persistence of name clearer (details)
  346. Add missing include to llvm Allocator.h (details)
  347. Add missing include to StringMap in Verifier and DialectConversion. (details)
  348. Add SourceMgrDiagnosticHandler to toy (details)
  349. Fix minor spelling tweaks (NFC) (details)
  350. Fix minor spelling tweaks (NFC) (details)
  351. [DRR] Address GCC warning by wrapping for statement body with {} (details)
  352. Update Ch1 to reflect new changes in the tutorial. (details)
  353. NFC: Fix typo : Retur -> Return PiperOrigin-RevId: 275745931 (details)
  354. Add a Symbol trait to simplify defining operations that represent (details)
  355. NFC: Elide the value of a UnitAttr within nested attribute dictionaries. (details)
  356. Unify GPU op definition names with other dialects. (details)
  357. NFC: Fix remaining usages of MulOp as matrix multiplication. (details)
  358. Cleanup and rewrite Ch-4.md. (details)
  359. Use LLVM_Type instead of AnyType in the definition of LLVM_CallOp (details)
  360. [spirv] Allow block arguments on spv.Branch(Conditional) (details)
  361. [DRR] Allow interleaved operands and attributes (details)
  362. NFC: Add support for parsing attributes programmatically via (details)
  363. NFC: Remove a right parenthesis from comment. PiperOrigin-RevId: (details)
  364. Expose optimizations flags in Python bindings (details)
  365. Update loop.for verifier message (details)
  366. Update chapter 3 code snippet to match the actual output of the code (details)
  367. Drop MemRefUtils from the ExecutionEngine (details)
  368. NFC: Remove references to the toy.generic attribute. (details)
  369. Fix "set-but-unused" warning in DialectConversion (details)
  370. Add @below and @above directives to verify-diagnostics. (details)
  371. Wrap ODS to 80 lines and remove const qualifier for local `int` variable (details)
  372. Add custom lowering of ExpOp for NVVM and ROCM. (details)
  373. Add missing dependency on MLIRIR on MLIREDSCInterface (details)
  374. Add support for replacing all uses of a symbol. (details)
  375. Convert the Canonicalize and CSE passes to generic Operation Passes. (details)
  376. [spirv] AccessChainOp canonicalization. (details)
  377. Add support for parsing multiple result name groups. (details)
  378. Define AnyRankedTensor Type in TableGen (details)
  379. Fix include guards and add tests for OpToFuncCallLowering. (details)
  380. Lookup function declaration in SymbolTable not ModuleOp. (details)
  381. Print reason why dynamic library could not be loaded during execution. (details)
  382. Add support for marking an operation as recursively legal. (details)
  383. Standardize Linalg transformations to take an OpBuilder and an (details)
  384. Parse locations in parseGenericOperation (details)
  385. [spirv] Support OpPhi using block arguments (details)
  386. Add a convenient operation build method for spirv::SelectOp (details)
  387. [spirv] Use LLVM graph traversal utility for PrettyBlockOrderVisitor (details)
  388. Bugfix: Keep worklistMap in sync with worklist in GreedyPatternRewriter (details)
  389. Add "[TOC]" to generated documentation (details)
  390. [spirv] Mark control flow ops as InFunctionScope (details)
  391. [spirv] Fix gen_spirv_dialect.py and add spv.Unreachable (details)
  392. Add basic support for declarative Linalg transformations (details)
  393. Fix segfault when no symbol is given to an constraint operand (details)
  394. Add a utility accessor 'has_single_element' for ranges. (details)
  395. Add support to GreedyPatternRewriter for erasing unreachable blocks. (details)
  396. Dump op location in createPrintOpGraphPass for easier debugging. (details)
  397. Use `not` to invert return code in expected to fail tests (details)
  398. [spirv] Add cast operations (details)
  399. NFC: Simplify UseRange::iterator to just be a (details)
  400. LinalgDependenceGraph: add const modifiers to accessors (details)
  401. Add a test.symbol_scope operation that has the SymbolTable Traits to the (details)
  402. Add a test for lowering GPU ops that cover cases where the symbol table (details)
  403. NFC: Use #ifndef in various .td files instead of #ifdef and #else (details)
  404. [mlir][llvm] Add missing cast ops (details)
  405. Add Linalg pattern for producer-consumer fusion (details)
  406. Support lowering of imperfectly nested loops into GPU dialect. (details)
  407. Move BitEnumAttr from SPIRVBase.td to OpBase.td (details)
  408. Delete spurious file (details)
  409. Add ReferToOp attribute constraint for SymbolRefAttr (details)
  410. Add DialectAsmParser/Printer classes to simplify dialect attribute and (details)
  411. Remove the need for passing a location to parseAttribute/parseType. (details)
  412. Refactor QuantOps TypeParser to use the DialectAsmParser methods (details)
  413. Refactor LinalgDialect::parseType to use the DialectAsmParser methods (details)
  414. Drop spurious debug spew. (details)
  415. Update the SPV dialect type parser to use the methods on (details)
  416. [NVVM] Add mma.sync operation. (details)
  417. Rename Region::RegionType to Region::BlockListType (details)
  418. Emit empty lines after headers when generating op docs (details)
  419. Add a PatternRewriter hook to merge blocks, and use it to support for (details)
  420. NFC: Rename parseOptionalAttributeDict -> parseOptionalAttrDict to match (details)
  421. [llvm] Add initial import of LLVM modules to mlir-translate (details)
  422. [llvm] Allow GlobalOp to take a region for complex initializers (details)
  423. Fix typos in the Standard Dialect documentation (details)
  424. Add (parse|print)OptionalAttrDictWithKeyword hooks to simplify parsing (details)
  425. NFC: Remove an extra space when printing the 'attributes' prefix before (details)
  426. Add support for the LLVM FNeg instruction (details)
  427. Add ViewOp to the StandardOps dialect, which casts a 1D/i8 element type (details)
  428. [DRR] List some limitations clearly in the doc (details)
  429. Add ViewOp verification for dynamic strides, and address some comments (details)
  430. Adding an m_NonZero constant integer matcher. (details)
  431. Add affine load/store/dma_start/dma_wait to dialect doc. (details)
  432. Add lowering of std.view to LLVM (details)
  433. Drop spurious test file (details)
  434. Replace some remnant uses of "inst" with "op". (details)
  435. NFC: Uniformize parser naming scheme in Toy tutorial to camelCase and (details)
  436. NFC: Tidy up the implementation of operations in the Toy tutorial (details)
  437. Add IndexedGenericOp to Linalg. (details)
  438. Update Linalg to use std.view (details)
  439. Add compatible query method to infer type interface (details)
  440. Fix parameter name and document option in linalg::promoteSubViews (details)
  441. Add canonicalizer for ViewOp which folds constants into the ViewOp (details)
  442. Add Ch-7 of the toy tutorial detailing how to define new types. (details)
  443. Swap operand order in std.view operation so that offset appears before (details)
  444. Fix asm printer for affine expr (details)
  445. mlir-translate: support -verify-diagnostics (details)
  446. Move description from GenericOpBase to linalg.(indexed_)generic. (details)
  447. [spirv] Add bit ops (details)
  448. Explicitly initialize isRecursivelyLegal (details)
  449. Look for SymbolRefAttr in KernelOutlining instead of hard-coding CallOp (details)
  450. Add a short TableGen HowTo to tutorial chapter 2. (details)
  451. Fix segfault (nullptr dereference) when passing a non-existent file to (details)
  452. Also consider index constants when folding integer arithmetics with (details)
  453. Adds std.subview operation which takes dynamic offsets, sizes and (details)
  454. Add support for nested symbol references. (details)
  455. Restructure comment lexing to not recurse. (details)
  456. Add support for alignment attribute in std.alloc. (details)
  457. Adds affine.min operation which returns the minimum value from a (details)
  458. Add LLVM lowering of std.subview (details)
  459. Update outdated comment for NativeCodeCall (details)
  460. Update textmate syntax file (details)
  461. Add a printer flag to use local scope when printing IR. (details)
  462. [spirv] Properly return when finding error in serialization (details)
  463. Add Conversion to lower loop::ForOp to spirv::LoopOp. (details)
  464. Expose an isSubclassOf() method on AttrConstraint (details)
  465. Add an option to print an operation if a diagnostic is emitted on it (details)
  466. Add support for OpPhi in loop header block (details)
  467. Make legality check in GPU->SPIR-V lowering of FuncOp kernel specific. (details)
  468. NFC: Change DictionaryAttr::get(StringRef) to use binary search instead (details)
  469. Add operations needed to support lowering of AffineExpr to SPIR-V. (details)
  470. Make VariableOp instructions be in the first block in the function. (details)
  471. Rename the current parseSymbolName to parseOptionalSymbolName (details)
  472. Create and begin writing glossary. (details)
  473. NFC: Refactor block signature conversion to not erase the original (details)
  474. Add FuncOp::eraseArgument (details)
  475. Fix glossary formatting. (details)
  476. Deprecate linalg.subview in favor of std.subview (details)
  477. Replace explicit concatenation by llvm::concat (details)
  478. Do not emit aliases when printing local form (details)
  479. Concentrate memref descriptor manipulation logic in one place (details)
  480. [doc] Add debugging tips in ODS and DRR doc regarding mlir-tblgen (details)
  481. Use MemRefDescriptor in Linalg-to-LLVM conversion (details)
  482. Move VectorOps to Tablegen - (almost) NFC (details)
  483. Adapt code to LLVM API updates. (details)
  484. Use MemRefDescriptor in Vector-to-LLVM convresion (details)
  485. Make positions of elements in MemRef descriptor private (details)
  486. Move Affine to Standard conversion to lib/Conversion (details)
  487. [ODS] Fix operation argument population to avoid crash (details)
  488. Add CMakeLists.txt for AffineToStandard conversion (details)
  489. Adds canonicalizer to SubViewOp which folds constants from base memref (details)
  490. NFC: Refactor Dialect Conversion targeting SPIR-V. (details)
  491. Refactor the LowerVectorTransfers pass to use the RewritePattern infra - (details)
  492. Expand on operation definition to clarify the difference between (details)
  493. Add more navigation to the MLIR toy tutorial. (details)
  494. Mark std.subview as no-sideeffect. (details)
  495. Mark std.view as no-sideeffect. (details)
  496. Templatize linalg::LowerToLoops - NFC (details)
  497. Use aggregate-parameter builder for ops having autogen type-deduction (details)
  498. Fix build warnings (details)
  499. Use simpler highlighting textmate syntax (details)
  500. Modify tutorial and other documentation for consistency, clarity, and (details)
  501. NFC: Convert CmpIPredicate in StandardOps to use EnumAttr (details)
  502. Clarify that identity maps are discarded from the MemRef type (details)
  503. [spirv] Add bit ops (details)
  504. Fix attribute dict syntax in the docs (details)
  505. Fix mismatched-tags warning (details)
  506. Rename CLI flags -lower-gpu-ops-to-*-ops to -convert-gpu-to-* (details)
  507. Implement folding of pattern dim(subview(_)[...][s1, ..., sn][...], i) (details)
  508. Standardize all VectorOps class names to be prefixed by Vector - NFC (details)
  509. Fix Affine Loop Fusion test case reported on github. This CL utilizies (details)
  510. ConvertStandardToLLVM: replace assertion with graceful failure (details)
  511. Also elide large array attribute in OpGraph Dump (details)
  512. [spirv] Add a canonicalizer for BitcastOp. (details)
  513. Fix gen_spirv_dialect.py regarding 1D/2D/3D Dim symbol name (details)
  514. Add a parseAttribute<AttrType> overload for the non-type case. (details)
  515. Fix SubViewOp stride calculation in constant folding. Adds unit tests (details)
  516. Drop unnecessary dependences from mlir-translate (details)
  517. Lower linalg.indexed_generic to loops. (details)
  518. Use SmallVectorImpl instead of SmallVector for function parameters (NFC) (details)
  519. Support SPIR-V constant op to take DenseElementsAttr as input. (details)
  520. Fix the shape of the outcome in the example code. (details)
  521. Add dialect-attribute-entry requirement to docs (details)
  522. Change conversion CLI flag from -lower-to-llvm to -convert-std-to-llvm (details)
  523. Add '*' and '?' and optional brace parse calls to the Parser (details)
  524. Add getRemappedValue to ConversionPatternRewriter (details)
  525. Add mention to avoid cl::opt for MLIR passes in the developer guide (details)
  526. Add a note on commit messages to our developer guide (details)
  527. Fix pretty printer corner case in mlir_runner_utils.cpp. (details)
  528. Add VectorOps.StridedSliceOp (details)
  529. Make type and rank explicit in mcuMemHostRegister function. (details)
  530. Add some CMake rules for installing headers, mlir-tblgen, and mlir-opt (details)
  531. Extend kernel outlining to also consider dim worth inlining. (details)
  532. Fix 'the the' typo. (details)
  533. Fix the comment to Region block iterators. (details)
  534. Add StridedMemRef<>::operator[] - NFC (details)
  535. Add a new OpAsmOpInterface to allow for ops to directly hook into the (details)
  536. Implement unrolling of vector ops to finer-grained vector ops as a (details)
  537. Changes to SubViewOp to make it more amenable to canonicalization. (details)
  538. Add multi-level DCE pass. (details)
  539. missing outer index %i in search_body (details)
  540. Verify subview op result has dynamic shape, when sizes are specified. (details)
  541. Add VectorContractionOp to the VectorOps dialect. (details)
  542. Merge DCE and unreachable block elimination into a new utility (details)
  543. Correctly parse empty affine maps. (details)
  544. Add a document detailing operation traits, how to define them, and the (details)
  545. NFC: Use Region::getBlocks to fix build failure with drop_begin. (details)
  546. Fixed typo in 2-d tiled layout (details)
  547. Fix OSS build (details)
  548. Don't force newline before function attributes (details)
  549. Add missing include after LLVM 049043b598ef5b12a5894c0c22db8608be70f517 (details)
  550. Split Linalg declarative patterns from specific test patterns - NFC (details)
  551. Drop unused function - NFC (details)
  552. Fix OSS builds - NFC (details)
  553. NFC: Add wrappers around DenseIntElementsAttr/DenseFPElementsAttr::get (details)
  554. Change CUDA tests to use print_memref. (details)
  555. Add support for using the ODS result names as the Asm result names for (details)
  556. Move Linalg Transforms that are actually Conversions - NFC (details)
  557. Add more detail about locations in Chapter 2 of tutorial. (details)
  558. Unify vector op names with other dialects. (details)
  559. Small formatting fix in Tutorial Ch2. (details)
  560. Add more canonicalizations for SubViewOp. (details)
  561. [spirv] Add a canonicalizer for `spirv::LogicalNotOp`. (details)
  562. Fix Windows Build (details)
  563. NFC: Remove unnecessarily guarded tablegen includes. (details)
  564. Make isValidSymbol more powerful (details)
  565. [spirv] NFC: rename test files and sort tests inside (details)
  566. NFC: Wire up DRR settings for SPIR-V canonicalization patterns (details)
  567. Support folding of StandardOps with DenseElementsAttr. (details)
  568. Introduce gpu.func (details)
  569. Add vector.insertelement op (details)
  570. Allow memref_cast from static strides to dynamic strides. (details)
  571. Introduce attributes that specify the final ABI for a spirv::ModuleOp. (details)
  572. De-duplicate EnumAttr overrides by defining defaults (details)
  573. Changing directory shortcut for CPU/GPU runner utils. (details)
  574. Update VectorContractionOp to take iterator types and index mapping (details)
  575. Add missing rule to generate SPIR-V ABI Attribute using tblgen to CMake. (details)
  576. NFC: Actually expose the implementation of createGPUToSPIRVLoweringPass. (details)
  577. Make std.divis and std.diviu support ElementsAttr folding. (details)
  578. Allow LLVM::ExtractElementOp to have non-i32 indices. (details)
  579. Add a vector.InsertStridedSliceOp (details)
  580. Use vector.InsertStridedSlice in Vector -> Vector unrolling (details)
  581. Add support for AttrSizedOperandSegments/AttrSizedResultSegments (details)
  582. Some minor corrections and improvements to LangRef (details)
  583. Relax restriction on affine_apply dim and symbol operands (details)
  584. Automated rollback of commit d60133f89bb08341718bb3132b19bc891f7d4f4d (details)
  585. Misc changes to lowering to SPIR-V. (details)
  586. Add OpenMP dialect to the dialect registry (details)
  587. [VectorOps] Add a BroadcastOp to the VectorOps dialect (details)
  588. Add create method that takes equivalent of OperationState with (details)
  589. [VectorOps] Refine BroadcastOp in VectorOps dialect (details)
  590. Implement Linalg to loops lowering as a pattern (details)
  591. Fixed typo in Toy tutorial (second var e -> var f) (details)
  592. [spirv] Add folders for spv.IAdd and spv.IMul (details)
  593. [spirv] NFC: Add getZero() and getOne() static method to ConstantOp (details)
  594. NFC: A few cleanups for SPIRVLowering (details)
  595. [Linalg] Change attribute n_loop_types to iterator (details)
  596. Split out FunctionLike printing/parsing into (details)
  597. [spirv] Check that operand of `spirv::CompositeExtractOp` is constant (details)
  598. Fixed typo in Ch-1 of Toy tutorial (details)
  599. Fix redundant convert and use NamedAttributeList as value (details)
  600. mlir-tblgen: Dump input records when no generator is set (details)
  601. Introduce Linkage attribute to the LLVM dialect (details)
  602. Lower linalg.indexed_generic with libcall to LLVM. (details)
  603. add missing '>' in Ch-2 (details)
  604. NFC: Update std.subview op to use AttrSizedOperandSegments (details)
  605. [DRR] Introduce `$_` to ignore op argument match (details)
  606. Add missing `>` to the description of std.view. (details)
  607. docs: minor spelling tweaks (details)
  608. Generate dialect documentations in the doc folder for every dialect (details)
  609. [ODS] Generate builders taking unwrapped value and defaults for (details)
  610. [VectorOps] Add legality rules to broadcast (details)
  611. NFC: use `&&` instead of `and` PiperOrigin-RevId: 283392575 (details)
  612. [spirv] NFC: reorder sections in SPIRVBase.td (details)
  613. Add linkage support to LLVMFuncOp (details)
  614. [Linalg] Update/fix documentation for linalg.indexed_generic. (details)
  615. [spirv] Add spv.SubgroupBallotKHROp (details)
  616. Extend conversion of SubViewOp to llvm to also support cases where size (details)
  617. AffineLoopFusion: Prevent fusion of multi-out-edge producer loops (details)
  618. Fix ViewOp to have at most one offset operand (details)
  619. Add python bindings for ArrayAttr, AffineMapAttr. (details)
  620. Add Python bindings for affine expressions with binary operators. (details)
  621. Convert MemRefType to a linearized array in SPIR-V lowering. (details)
  622. Allow analyses to provide a hook 'isInvalidated' to determine if they (details)
  623. Verifier: Better error message in case of successor operand mismatch. (details)
  624. Add CreateMaskOp to the VectorOps dialect. (details)
  625. Make diagnostic a bit clearer. (details)
  626. Add a pass to legalize operations before lowering to SPIR-V. (details)
  627. [spirv] Add spv.GroupNonUniformBallot (details)
  628. Refactor dependencies to expose Vector transformations as patterns - NFC (details)
  629. Avoid variable name conflict in MLIR tutorial code snippet (details)
  630. minor spelling tweaks (details)
  631. Adds support for unrolling single-result vector operations with iterator (details)
  632. Added new FAbs, FCeil, Cos, Neg, Sign, Tanh operations. (details)
  633. Loop coalescing: fix pointer chainsing in use-chain traversal (details)
  634. [spirv] Adding sqrt op in the GLSL extension. (details)
  635. NFC - fix name / comments - isAccessInvariant (details)
  636. Print out large elementsattr's such that they are parseable. (details)
  637. [spirv] Define a few more extensions in SPIRVBase.td (details)
  638. NFC: Fix mismatches between LangRef.md and actual parser implementation. (details)
  639. Drop MaterializeVectorTransfers in favor of simpler declarative (details)
  640. [CSE] NFC: Hash the attribute dictionary pointer instead of the list of (details)
  641. Add canonicalization patterns for vector CreateMaskOp and StridedSliceOp (details)
  642. Add a CL option to Standard to LLVM lowering to use alloca instead of (details)
  643. Add emitOptional(Error|Warning|Remark) functions to simplify emission (details)
  644. Optimize operation ordering to support non-congruent indices. (details)
  645. Add MLIRIR as a dependency to LLVM and related dialects (details)
  646. Move ModuleManager functionality into mlir::SymbolTable. (details)
  647. Fix MLIR Build after LLVM upstream JIT changes (getMainJITDylib removed) (details)
  648. [spirv] Fix nested loop (de)serialization (details)
  649. Add a flag to dump the current stack trace when emitting a diagnostic. (details)
  650. Add spv.AtomicCompareExchangeWeak (details)
  651. Allow specification of the workgroup size for GPUToSPIRV lowering. (details)
  652. Add support for instance specific pass statistics. (details)
  653. [spirv] Add CompositeInsertOp operation (details)
  654. Add UnrankedMemRef Type (details)
  655. Refactor the IRPrinting instrumentation to take a derivable config. (details)
  656. [Linalg] Add permutation information to tiling (details)
  657. Add include path to the TestDialect to fix broken build. (details)
  658. NFC: Add documentation for `-mlir-print-op-on-diagnostic` and (details)
  659. LLVM::AddressOfOp: properly take into account the address space (details)
  660. minor spelling tweaks (details)
  661. DimOp folding for alloc/view dynamic dimensions (details)
  662. [spirv] Reorder `erase` and `emplace` to avoid "invalid iterator (details)
  663. Unroll vector masks along with their associated vector arguments. (details)
  664. Use regex to fix failure when stats are disabled. (details)
  665. fix examples in comments (details)
  666. Add conversions of GPU func with memory attributions to LLVM/NVVM (details)
  667. Generate builder for ops that use InferTypeOpInterface trait in ODS (details)
  668. [VectorOps] Add lowering of vector.broadcast to LLVM IR (details)
  669. Provide a way to get the type of a ValueHandle. (details)
  670. Move GPU::FuncOp definition to ODS - NFC (details)
  671. LLVM::GlobalOp: take address space as builder argument (details)
  672. [VecOps] Rename vector.[insert|extract]element to just (details)
  673. Use named traits in the ODS definition of LLVMFuncOp (details)
  674. Move GPU::LaunchOp to ODS. NFC. (details)
  675. During serialization do a walk of ops in module to find spv.module. (details)
  676. Replace custom getBody method with an ODS-generated in gpu::LaunchOp (details)
  677. Change inferReturnTypes to return LogicalResult and values (details)
  678. NFC: Separate implementation and definition in (details)
  679. Fix langref code snippet - NFC (details)
  680. NFC - update doc, comments, vim syntax file (details)
  681. Add a flag to the IRPrinter instrumentation to only print after a pass (details)
  682. Improve Linalg documentation following the Structured Ops presentation. (details)
  683. Add a new ValueRange class. (details)
  684. Update the builder API to take ValueRange instead of ArrayRef<Value *> (details)
  685. NFC: Expose constFoldBinaryOp via a header (details)
  686. Add a layer of recursive matchers that compose. (details)
  687. Replace spurious SmallVector constructions with ValueRange (details)
  688. Post-submit cleanups in RecursiveMatchers (details)
  689. Add RegionRange for when need to abstract over different region (details)
  690. [StructuredOps][Linalg] Add a primitive pattern to rewrite the (details)
  691. Minor spelling tweaks (details)
  692. Unify vector op unrolling transformation. (details)
  693. Add lowering for module with gpu.kernel_module attribute. (details)
  694. ODS: Generate named accessors for raw attributes (details)
  695. Factor out commonly reusable names across structured ops dialects (details)
  696. [spirv] Add spv.IAdd, spv.ISub, and spv.IMul folders (details)
  697. [spirv] Add CompositeConstruct operation. (details)
  698. Fix minor spelling tweaks. (details)
  699. Add new indexed_accessor_range_base and indexed_accessor_range classes (details)
  700. Refactor the Block support classes. (details)
  701. [VectorOps] Fix off-by-one error in insert/extract validation (details)
  702. [VectorOps] Add a ShuffleOp to the VectorOps dialect (details)
  703. Fix build breakage on gcc-5 (details)
  704. Drop Markdown style annotations (details)
  705. Add a doc on guidelines for contributing a new dialect to the MLIR core (details)
  706. More convenience build methods for SPIR-V ops. (details)
  707. Add Py API for composing an affine expression with a map. Also allows (details)
  708. Uniformize Vector transforms as patterns on the model of Linalg - NFC (details)
  709. [Linalg] Add a Linalg iterator permutation transformation (details)
  710. Refactor the various operand/result/type iterators to use (details)
  711. Fold TestLinalgTilePermutePatterns into TestLinalgTransformPatterns - (details)
  712. Move gpu.launch_func to ODS. NFC (details)
  713. More affine expr simplifications for floordiv and mod (details)
  714. Add VectorOp transform pattern which splits vector TransferReadOps to (details)
  715. [VectorOps] Add lowering of vector.insert to LLVM IR (details)
  716. Add initial liveness analysis including test cases. (details)
  717. [Linalg] Add tiling for IndexedGenericOp with a region. (details)
  718. Add a function to get lowering patterns from GPU to NVVM. (details)
  719. Automated rollback of commit 98fbf41044d3364dbaf18db81b9e8d9520d14761 (details)
  720. Roll-forward initial liveness analysis including test cases. (details)
  721. NFC: Fix naming inconsistency: FuncOpLowering -> GPUFuncOpLowering. (details)
  722. Continue refactoring StructuredOps utilities (details)
  723. [spirv] Add lowering for std.fdiv, std.frem, std.fsub (details)
  724. Expose a convenience function to add interface attributes to a function. (details)
  725. Fix OSS build (details)
  726. Add missing CMake dependency for MLIRTestIR. (details)
  727. Add std.log* and llvm.intr.log* that correspond to the LLVMIR intrinsics (details)
  728. Make OpBuilder::insert virtual instead of OpBuilder::createOperation. (details)
  729. Switch from shfl.bfly to shfl.down. (details)
  730. Automated rollback of commit f68ac464d818629e0fe10c23b44ac782d64a12d2 (details)
  731. Move cpu runner utils templates to .h (details)
  732. Added lowering of `std.tanh` to llvm function call to `tanh` and (details)
  733. [Linalg] Add test for fusion of GenericOp with IndexedGenericOp. (details)
  734. Retire !linalg.buffer type - NFC (details)
  735. Add type inference variant for separate params builder generated (details)
  736. [VectorOps] Add lowering of vector.shuffle to LLVM IR (details)
  737. Fix logic on when to emit collective type but separate arg builder (details)
  738. NFC: Cleanup the various Op::print methods. (details)
  739. Fix maskAndClamp in gpu.all_reduce. (details)
  740. Add a type range for the XLA HLO dialect. (details)
  741. Try to fold operations in DialectConversion when trying to legalize. (details)
  742. Add a layer of EDSC for linalg.GenericOp (details)
  743. Skip generating C++ for "DeclareOpInterfaceMethods" in op interface gen. (details)
  744. Refactor various canonicalization patterns as in-place folds. (details)
  745. Apply a level of sugaring to the linalg.generic EDSC - NFC (details)
  746. Reconcile struct and class for NestedPatternMatchers - NFC (details)
  747. Add verifyCompatibleShape function overload with shapes (details)
  748. Splat op doc - fix misformat / update tablegen op desc. comment (details)
  749. Remove LLVM dependency on mlir::Module and instead check Traits. (details)
  750. Make memref promotion during std->LLVM lowering the default calling (details)
  751. Adds ExtractSlicesOp to the VectorOps dialect. (details)
  752. [VectorOps] Add [insert/extract]element definition together with (details)
  753. Remove unused variable (fix warning) NFC (details)
  754. [Linalg] Expose subview promotion as a declarative pattern (details)
  755. Make "LowerToCFG" an operation pass (details)
  756. Insert signature-converted blocks into a region with a parent operation. (details)
  757. Plug gpu.func into the GPU lowering pipelines (details)
  758. Add InsertSlicesOp to the VectorOps dialect. (details)
  759. Add edsc::ops for pointwise, conv and dilated_conv (details)
  760. [spirv] Re-enable nested loop (de)serialization test (details)
  761. Fix (de)serialization generation for SPV_ScopeAttr, (details)
  762. Add atomic operations to SPIR-V dialect. (details)
  763. Update vector op unrolling transformation to generate ExtractSlicesOp (details)
  764. Replace code with equivalent satisfiesLLVMModule() function call. (details)
  765. Add pattern rewrite which splits a vector TransferReadOp into slices (details)
  766. Integrate from upstream at revision e4fce659a759. (details)
  767. Add a new utility class TypeSwitch to ADT. (details)
  768. fix a typo in OpDefinitions doc (details)
  769. Add pattern rewrite to forward vector tuple elements to their users. (details)
  770. Homogenize the description of the MemRef conversion to the LLVM dialect (details)
  771. StdToLLVM conversion: drop getMemRefElementType utility function (details)
  772. ConversionToLLVMDialect doc: update the syntax for LLVM types (details)
  773. Make it possible to override the lowering of MemRef to the LLVM dialect. (details)
  774. Add missing virtual inliner interface method in SPIR-V dialect. (details)
  775. Add pattern rewrite which splits a vector TransferWriteOp into slices (details)
  776. NFC: Use TypeSwitch to simplify existing code. PiperOrigin-RevId: (details)
  777. NFC: Use this-> to appease GCC bug related to template lambda. (details)
  778. Add support for float and string attributes to the C API and python (details)
  779. Harden the requirements to memory attribution types in gpu.func (details)
  780. Fix line break in LangRef (details)
  781. Move function template definition to the header file. NFC (details)
  782. NFC: Remove unnecessary 'llvm::' prefix from uses of llvm symbols (details)
  783. Introduce prefetch op: affine -> std -> llvm intrinsic (details)
  784. NFC: Cleanup non-conforming usages of namespaces. (details)
  785. Update code block designations (details)
  786. Add support for providing a default implementation for an interface (details)
  787. NFC: Remove forbidden include of <iostream> (details)
  788. [VectorOps] Add vector.print definition, with lowering support (details)
  789. Added LLVM ops and lowering phases from standard dialect for FAbs, (details)
  790. Move the specializations of VectorTransferRewriter::matchAndRewrite back (details)
  791. Add a couple useful LLVM_DEBUG's to the inliner. (details)
  792. [VectorOps] Replace iostream with stdio in support lib for vector.print (details)
  793. Add runtime utils support for print_memref_i8 (details)
  794. Detemplatize ModuleTranslation::lookupValues (details)
  795. [VectorOps] minor cleanup: vector dialect "subscripts" are i32 (details)
  796. LLVMFuncOp: implement addEntryBlock (details)
  797. [VectorOps] Add vector ReshapeOp to the VectorOps dialect. (details)
  798. Restructure and update Linalg ODS and documentation - NFC (details)
  799. [VectorOps] Update vector transfer_read/write ops to operatate on (details)
  800. Unique trait list during ODS Operator trait construction (details)
  801. Allow dialect to create friendly names for region arguments (details)
  802. Add gpu.shuffle op. (details)
  803. fix isValidDim for block arg case (details)
  804. [VectorOps] remove redundant returns from invalid ops test (details)
  805. [VectorOps] unify vector dialect "subscripts" (details)
  806. NFC: Move the classes related to Pass options into a new header file (details)
  807. Make Type and Attribute classes trivially copyable (details)
  808. Add integer bit-shift operations to the standard dialect. (details)
  809. NFC: Introduce new ValuePtr/ValueRef typedefs to simplify the transition (details)
  810. [InstCombine] add test for copysign; NFC (details)
  811. Adjust License.txt file to use the LLVM license (details)
  812. ReImplement the Value classes as value-typed objects wrapping an (details)
  813. Automated rollback of commit f603a50109107b447b835dac11f0eb541288393e (details)
  814. Resubmit: ReImplement the Value classes as value-typed objects wrapping (details)
  815. Update SPIR-V.md (details)
  816. Change the `notifyRootUpdated` API to be transaction based. (details)
  817. [CFG] Fix an assertion failure with static initializers (details)
  818. NFC: Replace ValuePtr with Value and remove it now that Value is (details)
  819. Refactor the way that pass options are specified. (details)
  820. Remove pybind11-based bindings (details)
  821. Revert "[lldb] Don't process symlinks deep inside DWARFUnit" (details)
  822. Adjust some MLIR paths and docs (details)
  823. [DWARF] Check that all fields of a Unit Header are read. (details)
  824. DebugInfo: Support dumping any exprloc as an expression (details)
  825. NFC: Rename printOptionValue to printValue to fix MSVC build. (details)
  826. test: correct flags for Windows (details)
  827. [SelectionDAG] Don't repeatedly add a node to the worklist in (details)
  828. [SelectionDAG] Change SelectionDAGISel::{funcInfo,SDB} to use unique_ptr (details)
  829. [DebugInfo] Fix v4 macinfo for dwo files. (details)
  830. Add `mlir` to -DLLVM_ALL_PROJECTS CMake option (details)
  831. [docs] fix typo in Lexicon.rst (details)
  832. Remove static MLIR doc ; they are already on the website (details)
  833. [llvm-readobj] - Remove an excessive helper for printing dynamic tags. (details)
  834. Add the Apache2 with LLVM exceptions license to MLIR (details)
  835. DebugInfo: Add {} to address -Wdangling-else warning. (details)
  836. DebugInfo: Correct the form of DW_AT_macro_info in .dwo files (details)
  837. [TypePromotion] Make TypeSize a class member (details)
  838. [clang] [ast] CXXRecordDecl::getVisibleConversionFunctions() could be (details)
  839. Revert "[Support] Extend TimeProfiler to support multiple threads" (details)
  840. clang-doc remove trailing whitespaces (details)
  841. doc: Document that extra-arg/extra-arg-before can be used several times (details)
  842. [lldb][NFC] Remove ClangExternalASTSourceCommon (details)
  843. mlir README.md: Fix the syntax (details)
  844. VariableName doc: fix the link to the mozilla doc (details)
  845. [NFC] Remove some dead code from CGBuiltin.cpp. (details)
  846. AMDGPU/GlobalISel: Lower llvm.amdgcn.else (details)
  847. GlobalISel: Define equivalent node for G_INTRINSIC_TRUNC (details)
  848. AMDGPU/GlobalISel: Legalize some 16-bit round instructions (details)
  849. Fix false positive in magic number checker. (details)
  850. Fix readability-const-return-type identifying the wrong `const` token (details)
  851. [lldb][NFC] Move ClangASTContext::m_scratch_ast_source_up to the (details)
  852. GlobalISel: Fix naming variables "brank" instead of "bank" (details)
  853. GlobalISel: Define equivalent node for G_INTRINSIC_ROUND (details)
  854. GlobalISel: Update syntax in debug printing (details)
  855. [OPENMP50]Basic support for conditional lastprivate. (details)
  856. [OPENMP][DOCS]Update status of OpenMP 5.0 features, NFC. (details)
  857. [X86] Add STRICT versions of CVTTP2SI, CVTTP2UI, CMPM, and CMPP. (details)
  858. test: ensure that we dead-strip in the linker (details)
  859. [mlir] Fix -Wunneeded-internal-declaration (details)
  860. [X86] Use 128-bit vector instructions for f32/f64->i64 conversions on (details)
  861. [compiler-rt] Adapt stop-the-world for ptrace changes in NetBSD-9.99.30 (details)
  862. [compiler-rt] Adapt for ptrace(2) changes in NetBSD-9.99.30 (details)
  863. [lldb] Adapt for NetBSD-9.99.30 ptrace(2) API changes (details)
  864. AMDGPU/GlobalISel: Fix mapping and selection of llvm.amdgcn.div.fixup (details)
  865. [OPENMP]Add extra checks and initialization for clause modifier. (details)
  866. Migrate function attribute "no-frame-pointer-elim" to (details)
  867. Migrate function attribute "no-frame-pointer-elim-non-leaf" to (details)
  868. Migrate function attribute "no-frame-pointer-elim"="false" to (details)
  869. [Support] Fix behavior of StringRef::count with overlapping occurrences, (details)
  870. [Thumb][test] Fix CodeGen/Thumb/PR17309.ll  after (details)
  871. [WinEH] Delete addFnAttr("no-frame-pointer-elim") which seems no longer (details)
  872. [MCJIT] Migrate function attribute "no-frame-pointer-elim" to (details)
  873. [Attributor] Function level undefined behavior attribute (details)
  874. [Attributor] UB Attribute now handles all instructions that access (details)
  875. [compiler-rt] [netbsd] Define _RTLD_SOURCE to fix build (details)
  876. [X86FixupSetCC] Use MachineInstr::readRegister/definesRegister to check (details)
  877. [Attributor] Reach optimistic fixpoint in AAValueSimplify when the (details)
  878. [MLIR][NFC] Insert const_cast to avoid warning (details)
  879. Add missing strict_fp_to_int (details)
  880. [llvm-readobj/llvm-readelf][test] - Add testing for EI_OSABI and (details)
  881. [llvm-readobj] - Merge `gnu-symbols.test` to `symbols.test` and cleanup. (details)
  882. [AMDGPU][MC][DOC] Updated AMD GPU assembler syntax description. (details)
  883. [compiler-rt] [netbsd] Correct the fallback definition of PT_LWPNEXT (details)
  884. [llvm-nm] Display STT_GNU_IFUNC as 'i' (details)
  885. [X86] Merge together some common code in LowerFP_TO_INT now that we have (details)
  886. [lldb][NFC] Use StringRef in (details)
  887. [X86FixupSetCC] Remember the preceding eflags defining instruction while (details)
  888. [X86] Use zero vector to extend to 512-bits for strict_fp_to_uint (details)
  889. [OpenMP][IR-Builder] Introduce the finalization stack (details)
  890. Make lazyload_metadata.ll resilient to the addition of new metadata (details)
  891. [OpenMP][IR-Builder] Introduce "pragma omp parallel" code generation (details)
  892. test commit (details)
  893. Revert "test commit" (details)
  894. [X86] Enable STRICT_SINT_TO_FP/STRICT_UINT_TO_FP on X86 backend (details)
  895. Revert "Make lazyload_metadata.ll resilient to the addition of new (details)
  896. [PowerPC] Modify the hasSideEffects of MTLR and MFLR from 1 to 0 (details)
  897. [NFC][LoopFusion] Fix printing of the guard branch. Reviewer: kbarton, (details)
  898. [NFC][PowerPC] Add a function tryAndWithMask to handle all the cases (details)
  899. [Bitstream] Delete skipAbbreviatedField which duplicates (details)
  900. [PowerPC] stop folding if result rlwinm mask is wrap while original (details)
  901. Fix the MLIR Vim syntax file: the keyword group was missing (details)
  902. [clang][test] Minor fixes in testcase absolute-paths-symlinks.c (details)
  903. [lldb] Remove some calls to GetASTContext (details)
  904. [compiler-rt] Disable QSORT interception on watchOS and tvOS. (details)
  905. [lldb][NFC] Use ClangASTContext in AppleObjCRuntime interfaces (details)
  906. [lldb][tests] Posix function strdup requires macro _POSIX_C_SOURCE (details)
  907. [lldb][tests] Platform triple can be None (details)
  908. [lldb][NFC] Simplify if-return (details)
  909. [lldb][NFC] Add "lldb-vscode" to all_categories (details)
  910. [lldb][NFC] Move lock scope where it should begin (details)
  911. [lldb] Specify unsigned underlying type for an enumeration explicitly (details)
  912. [lldb][test] Don't include "test_common.h" in the debug macros test (details)
  913. [libcxx] Fix a typo in config.py (details)
  914. Partially revert "Add initial tests for (details)
  915. [X86] Add avx512f and avx512dq+vl command lines to the vector strictfp (details)
  916. [X86] Add test cases for v2i64->v2f32 (details)
  917. [X86] Add custom lowering for v2i64->v2f32 (details)
  918. [X86] Merge the SINT_TO_FP/UINT_TO_FP handlers in ReplaceNodeResults (details)
  919. [OpenMP][NFCI] Use the libFrontend ProcBindKind in Clang (details)
  920. [BPF] Enable relocation location for load/store/shifts (details)
  921. [Attributor] Add helper to change an instruction to `unreachable` inst (details)
  922. [ELF] Support input section description .gnu.version* in /DISCARD/ (details)
  923. [DebugInfo][SelectionDAG] Change order while transferring SDDbgValue to (details)
  924. Make lazyload_metadata.ll resilient to the addition of new metadata (details)
  925. Allow newlines in AST Matchers in clang-query files (details)
  926. Revert "Allow newlines in AST Matchers in clang-query files" (details)
  927. Revert "[msan] Check qsort input." (details)
  928. Allow newlines in AST Matchers in clang-query files (details)
  929. [X86] Add custom widening for v2f64->v2i32 strict_fp_to_uint with (details)
  930. [ELF] Improve the condition to create .interp (details)
  931. [X86] Add custom widening for v2i32->v2f64 strict_uint_to_fp with (details)
  932. Add a clang-tidy configuration file for MLIR, it is using camelBack for (details)
  933. [ELF][test] Fix dynamic-linker.s (details)
  934. Revert "Make lazyload_metadata.ll resilient to the addition of new (details)
  935. [X86] Custom widen 128/256-bit vXi32 uint_to_fp on avx512f targets (details)
  936. Make lazyload_metadata.ll resilient to the addition of new metadata (details)
  937. Fix -Wunused-lambda-capture warnings. (details)
  938. Remove SrcVT only used in an assert and propagate query. (details)
  939. [compiler-rt] [netbsd] Add support for versioned statvfs interceptors (details)
  940. add custom operation for strict fpextend/fpround (details)
  941. Revert "Allow newlines in AST Matchers in clang-query files" + 1 (details)
  942. Remove unused static function. (details)
  943. Fix a -Wcovered-switch-default warning by moving the unreachable out of (details)
  944. Remove an unused static function. (details)
  945. Fix a -Wcovered-switch-default warning by moving the unreachable out of (details)
  946. Temporarily Revert "[compiler-rt] [netbsd] Add support for versioned (details)
  947. Add an __attribute__((unused)) to populateWithGenerated since it might (details)
  948. [X86] Add test cases for v2i32->v2f32 (details)
  949. [X86] Add custom legalization for strict_uint_to_fp v2i32->v2f32. (details)
  950. [X86] Add tests for constrained float intrinsics on (details)
  951. [X86][FPEnv] Promote some float strictfp operations to double on (details)
  952. [X86] Fix -Wmisleading-indentation after D71892 (details)
  953. [X86] Custom widen strict v2f32->v2i32 by padding with zeroes. (details)
  954. [X86] Custom widen 128/256-bit vXi32 fp_to_uint on avx512f targets (details)
  955. Delete llvm.{sig,}{setjmp,longjmp} remnant after r136821 (details)
  956. [clangd] Fix crash in hover (details)
  957. [llvm-readobj][llvm-objdump][test] - Improve dynamic section testing. (details)
  958. [X86] Custom widen v2i32->v2f32 strict_sint_to_fp to avoid (details)
  959. [X86] Add v2i32->v2f32 non-strict sint_to_fp/uint_to_fp tests. NFC (details)
  960. [X86] Allow v2i32->v2f32 strict and non-strict uint_to_fp to be widened (details)
  961. [clangd] Reformat `HoverTests.cpp` NFC (details)
  962. [mlir] Floating constants for import-llvm (details)
  963. [MLIR] [NFC] fix unused var warning (details)
  964. [mlir] fix typo in a comment (details)
  965. [lldb] Silent random xpass on aarch64-linux buildbot (details)
  966. [OpenCL] Pretty print __private addr space (details)
  967. AMDGPU: Use correct DebugLoc (details)
  968. AMDGPU/GlobalISel: Select some 128-bit load/stores (details)
  969. AMDGPU/GlobalISel: Fix extra result register in fdiv64 lowering (details)
  970. [MLIR][spirv] Fix links in docs after repo migration (details)
  971. [OpenMP] Implementation of OMPT reduction callbacks (details)
  972. [NFC][DA] Remove duplicate code in checkSrcSubscript and (details)
  973. Allow newlines in AST Matchers in clang-query files (details)
  974. [Matrix] Propagate and use shape info for binary operators. (details)
  975. [OpenCL] Fix inconsistency between opencl and c11 atomic fetch max/min (details)
  976. [OpenCL] Fixed printing of __private in AMDGPU test (details)
  977. [ConstantRange] Respect destination bitwidth for cast results. (details)
  978. [compiler-rt] [netbsd] Add support for versioned statvfs interceptors (details)
  979. [VFS] Don't run symlink test on Windows, it may pass or fail (details)
  980. TailDuplication: Clear NoPHIs property (details)
  981. Revert "[msan] Intercept qsort, qsort_r." (details)
  982. Reland "[msan] Intercept qsort, qsort_r." (details)
  983. [mlir] Convert std.and/std.or ops to spv.LogicalAnd/spv.LogicalOr (details)
  984. Revert "CWG2352: Allow qualification conversions during reference (details)
  985. [mlir][spirv] Update docs regarding how to define new ops and types (details)
  986. [PowerPC][LoopVectorize]Add floating point reg usage test (details)
  987. Support powerpc and sparc when building without init_array. (details)
  988. Revert "[ELF] Improve the condition to create .interp" (details)
  989. [mlir][spirv] Add basic definitions for supporting availability (details)
  990. AMDGPU: Use Register (details)
  991. TII: Fix using Register for a subregister index argument (details)
  992. Hexagon: Fix missing tablegen mode comment (details)
  993. AMDGPU/GlobalISel: Use SReg_32 for readfirstlane constraining (details)
  994. [sanitizer] Link Sanitizer-x86_64-Test-Nolibc with -static (details)
  995. [ELF] Improve the condition to create .interp (details)
  996. AMDGPU: Adjust test so it will work with GlobalISel (details)
  997. DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode (details)
  998. lld: Remove explicit copy ops from AssociatedIterator, relying on (details)
  999. [Intrinsic] Delete tablegen rules of llvm.{sig,}{setjmp,longjmp} (details)
  1000. Delete setjmp_undefined_for_msvc workaround after llvm.setjmp was (details)
  1001. [ADT] Fix FoldingSet documentation typos (details)
  1002. [mlir] Merge the successor operand count into BlockOperand. (details)
  1003. [TargetLowering] Update comment to reference the correct compiler-rt (details)
  1004. [PowerPC] Modify the hasSideEffects of some VSX instructions from 1 to 0 (details)
  1005. [lldb][NFC] Remove GetASTContext call in ClangDeclVendor (details)
  1006. Fix crash in getFullyQualifiedName for inline namespace (details)
  1007. SimplifyDemandedBits - Remove duplicate getOperand() call. NFC. (details)
  1008. [PowerPC] Change default for unaligned FP access for older subtargets (details)
  1009. Fix bots after a9ad65a2b34f (details)
  1010. [X86] Add test cases for v4i64->v4f32 and v8i64->v8f32 (details)
  1011. [CMake] Fix lld detection after D69685 (details)
  1012. [COFF] Make the autogenerated .weak.<name>.default symbols static (details)
  1013. Allow redeclaration of __declspec(uuid) (details)
  1014. [lldb][NFC] Remove GetASTContext call in ClangPersistentVariables (details)
  1015. Revert "[COFF] Make the autogenerated .weak.<name>.default symbols (details)
  1016. [mlir] Fix the wrong computation of dynamic strides for lowering AllocOp (details)
  1017. [X86] Fix -enable-machine-outliner for x86-32 after D48683 (details)
  1018. [X86] Remove a redundant (scalar_to_vector (extract_vector_elt X))) in (details)
  1019. [LV] Use getMask() when printing recipe [NFCI] (details)
  1020. [X86] Stop accidentally custom type legalizing v4i32->v4f32 on SSE1 only (details)
  1021. [Attributor] AAUndefinedBehavior: Check for branches on undef value. (details)
  1022. Fix handling of newlines in clang-query (details)
  1023. Fix newline handling in clang-query parser (details)
  1024. Fix use of named values surrounded by newlines in clang-query (details)
Commit 6443583bfd9ca8d1934c5ab240dc11b44c7cc0d4 by gardener
Refactor getUsedValuesDefinedAbove to expose a variant taking a callback
(NFC)
This will allow clients to implement a different collection strategy on
these values, including collecting each uses within the region for
example.
PiperOrigin-RevId: 267803978
The file was modifiedmlir/lib/Transforms/Utils/RegionUtils.cpp
The file was modifiedmlir/include/mlir/Transforms/RegionUtils.h
Commit cbb6f09ce8416e8752dffe17641400b547eb71ca by gardener
Use "final" instead of marking method virtual in override (NFC)
This is the only example for overriding this interface in the repo,
let's try to make it right as it may be taken as a reference when
implemented in other dialects
PiperOrigin-RevId: 267811123
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
Commit 120509a6b22b7532849e22c093b912ef4a1d0c73 by gardener
Refactor PassTiming to support nested pipelines.
This is done via a new set of instrumentation hooks
runBeforePipeline/runAfterPipeline, that signal the lifetime of a pass
pipeline on a specific operation type. These hooks also provide the
parent thread of the pipeline, allowing for accurate merging of timers
running on different threads.
PiperOrigin-RevId: 267909193
The file was addedmlir/test/lib/Pass/TestPassManager.cpp
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/test/lib/CMakeLists.txt
The file was modifiedmlir/lib/Pass/PassTiming.cpp
The file was modifiedmlir/include/mlir/Pass/PassInstrumentation.h
The file was modifiedmlir/test/Pass/pass-timing.mlir
The file was addedmlir/test/lib/Pass/CMakeLists.txt
The file was modifiedmlir/lib/Pass/PassDetail.h
Commit 42b60d34fc3dfbad2b26568cf1cd903685df3a3e by gardener
Add `parseGenericOperation()` to the OpAsmParser
This method parses an operation in its generic form, from the current
parser state. This is the symmetric of OpAsmPrinter::printGenericOp().
An immediate use case is illustrated in the test dialect, where an
operation wraps another one in its region and makes use of a single-line
pretty-print form.
PiperOrigin-RevId: 267930869
The file was modifiedmlir/include/mlir/IR/OpImplementation.h
The file was addedmlir/test/IR/wrapping_op.mlir
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/lib/Parser/Parser.cpp
Commit 318ff019cf703ece10df791b2da8307f3248baee by gardener
Addressing some late review comments on kernel inlining.
Just formatting and better lit tests, no functional change.
PiperOrigin-RevId: 267942907
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/test/Dialect/GPU/outlining.mlir
Commit e702875d16b58601bdc05d1d51e33105e0b03b0d by gardener
Add support for coalescing adjacent nested pass pipelines.
This allows for parallelizing across pipelines of multiple operation
types. AdaptorPasses can now hold pass managers for multiple operation
types and will dispatch based upon the operation being operated on.
PiperOrigin-RevId: 268017344
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/lib/Pass/PassDetail.h
The file was modifiedmlir/test/Pass/pass-timing.mlir
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/lib/Pass/PassTiming.cpp
Commit 5e65dafbfa8e996a13d38b064a1aa3e9986d05bf by gardener
Add warpsize and laneid intrinsics to NVVM dialect.
PiperOrigin-RevId: 268041263
The file was modifiedmlir/test/Target/nvvmir.mlir
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
Commit 36508528c71606341af77ab755ecf63d9c09249b by gardener
Overload LLVM::TerminatorOp::build() for empty operands list.
PiperOrigin-RevId: 268041584
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
Commit 893c86fff7efa87c8d81e6f6e7a200a0b3f7ece5 by gardener
Explicitly declare the OpPassManager move constructor to avoid undefined
errors.
Some compilers will try to auto-generate the destructor, instead of
using the user provided destructor, when creating a default move
constructor.
PiperOrigin-RevId: 268067367
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/include/mlir/Pass/PassManager.h
Commit 27d776fa6d04e3ca47c42f5b9a90413c7243c35a by gardener
Convert per channel fake quant attributes to type
For per channel fake quant attributes, the returned type should be
UniformQuantizedPerAxisType. Currently, this method isn't under test
because we haven't added the quant_ConstFakeQuantPerAxis op and the
convert method.
PiperOrigin-RevId: 268084017
The file was modifiedmlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
The file was modifiedmlir/include/mlir/Dialect/QuantOps/FakeQuantSupport.h
Commit d3a6dbc0b895bdfdae3627c00d35066c4f51b032 by gardener
[NFC] Rename ExpressedToUniformQuantizedType to ExpressedToQuantizedType
PiperOrigin-RevId: 268090906
The file was modifiedmlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
The file was modifiedmlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
The file was modifiedmlir/include/mlir/Dialect/QuantOps/UniformSupport.h
Commit f4ae4762bf7d64d7ca46d05206955c9b44cedc49 by gardener
Add quant.const_fake_quant_per_axis op
Comparing to the existing quant.const_fake_quant op, the min and max
attributes of this new op is for each channel of last dimension of the
input.
PiperOrigin-RevId: 268093722
The file was modifiedmlir/include/mlir/Dialect/QuantOps/QuantOps.td
The file was modifiedmlir/test/Dialect/QuantOps/parse-ops.mlir
Commit 2660623a88d10df9ea7976d5e80704c5c7aab981 by gardener
Add pass generate per block in a function a GraphViz Dot graph with ops
as nodes
* Add GraphTraits that treat a block as a graph, Operation* as node and
use-relationship for edges;
- Just basic graph output;
* Add use iterator to iterate over all uses of an Operation;
* Add testing pass to generate op graph;
This does not support arbitrary operations other than function nor
nested regions yet.
PiperOrigin-RevId: 268121782
The file was modifiedmlir/include/mlir/IR/Operation.h
The file was addedmlir/include/mlir/Transforms/ViewOpGraph.h
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/lib/Transforms/CMakeLists.txt
The file was addedmlir/lib/Transforms/ViewOpGraph.cpp
Commit af27f4c74665030889176596d65690bb768f3adc by gardener
Avoid sign-compare warning
PiperOrigin-RevId: 268132321
The file was modifiedmlir/unittests/TableGen/StructsGenTest.cpp
Commit a23f69a37b33a627bf37acc8438883043041980e by gardener
Remove redundant qualification
Address GCC error: extra qualification not allowed [-fpermissive]
PiperOrigin-RevId: 268133737
The file was modifiedmlir/lib/Transforms/ViewOpGraph.cpp
Commit 277b6136ee78e621a1737e35956d1a9317ff096d by gardener
Remove unused variable
PiperOrigin-RevId: 268173638
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
Commit c68d5467d604d2b1e06a704133370f51a99df11d by gardener
Convert ConstFakeQuantPerAxis to qcast and dcast pair
This is also to add the test to the fakeQuantAttrsToType for per-channel
fake quant.
PiperOrigin-RevId: 268260032
The file was modifiedmlir/test/Dialect/QuantOps/convert-fakequant.mlir
The file was modifiedmlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
The file was modifiedmlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
Commit cf0a7823390818273892a3be5820c09403a15ec7 by gardener
Remove the constraint that min / max should stride zero
Since we apply nudging for the zero point to make sure the nudged zerop
points can be in the range of [qmin, qmax], the constraint that rmin /
rmax should stride zero isn't necessary.
This also matches the documentation of tensorflow's
FakeQuantWithMinMaxArgs op, where min and max don't need to stride zero:
https://www.tensorflow.org/api_docs/python/tf/quantization/fake_quant_with_min_max_args
PiperOrigin-RevId: 268296285
The file was modifiedmlir/test/Dialect/QuantOps/convert-fakequant-invalid.mlir
The file was modifiedmlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
The file was modifiedmlir/test/Dialect/QuantOps/convert-fakequant.mlir
Commit ee8cbccacfc8755d1692ff64ad98876917a08b30 by gardener
Add folding rule for spv.CompositeExtract
If the composite is a constant, we can fold it away. This only supports
vector and array constants for now, given that struct constant is not
supported in spv.constant yet.
PiperOrigin-RevId: 268350340
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was modifiedmlir/test/Dialect/SPIRV/canonicalize.mlir
Commit d732aaf2cb24b1b759adc9dccd34e0a3b18fef13 by gardener
Don't leak TargetMachine in ExecutionEngine::setupTargetTriple
PiperOrigin-RevId: 268361054
The file was modifiedmlir/lib/ExecutionEngine/ExecutionEngine.cpp
Commit 6f8321f06f0772676e42bc93feca7605a8feb8ea by gardener
Fix a typo in comments. The Inequality and Equality explanations were
apparently reversed.
PiperOrigin-RevId: 268395163
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h
Commit bc9b52f2ed71ee938f30591b8b6c6f549f53fc88 by gardener
Add logical groups to NVVM op definitions.
PiperOrigin-RevId: 268436116
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
Commit 9037f28cb4e19d311478dbe2596edda64c37f5af by gardener
Fix typos in SDBMTest.cpp
PiperOrigin-RevId: 268443146
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
Commit e15356f8edab9ce4b4edbaf2e988d6b38adb59cc by gardener
Rename SDBMPositiveExpr to SDBMTermExpr
This better reflects how this kind of expressions is used and avoids the
potential confusion since the expression can take negative values.  Term
expressions comprise dimensions, symbols and stripe expressions.  In an
SDBM domain, a stripe expression always corresponds to a variable, input
or temporary.  This expression can appear anywhere an input variable
can, including on the LHS of other stripe expressions.
PiperOrigin-RevId: 268486066
The file was modifiedmlir/include/mlir/Dialect/SDBM/SDBMExpr.h
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/include/mlir/Dialect/SDBM/SDBM.h
The file was modifiedmlir/lib/Dialect/SDBM/SDBM.cpp
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExpr.cpp
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExprDetail.h
Commit a84bc68accc5103621df3b1661153c419ecafed7 by gardener
[spirv] Add support for spv.loop (de)serialization
This CL adds support for serializing and deserializing spv.loop ops.
This adds support for spv.Branch and spv.BranchConditional op
(de)serialization, too, because they are needed for spv.loop.
PiperOrigin-RevId: 268536962
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was addedmlir/test/Dialect/SPIRV/Serialization/loop.mlir
The file was modifiedmlir/include/mlir/IR/Function.h
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
The file was modifiedmlir/lib/IR/Function.cpp
Commit f39a599e46de8ea1c18e30216df516d22395df2f by gardener
NFC: Clean up constant fold tests
Use variable captures to make constant folding tests less sensitive to
printer/parser implementation details.
See guidelines at
https://github.com/tensorflow/mlir/blob/master/g3doc/TestingGuide.md
PiperOrigin-RevId: 268780812
The file was modifiedmlir/test/Transforms/constant-fold.mlir
Commit 2ccbb3f1ceeb326309c0685305d1dfd38d5dbcc2 by gardener
Cmpf constant folding for nan and inf
PiperOrigin-RevId: 268783645
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/test/Transforms/constant-fold.mlir
Commit 1854c64c7cc57e9fe44404578408f732f58b9715 by gardener
Log name of the generated illegal operation name in DialectConversion
debug mode
PiperOrigin-RevId: 268859399
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
Commit 6cce275301d196a1033c84c7f48df5e8932c03f7 by gardener
Fixing typo in documentation.
PiperOrigin-RevId: 268877189
The file was modifiedmlir/g3doc/WritingAPass.md
Commit 70653ed6003ee39e59d7a8d72059ed798ef2e000 by gardener
NFC: Update comments about rank constraints
These refer to ranked tensors, but are actually applicable to any shaped
type
PiperOrigin-RevId: 268931789
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit 9274ed66ef30bf605b468ae1aba11363e879c930 by gardener
Refactor pass pipeline command line parsing to support explicit pipeline
strings.
This allows for explicitly specifying the pipeline to add to the pass
manager. This includes the nesting structure, as well as the
passes/pipelines to run. A textual pipeline string is defined as a
series of names, each of which may in itself recursively contain a
nested pipeline description. A name is either the name of a registered
pass, or pass pipeline, (e.g. "cse") or the name of an operation type
(e.g. "func").
For example, the following pipeline:
$ mlir-opt foo.mlir -cse -canonicalize -lower-to-llvm
Could now be specified as:
$ mlir-opt foo.mlir -pass-pipeline='func(cse, canonicalize),
lower-to-llvm'
This will allow for running pipelines on nested operations, like say
spirv modules. This does not remove any of the current functionality,
and in fact can be used in unison. The new option is available via
'pass-pipeline'.
PiperOrigin-RevId: 268954279
The file was addedmlir/test/Pass/pipeline-parsing.mlir
The file was modifiedmlir/include/mlir/Pass/PassRegistry.h
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/lib/Support/MlirOptMain.cpp
The file was modifiedmlir/test/lib/Pass/TestPassManager.cpp
The file was modifiedmlir/lib/Pass/PassRegistry.cpp
The file was modifiedmlir/include/mlir/Support/MlirOptMain.h
The file was modifiedmlir/lib/Pass/PassManagerOptions.cpp
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
Commit d3787e58654c15f8bfacc3471eba056f34782055 by gardener
Improve verifier error reporting on type mismatch (NFC)
Before this change, it only reports expected type but not exact type, so
it's hard to troubleshoot.
PiperOrigin-RevId: 268961078
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Commit 8a1cdeb31bd56d6eb5182a3ca3e019ca9654ef39 by gardener
Forward diagnostics from untracked threads in ParallelDiagnosticHandler.
This allows for the use of multiple ParallelDiagnosticHandlers without
having them conflict with each other.
PiperOrigin-RevId: 268967407
The file was modifiedmlir/include/mlir/IR/Diagnostics.h
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/g3doc/Diagnostics.md
The file was modifiedmlir/lib/IR/Diagnostics.cpp
Commit a260436714b35584bbc1cdd39834b5556b991178 by gardener
Add tablegen class for memrefs with rank constraints
PiperOrigin-RevId: 268968004
The file was modifiedmlir/test/mlir-tblgen/types.mlir
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit f1b100c77ba005899c60f3dea74607d5daad3f52 by gardener
NFC: Finish replacing FunctionPassBase/ModulePassBase with OpPassBase.
These directives were temporary during the generalization of
FunctionPass/ModulePass to OpPass.
PiperOrigin-RevId: 268970259
The file was modifiedmlir/include/mlir/Dialect/FxpMathOps/Passes.h
The file was modifiedmlir/lib/Analysis/TestMemRefDependenceCheck.cpp
The file was modifiedmlir/lib/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.cpp
The file was modifiedmlir/lib/Transforms/PipelineDataTransfer.cpp
The file was modifiedmlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
The file was modifiedmlir/include/mlir/Analysis/Passes.h
The file was modifiedmlir/lib/Transforms/LoopInvariantCodeMotion.cpp
The file was modifiedmlir/lib/Transforms/CSE.cpp
The file was modifiedmlir/lib/Transforms/SimplifyAffineStructures.cpp
The file was modifiedmlir/test/lib/Transforms/TestLoopFusion.cpp
The file was modifiedmlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
The file was modifiedmlir/lib/Transforms/Canonicalizer.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/test/lib/Transforms/TestConstantFold.cpp
The file was modifiedmlir/include/mlir/Transforms/ViewOpGraph.h
The file was modifiedmlir/lib/Analysis/TestParallelismDetection.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
The file was modifiedmlir/test/lib/Transforms/TestLoopParametricTiling.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
The file was modifiedmlir/lib/Transforms/LoopTiling.cpp
The file was modifiedmlir/lib/Transforms/Vectorize.cpp
The file was modifiedmlir/include/mlir/Dialect/QuantOps/Passes.h
The file was modifiedmlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/Passes.h
The file was modifiedmlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.h
The file was modifiedmlir/include/mlir/Dialect/GPU/Passes.h
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/lib/Transforms/ViewOpGraph.cpp
The file was modifiedmlir/lib/Transforms/LoopUnroll.cpp
The file was modifiedmlir/lib/Transforms/StripDebugInfo.cpp
The file was modifiedmlir/lib/Transforms/MemRefDataFlowOpt.cpp
The file was modifiedmlir/test/lib/Transforms/TestVectorizationUtils.cpp
The file was modifiedmlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
The file was modifiedmlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
The file was modifiedmlir/lib/Transforms/LowerVectorTransfers.cpp
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
The file was modifiedmlir/include/mlir/Transforms/ViewRegionGraph.h
The file was modifiedmlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
The file was modifiedmlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
The file was modifiedmlir/examples/Linalg/Linalg3/lib/Transforms.cpp
The file was modifiedmlir/lib/Dialect/QuantOps/Transforms/ConvertConst.cpp
The file was modifiedmlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
The file was modifiedmlir/include/mlir/Conversion/VectorToLLVM/VectorToLLVM.h
The file was modifiedmlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
The file was modifiedmlir/lib/Transforms/ViewRegionGraph.cpp
The file was modifiedmlir/include/mlir/Quantizer/Transforms/Passes.h
The file was modifiedmlir/lib/Transforms/AffineDataCopyGeneration.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/Passes.h
The file was modifiedmlir/examples/Linalg/Linalg3/include/linalg3/Transforms.h
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/lib/Analysis/MemRefBoundCheck.cpp
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/lib/Transforms/LoopCoalescing.cpp
The file was modifiedmlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
The file was modifiedmlir/lib/Transforms/LoopUnrollAndJam.cpp
The file was modifiedmlir/lib/Transforms/LowerAffine.cpp
The file was modifiedmlir/lib/Transforms/LoopFusion.cpp
The file was modifiedmlir/include/mlir/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.h
The file was modifiedmlir/lib/Transforms/MaterializeVectors.cpp
The file was modifiedmlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/include/mlir/Transforms/Passes.h
The file was modifiedmlir/include/mlir/Pass/Pass.h
The file was modifiedmlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
The file was modifiedmlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
Commit 113aadddf99377d7205ef840b3292bbf55648d97 by gardener
Update SPIR-V symbols and use GLSL450 instead of VulkanKHR
SPIR-V recently publishes v1.5, which brings a bunch of symbols into
core. So the suffix "KHR"/"EXT"/etc. is removed from the symbols. We use
a script to pull information from the spec directly.
Also changed conversion and tests to use GLSL450 instead of VulkanKHR
memory model. GLSL450 is still the main memory model supported by Vulkan
shaders and it does not require extra capability to enable.
PiperOrigin-RevId: 268992661
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/array_stride.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/minimal-module.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/select.mlir
The file was modifiedmlir/test/Dialect/SPIRV/structure-ops.mlir
The file was modifiedmlir/utils/spirv/gen_spirv_dialect.py
The file was modifiedmlir/test/Conversion/GPUToSPIRV/load_store.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/simple.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/execution_mode.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/variables_init.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/entry.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/bin_ops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/load_store.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/entry_interface.mlir
The file was modifiedmlir/test/Dialect/SPIRV/control-flow-ops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/struct.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/variable_reference.mlir
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/access_chain.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/variables.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/builtins.mlir
Commit efbd3e461017a471eece97ef4f8392c3ad092eab by gardener
Add type constraints for shaped types with same rank and element count
PiperOrigin-RevId: 269000237
The file was modifiedmlir/test/mlir-tblgen/types.mlir
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
Commit d780bdef2050f6485396e73220ec76455c563c17 by gardener
Publicly expose the functionality to parse a textual pass pipeline.
This allows for users other than those on the command line to apply a
textual description of a pipeline to a given pass manager.
PiperOrigin-RevId: 269017028
The file was modifiedmlir/lib/Pass/PassRegistry.cpp
The file was modifiedmlir/include/mlir/Pass/PassRegistry.h
The file was modifiedmlir/test/lib/Pass/TestPassManager.cpp
The file was modifiedmlir/test/Pass/pipeline-parsing.mlir
Commit 1e6a93b7cae61c777ec4ce06a5f6d7d2b81af0ea by gardener
add missing memref cast fold pattern for dim op
- add missing canonicalization pattern to fold memref_cast + dim to
dim (needed to propagate constant when folding a dynamic shape to
a static one)
- also fix an outdated/inconsistent comment in StandardOps/Ops.td
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#126
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/126
from bondhugula:quickfix 4566e75e49685c532faffff91d64c5d83d4da524
PiperOrigin-RevId: 269020058
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/test/Transforms/canonicalize.mlir
Commit 4e48beadbb45830f6ad45ee463a2159cdc8933a0 by gardener
Verify that ModuleOps only contain dialect specific attributes.
ModuleOp has no expected operations, so only dialect-specific attributes
are valid.
PiperOrigin-RevId: 269020062
The file was modifiedmlir/lib/IR/Module.cpp
The file was modifiedmlir/test/IR/invalid-module-op.mlir
Commit f2eb0f02fabae7d03f24d8112600b0137c8265ac by gardener
Add pattern to canonicalize for loop bounds
- add pattern to canonicalize affine.for loop bounds (using
canonicalizeMapAndOperands)
- rename AffineForLoopBoundFolder -> AffineForLoopBoundFolder for
consistency
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#111
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/111
from bondhugula:bound-canonicalize
ee8fb7f43a7ffd45f6df3f53c95098d8b7e494c7 PiperOrigin-RevId: 269041220
The file was modifiedmlir/examples/Linalg/Linalg3/Example.cpp
The file was modifiedmlir/examples/Linalg/Linalg4/Example.cpp
The file was modifiedmlir/test/AffineOps/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
Commit aac8fa8c4770b142d095007b99a9276f75182172 by gardener
Update QuickstartRewrites.md regarding op definition and rewrites
This CL updates the doc with recent changes. It also adds a section on
registering and using the auto-generated patterns.
PiperOrigin-RevId: 269086830
The file was modifiedmlir/g3doc/QuickstartRewrites.md
Commit 2de18fb84df66e0850b1b66a4cc8a701e6bbe008 by gardener
NFC: Fix stray character in error message: 1 -> ' PiperOrigin-RevId:
269091468
The file was modifiedmlir/lib/IR/Module.cpp
Commit 018cfa94d963f2a62eeba15e84f101a108476b95 by gardener
Clean up build trip count analysis method - avoid mutating IR
- NFC - on any pass/utility logic/output.
- Resolve TODO; the method building loop trip count maps was
creating and deleting affine.apply ops (transforming IR from under
analysis!, strictly speaking). Introduce AffineValueMap::difference to
do this correctly (without the need to create any IR).
- Move AffineApplyNormalizer out so that its methods are reusable from
AffineStructures.cpp; add a helper method 'normalize' to it. Fix
AffineApplyNormalize::renumberOneDim (Issue tensorflow/mlir#89).
- Trim includes on files touched.
- add test case on a scenario previously not covered
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#133
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/133
from bondhugula:trip-count-build
7fc34d857f7788f98b641792cafad6f5bd50e47b PiperOrigin-RevId: 269101118
The file was modifiedmlir/lib/Analysis/LoopAnalysis.cpp
The file was modifiedmlir/test/Transforms/unroll.mlir
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.h
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h
Commit 1366467a3ba9c489bbabe27f89cf6af404601149 by gardener
update normalizeMemRef utility; handle missing failure check + add more
tests
- take care of symbolic operands with alloc
- add missing check for compose map failure and a test case
- add test cases on strides
- drop incorrect check for one-to-one'ness
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#132
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/132
from bondhugula:normalize-memrefs
8aebf285fb0d7c19269d85255aed644657e327b7 PiperOrigin-RevId: 269105947
The file was modifiedmlir/lib/Transforms/Utils/Utils.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/test/Transforms/memref-normalize.mlir
Commit 4f32ae61b4b75ee729ef9a43e4678d55d8deeef3 by gardener
NFC - Move explicit copy/dma generation utility out of pass and into
LoopUtils
- turn copy/dma generation method into a utility in LoopUtils, allowing
it to be reused elsewhere.
- no functional/logic change to the pass/utility
- trim down header includes in files affected
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#124
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/124
from bondhugula:datacopy 9f346e62e5bd9dd1986720a30a35f302eb4d3252
PiperOrigin-RevId: 269106088
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/include/mlir/Transforms/LoopUtils.h
The file was modifiedmlir/lib/Transforms/AffineDataCopyGeneration.cpp
Commit 38e7226606d218bb4d7b7a5c1541c5d81ca0cf14 by gardener
Add convenience methods to create i8 and i16 attributes in Builder.
PiperOrigin-RevId: 269120226
The file was modifiedmlir/lib/IR/Builders.cpp
The file was modifiedmlir/include/mlir/IR/Builders.h
Commit cb1bcba69beeeb259eaf15d36892b1922046c525 by gardener
NFC: Merge OpPass with OperationPass into just OperationPass.
OperationPass' are defined exactly the same way as they are now:
  class DerivedPass :  public OperationPass<DerivedPass>;
OpPass' are now defined as OperationPass, but with an additional
template parameter for the operation type:
  class DerivedPass :  public OperationPass<DerivedPass, FuncOp>;
PiperOrigin-RevId: 269122410
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/include/mlir/Pass/Pass.h
Commit bbe65b46f567021f2b77925ec2a1112b5fd1e1e1 by gardener
NFC: Pass PassInstrumentations by unique_ptr instead of raw pointer.
This makes the ownership model explicit, and removes potential user
errors.
PiperOrigin-RevId: 269122834
The file was modifiedmlir/g3doc/WritingAPass.md
The file was modifiedmlir/include/mlir/Pass/PassInstrumentation.h
The file was modifiedmlir/lib/Pass/IRPrinting.cpp
The file was modifiedmlir/lib/Pass/PassTiming.cpp
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/include/mlir/Pass/PassManager.h
Commit d37777c440af424b5d5129c0f54326d89c7b6da6 by gardener
Update the IRPrinter instrumentation to work on non function/module
operations.
This is necessary now that the pass manager may work on different types
of operations.
PiperOrigin-RevId: 269139669
The file was modifiedmlir/test/Pass/ir-printing.mlir
The file was modifiedmlir/lib/Pass/IRPrinting.cpp
The file was modifiedmlir/g3doc/WritingAPass.md
The file was modifiedmlir/lib/Pass/PassManagerOptions.cpp
Commit bbc6d48d1c63827d8fc4557f4784a6225a6efc5c by gardener
NFC: Update the expected outputs of pass-timing.
The output of the pass timing instrumentation has been changed now that
the pass hierarchy has been generalized.
PiperOrigin-RevId: 269140277
The file was modifiedmlir/g3doc/WritingAPass.md
Commit f22011ccbad1a8a55260069d195a17d5ae275b41 by gardener
NFC: Update the PassInstrumentation section.
This section has grown stale as the pass infrastructure has been
generalized.
PiperOrigin-RevId: 269140863
The file was modifiedmlir/g3doc/WritingAPass.md
Commit 16eac9656082e3414cc29499ef55a3a6ed54b5cb by gardener
Fix typo in test/AffineOps/ops.mlir
Closes tensorflow/mlir#135
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/135
from bondhugula:patch-1 539a7f1b43d09ef539b2fd15875f8ac765600263
PiperOrigin-RevId: 269187507
The file was modifiedmlir/test/AffineOps/ops.mlir
Commit faaa1ced1002acef661cfd352c32c1cb86c22726 by gardener
Update the pass registration section and add a sub-section on the
textual pipeline specification.
Now that the pass manager is generalized, and nested/arbritrary
pipelines are possible, it is important to document how to specify these
types of pipelines from the command line.
PiperOrigin-RevId: 269207681
The file was modifiedmlir/g3doc/WritingAPass.md
Commit 9814b3fa0ddc497f215813ca261dc97214e53295 by gardener
Add mechanism to specify extended instruction sets in SPIR-V.
Add support for specifying extended instructions sets. The operations in
SPIR-V dialect are named as 'spv.<extension-name>.<op-name>'. Use this
mechanism to define a 'Exp' operation from GLSL(450) instructions. Later
CLs will add support for (de)serialization of these operations, and
update the dialect generation scripts to auto-generate the specification
using the spec directly.
Additional changes: Add a Type Constraint to OpBase.td to check for
vector of specified lengths. This is used to check that the vector type
used in SPIR-V dialect are of lengths 2, 3 or 4. Update SPIRVBase.td to
use this Type constraints for vectors.
PiperOrigin-RevId: 269234377
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was addedmlir/test/Dialect/SPIRV/glslops.mlir
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was addedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
The file was addedmlir/lib/Dialect/SPIRV/SPIRVGLSLOps.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
The file was addedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.h
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/CMakeLists.txt
Commit 6755dfdec9e4af64109d5767ad374d1d5fd2c95d by gardener
Drop makePositionAttr and the like in favor of Builder::getI64ArrayAttr
The helper functions makePositionAttr() and positionAttr() were
originally introduced in the lowering-to-LLVM-dialect pass to construct
integer array attributes that are used for static positions in
extract/insertelement. Constructing an integer array attribute being
fairly common, a utility function Builder::getI64ArrayAttr was later
introduced into the Builder API.  Drop makePositionAttr and similar
homegrown functions and use that API instead. PiperOrigin-RevId:
269295836
The file was modifiedmlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
The file was modifiedmlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
Commit 1da0290c4b7c24d222d4f9d323f719c6707cb840 by gardener
Error out when kernel function is not found while translating GPU calls.
PiperOrigin-RevId: 269327909
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
Commit 0ce64b0bf36198446721f2c9aaa3fee0b0abd98c by gardener
Unify how errors are emitted in LaunchFuncOp verification.
PiperOrigin-RevId: 269331869
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
Commit e94db619d9727ba18732158996204e782be47d5d by gardener
Introduce SDBMDirect expression into the SDBM expression hierarchy
Direct expressions are those that do not negate any of the variables
they involve.  They include input expressions (dimensions and symbols),
stripe and sum expressions, and combinations of those.  Reifying direct
expressions as a class is a precondition for enabling additions on the
LHS of a stripe expression.
PiperOrigin-RevId: 269336031
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/include/mlir/Dialect/SDBM/SDBMExpr.h
Commit cb3ecb5291ad71c74cd9db7903fffc0ad4019ff1 by gardener
Overhaul the SDBM expression kind hierarchy
Swap the allowed nesting of sum and diff expressions: now a diff
expression can contain a sum expression, but only on the left hand side.
A difference of two expressions sum must be canonicalized by grouping
their constant terms in a single expression.  This change of sturcture
became possible thanks to the introduction of the "direct" super-kind.
It is necessary to enable support of sum expressions on the left hand
side of the stripe expression.
SDBM expressions are now grouped into the following structure
- expression
- varying
   - direct
     - sum <- (term, constant)
     - term
       - symbol
       - dimension
       - stripe <- (term, constant)
   - negation <- (direct)
   - difference <- (direct, term)
- constant The notation <- (...) denotes the types of subexpressions a
compound expression can combine.
PiperOrigin-RevId: 269337222
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExprDetail.h
The file was modifiedmlir/test/SDBM/sdbm-api-test.cpp
The file was modifiedmlir/include/mlir/Dialect/SDBM/SDBMExpr.h
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExpr.cpp
Commit 6934a337f099f4ccb22625e1bf440b3356f8c09f by gardener
[spirv] Add support for BitEnumAttr
Certain enum classes in SPIR-V, like function/loop control and memory
access, are bitmasks. This CL introduces a BitEnumAttr to properly model
this and drive auto-generation of verification code and utility
functions. We still store the attribute using an 32-bit IntegerAttr for
minimal memory footprint and easy (de)serialization. But utility
conversion functions are adjusted to inspect each bit and generate
"|"-concatenated strings for the bits; vice versa.
Each such enum class has a "None" case that means no bit is set. We need
special handling for "None". Because of this, the logic is not general
anymore. So right now the definition is placed in the SPIR-V dialect. If
later this turns out to be useful for other dialects, then we can see
how to properly adjust it and move to OpBase.td.
Added tests for SPV_MemoryAccess to check and demonstrate.
PiperOrigin-RevId: 269350620
The file was modifiedmlir/include/mlir/TableGen/Attribute.h
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/lib/TableGen/Attribute.cpp
The file was modifiedmlir/utils/spirv/gen_spirv_dialect.py
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/CMakeLists.txt
The file was modifiedmlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/tools/mlir-tblgen/EnumsGen.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
The file was addedmlir/tools/mlir-tblgen/EnumsGen.h
Commit 9619ba10d47a11b968efe835afb040be1c8c63cc by gardener
Add support for multi-level value mapping to DialectConversion.
When performing A->B->C conversion, an operation may still refer to an
operand of A. This makes it necessary to unmap through multiple levels
of replacement for a specific value.
PiperOrigin-RevId: 269367859
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/Transforms/test-legalizer-analysis.mlir
The file was addedmlir/test/Transforms/test-legalizer-full.mlir
The file was modifiedmlir/test/lib/TestDialect/TestPatterns.cpp
Commit 8a34d5d18cdd509f06945b512ea889133c7b3a0e by gardener
[spirv] Add support for function calls.
Add spv.FunctionCall operation and (de)serialization.
Closes tensorflow/mlir#137
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/137
from denis0x0D:sandbox/function_call_op
e2e6f07d21e7f23e8b44c7df8a8ab784f3356ce4 PiperOrigin-RevId: 269437167
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/test/Dialect/SPIRV/control-flow-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was addedmlir/test/Dialect/SPIRV/Serialization/function_call.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
Commit 2d86ad79f0021eb5612f1b37d5a3de5160e919fb by gardener
Autogenerate (de)serialization for Extended Instruction Sets
A generic mechanism for (de)serialization of extended instruction sets
is added with this CL. To facilitate this, a new class
"SPV_ExtendedInstSetOp" is added which is a base class for all
operations corresponding to extended instruction sets. The methods to
(de)serialization such ops as well as its dispatch is generated
automatically.
The behavior controlled by autogenSerialization and hasOpcode is also
slightly modified to enable this. They are now decoupled. 1) Setting
hasOpcode=1 means the operation has a corresponding
  opcode in SPIR-V binary format, and its dispatch for
  (de)serialization is automatically generated. 2) Setting
autogenSerialization=1 generates the function for
  (de)serialization automatically. So now it is possible to have
hasOpcode=0 and autogenSerialization=1
(for example SPV_ExtendedInstSetOp).
Since the dispatch functions is also auto-generated, the input file
needs to contain all operations. To this effect, SPIRVGLSLOps.td is
included into SPIRVOps.td. This makes the previously added
SPIRVGLSLOps.h and SPIRVGLSLOps.cpp unnecessary, and are deleted.
The SPIRVUtilsGen.cpp is also changed to make better use of
formatv,making the code more readable.
PiperOrigin-RevId: 269456263
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
The file was removedmlir/lib/Dialect/SPIRV/SPIRVGLSLOps.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was modifiedmlir/test/Dialect/SPIRV/glslops.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/glslops.mlir
The file was removedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.h
The file was modifiedmlir/lib/Dialect/SPIRV/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
Commit 62e1faa6f6bd9f49b1bb68ba01e543850ebff5d0 by gardener
Add missing CMake dependency from libAnalysis to the Vector dialect
Fixes tensorflow/mlir#138
PiperOrigin-RevId: 269509668
The file was modifiedmlir/lib/Analysis/CMakeLists.txt
Commit bd7de6d4dfb82df21f36c1c331cba87a4d0118f7 by gardener
Add rewrite pattern to compose maps into affine load/stores
- add canonicalization pattern to compose maps into affine loads/stores;
templatize the pattern and reuse it for affine.apply as well
- rename getIndices -> getMapOperands() (getIndices is confusing since
these are no longer the indices themselves but operands to the map
whose results are the indices). This also makes the accessor uniform
across affine.apply/load/store. Change arg names on the affine
load/store builder to avoid confusion. Drop an unused confusing build
method on AffineStoreOp.
- update incomplete doc comment for canonicalizeMapAndOperands (this was
missed from a previous update).
Addresses issue tensorflow/mlir#121
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#122
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/122
from bondhugula:compose-load-store
e71de1771e56a85c4282c10cb43f30cef0701c4f PiperOrigin-RevId: 269619540
The file was modifiedmlir/lib/Analysis/Utils.cpp
The file was modifiedmlir/test/AffineOps/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.h
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/test/Transforms/canonicalize.mlir
The file was modifiedmlir/lib/Transforms/Vectorize.cpp
The file was modifiedmlir/lib/Transforms/LowerAffine.cpp
The file was modifiedmlir/lib/Analysis/LoopAnalysis.cpp
Commit b00a522b801015f0c3d3ac7c3db1eddafca603cb by gardener
Change MLIR translation functions signature
This CL changes translation functions to take MemoryBuffer as input and
raw_ostream as output. It is generally better to avoid handling files
directly in a library (unless the library is specifically for file
manipulation) and we can unify all file handling to the mlir-translate
binary itself.
PiperOrigin-RevId: 269625911
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/ConvertFromBinary.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
The file was modifiedmlir/tools/mlir-translate/mlir-translate.cpp
The file was modifiedmlir/include/mlir/Support/TranslateClParser.h
The file was modifiedmlir/include/mlir/Translation.h
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/ConvertToBinary.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
The file was modifiedmlir/lib/Support/TranslateClParser.cpp
Commit b991e8b1e40cca25a6ed1b52ffe4a71a39cb72fb by gardener
Support file-to-file translation in mlir-translate
Existing translations are either from MLIR or to MLIR. To support cases
like round-tripping some external format via MLIR, one must chain two
mlir-translate invocations together using pipes. This can be problematic
to support -split-input-file in mlir-translate given that it won't work
across pipes.
Motivated by the above, this CL adds another translation category that
allows file to file. This gives users more freedom.
PiperOrigin-RevId: 269636438
The file was modifiedmlir/include/mlir/Translation.h
The file was modifiedmlir/lib/Support/TranslateClParser.cpp
The file was modifiedmlir/lib/Translation/Translation.cpp
Commit 3e2ac62b7d54e37a8b55dfc2e9654a0eef2c6fd6 by gardener
Add a preprocess pass to remove sequences that are problematic with
FileCheck
Add a preprocess phase to rewrite parts of the input line that may be
problematic with filecheck. This change adds preprocessing to escape
'[[' bracket sequences, as these are used by FileCheck for variables.
PiperOrigin-RevId: 269648490
The file was modifiedmlir/utils/generate-test-checks.py
Commit af45ca844fb4dcfbd9f84586a1f55c1352d25242 by gardener
Register a -test-spirv-roundtrip hook to mlir-translate
This CL registers a new mlir-translate hook, -test-spirv-roundtrip, for
testing SPIR-V serialization and deserialization round-trip.
This CL also moves the existing -serialize-spirv and
-deserialize-spirv hooks to one source file.
PiperOrigin-RevId: 269659528
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/entry.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/extension.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/access_chain.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/variables_init.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/glslops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/capability.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/bin_ops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/variable_reference.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/load_store.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/entry_interface.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/function_call.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/select.mlir
The file was removedmlir/lib/Dialect/SPIRV/Serialization/ConvertFromBinary.cpp
The file was removedmlir/lib/Dialect/SPIRV/Serialization/ConvertToBinary.cpp
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/struct.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/spec_constant.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/execution_mode.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/constant.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/variables.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/terminator.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/minimal-module.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/array_stride.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/loop.mlir
The file was addedmlir/lib/Dialect/SPIRV/Serialization/TranslateRegistration.cpp
Commit 9330c1b9a1d70711294be25db98289929385f6fe by gardener
Add (de)serialization support for OpRuntimeArray.
Update the SPIR-V (de)serialization to handle RuntimeArrayType.
PiperOrigin-RevId: 269667196
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was addedmlir/test/Dialect/SPIRV/Serialization/rtarray.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
Commit b58d9aee11000c2ccfd4905750b15fa7e2681323 by gardener
Add support to OpAsmParser for parsing unknown keywords.
This is useful in several cases, for example a user may want to sugar
the syntax of a string(as we do with custom operation syntax), or avoid
many nested ifs for  parsing a set of known keywords.
PiperOrigin-RevId: 269695451
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/include/mlir/IR/OpImplementation.h
The file was modifiedmlir/test/IR/parser.mlir
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
Commit a15e0ce1ba5fa049052b92583abb196f49f1e70c by gardener
Simplify SDBM expressions more aggressively in operators and conversions
Extend SDBM simplification patterns to support more cases where the
addition of two expressions each involving one or two variables would
result in a sum expression that only contains one variable and thus
remains in the SDBM domain. This is made possible by the new canonical
structure of SDBM where the constant term appears once.  This
simplification will be necessary to support round-tripping of stripe
expressions containing constant terms on the LHS through affine
expressions.
PiperOrigin-RevId: 269757732
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/include/mlir/Dialect/SDBM/SDBMExpr.h
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExpr.cpp
Commit 5709aeb9930776bfaee81bb51d9b2c0b0142c395 by gardener
SDBM: support sum expressions on the LHS of stripe expressions
Introduce support for applying the stripe operator to sum expressions,
as in
(x + A) # B = x + A - (x + A) mod B. This is required to represent a
combination of tiling and padding in the SDBM framework, and is a valid
SDBM construct that was not originally supported.
PiperOrigin-RevId: 269758807
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExpr.cpp
The file was modifiedmlir/include/mlir/Dialect/SDBM/SDBMExpr.h
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/lib/Dialect/SDBM/SDBM.cpp
Commit 1c73be76d84a04499b7e9ac5dfe129c204880dd8 by gardener
Unify error messages to start with lower-case.
PiperOrigin-RevId: 269803466
The file was modifiedmlir/lib/Analysis/SliceAnalysis.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/ToyDialect.cpp
The file was modifiedmlir/examples/toy/Ch2/mlir/MLIRGen.cpp
The file was modifiedmlir/lib/Analysis/Utils.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/LateLowering.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/ToyDialect.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/ToyDialect.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/MLIRGen.cpp
The file was modifiedmlir/lib/Transforms/MaterializeVectors.cpp
Commit 727a50ae2db4492a8c3168647996abacd75d0622 by gardener
Support symbolic operands for memref replacement; fix memrefNormalize
- allow symbols in index remapping provided for memref replacement
- fix memref normalize crash on cases with layout maps with symbols
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com> Reported by: Alex
Zinenko
Closes tensorflow/mlir#139
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/139
from bondhugula:memref-rep-symbols
2f48c1fdb5d4c58915bbddbd9f07b18541819233 PiperOrigin-RevId: 269851182
The file was modifiedmlir/lib/Transforms/LoopFusion.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/include/mlir/Transforms/Utils.h
The file was modifiedmlir/test/Transforms/memref-normalize.mlir
The file was modifiedmlir/lib/Transforms/Utils/Utils.cpp
The file was modifiedmlir/lib/Transforms/PipelineDataTransfer.cpp
Commit 35df51086aefa1420784a096fd406febadae315a by gardener
Fix nested dominance relationship between parent results and child
operations.
This modifies DominanceInfo::properlyDominates(Value *value, Operation
*op) to return false if the value is defined by a parent operation of
'op'. This prevents using values defined by the parent operation from
within any child regions.
PiperOrigin-RevId: 269934920
The file was modifiedmlir/include/mlir/IR/Operation.h
The file was modifiedmlir/lib/Analysis/Dominance.cpp
The file was modifiedmlir/test/IR/invalid.mlir
The file was modifiedmlir/lib/IR/Operation.cpp
Commit 25f0f769aa7de1338158becbe614856802d43e1a by gardener
NFC: Remove stray logging from ~Block(). PiperOrigin-RevId: 269941815
The file was modifiedmlir/lib/IR/Block.cpp
Commit 5684a12434f923d03b6870f2aa16226bfb0b38b6 by gardener
Outline GPU kernel function into a nested module.
When outlining GPU kernels, put the kernel function inside a nested
module. Then use a nested pipeline to generate the cubins, independently
per kernel. In a final pass, move the cubins back to the parent module.
PiperOrigin-RevId: 269987720
The file was modifiedmlir/test/Dialect/GPU/outlining.mlir
The file was modifiedmlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
The file was modifiedmlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
The file was modifiedmlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
The file was modifiedmlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
Commit e79bfefb89201de52b9c8d609b67b416d3982977 by gardener
Add address space attribute to LLVMIR's GlobalOp.
PiperOrigin-RevId: 270012505
The file was modifiedmlir/test/Target/llvmir.mlir
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was modifiedmlir/test/Dialect/LLVMIR/global.mlir
Commit 5f86dc5fc9fe909dbcc03043fc5f960be00e1024 by gardener
NFC: Fix return indentation in generated op definitions.
PiperOrigin-RevId: 270070670
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Commit c8961d408ee0f48e3156e3c4248bba9a43579f1f by gardener
Quantize attribute values by per axis quantization parameters
A new converter with per axis quantization parameters is added to
quantize a dense elements attribute. For each slice along the
quantization axis, it creates an uniform quantized value converter, with
different scale and zero point, and quantizes the values in the slice.
The current implementation doesn't handle sparse elements attributes.
PiperOrigin-RevId: 270121986
The file was modifiedmlir/lib/Dialect/QuantOps/Utils/QuantizeUtils.cpp
The file was modifiedmlir/test/Dialect/QuantOps/convert-const.mlir
The file was modifiedmlir/include/mlir/Dialect/QuantOps/UniformSupport.h
The file was modifiedmlir/lib/Dialect/QuantOps/Utils/UniformSupport.cpp
Commit 2df646bef6e7665fdb8523613d82e7d4a5013217 by gardener
Automated rollback of commit 5684a12434f923d03b6870f2aa16226bfb0b38b6
PiperOrigin-RevId: 270126672
The file was modifiedmlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
The file was modifiedmlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
The file was modifiedmlir/test/Dialect/GPU/outlining.mlir
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
The file was modifiedmlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
The file was modifiedmlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
Commit 9a4f5d2ee324f536cede769c10022d1ce7b875f1 by gardener
Allow specification of decorators on SPIR-V StructType members.
Allow specification of decorators on SPIR-V StructType members. If the
struct has layout information, these decorations are to be specified
after the offset specification of the member. These decorations are
emitted as OpMemberDecorate instructions on the struct <id>. Update
(de)serialization to handle these decorations.
PiperOrigin-RevId: 270130136
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
The file was modifiedmlir/test/Dialect/SPIRV/types.mlir
The file was modifiedmlir/g3doc/Dialects/SPIR-V.md
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/struct.mlir
Commit 5002e98b92bbf300b41b7a7af6492d7c1bd662f4 by gardener
Remove unused import and two import forms
argparse was imported with both 'import' and 'import from' and string
import was unused,
PiperOrigin-RevId: 270164488
The file was modifiedmlir/utils/generate-test-checks.py
Commit a00b5682776555ed378d67ae2569d12c4e9b112d by gardener
Add utility to extract strides from layout map in MemRefType.
The RFC for unifying Linalg and Affine compilation passes into an
end-to-end flow discusses the notion of a strided MemRef
(https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).
This CL adds helper functions to extract strides from the layout map
which in turn will allow converting between a strided form of the type
and a layout map.
For now strides are only computed on a single affine map with a single
result (i.e. the closed subset of linearization maps that are compatible
with striding semantics). This restriction will be reevaluated / lifted
in the future based on concrete use cases.
PiperOrigin-RevId: 270284686
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was addedmlir/test/AffineOps/memref-stride-calculation.mlir
The file was addedmlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
Commit daf3b855100c56552ed44f796e31184c274e33f8 by gardener
Fix public build
TestMemRefStrideCalculation.cpp was missing
PiperOrigin-RevId: 270304543
The file was modifiedmlir/test/lib/Transforms/CMakeLists.txt
Commit d8fda38ceac490ef47a4b8bf1a692030dd2d92e8 by gardener
Use SmallVectorImpl in getStrides
No need to force a particular size on the user of the API.
PiperOrigin-RevId: 270310570
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/lib/IR/StandardTypes.cpp
Commit 2797517ecf89df597a49d670b633cae3de6c4c5a by gardener
NFC: Pass OpAsmParser by reference instead of by pointer.
MLIR follows the LLVM style of pass-by-reference.
PiperOrigin-RevId: 270315612
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.td
The file was modifiedmlir/examples/Linalg/Linalg1/lib/RangeOp.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/lib/ViewOp.cpp
The file was modifiedmlir/examples/Linalg/Linalg2/include/linalg2/TensorOps.h
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
The file was modifiedmlir/examples/Linalg/Linalg2/include/linalg2/TensorOps-inl.h
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/RangeOp.h
The file was modifiedmlir/lib/IR/Function.cpp
The file was modifiedmlir/test/mlir-tblgen/op-decl.td
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.h
The file was modifiedmlir/include/mlir/Dialect/VectorOps/VectorOps.td
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/lib/IR/Module.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
The file was modifiedmlir/lib/IR/FunctionSupport.cpp
The file was modifiedmlir/examples/Linalg/Linalg3/lib/LoadStoreOps.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/SliceOp.h
The file was modifiedmlir/examples/Linalg/Linalg2/lib/TensorOps.cpp
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.h
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/include/mlir/IR/Function.h
The file was modifiedmlir/examples/Linalg/Linalg1/lib/SliceOp.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/examples/Linalg/Linalg3/include/linalg3/LoadStoreOps.h
The file was modifiedmlir/include/mlir/Dialect/VectorOps/VectorOps.h
The file was modifiedmlir/include/mlir/Dialect/LoopOps/LoopOps.td
The file was modifiedmlir/lib/Dialect/VectorOps/VectorOps.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/ViewOp.h
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/include/mlir/IR/Module.h
The file was modifiedmlir/lib/Dialect/LoopOps/LoopOps.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
Commit 91125d33ed9a46495a50338ce206ddf5c461a763 by gardener
Avoid iterator invalidation when recursively computing pattern depth.
computeDepth calls itself recursively, which may insert into
minPatternDepth. minPatternDepth is a DenseMap, which invalidates
iterators on insertion, so this may lead to asan failures.
PiperOrigin-RevId: 270374203
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
Commit 729727ebc7e9e5b27e73b1ae0fdaa4bb7c312098 by gardener
NFC: Pass OperationState by reference instead of by pointer.
MLIR follows the LLVM convention of passing by reference instead of by
pointer.
PiperOrigin-RevId: 270396945
The file was modifiedmlir/examples/Linalg/Linalg1/lib/SliceOp.cpp
The file was modifiedmlir/examples/Linalg/Linalg3/include/linalg3/LoadStoreOps.h
The file was modifiedmlir/examples/Linalg/Linalg2/lib/TensorOps.cpp
The file was modifiedmlir/lib/Dialect/LoopOps/LoopOps.cpp
The file was modifiedmlir/examples/Linalg/Linalg2/include/linalg2/TensorOps.h
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/include/mlir/Dialect/LoopOps/LoopOps.td
The file was modifiedmlir/include/mlir/IR/PatternMatch.h
The file was modifiedmlir/examples/Linalg/Linalg2/include/linalg2/TensorOps-inl.h
The file was modifiedmlir/include/mlir/IR/Builders.h
The file was modifiedmlir/lib/Dialect/VectorOps/VectorOps.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/ToyDialect.cpp
The file was modifiedmlir/examples/toy/Ch5/include/toy/Dialect.h
The file was modifiedmlir/lib/IR/Function.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/lib/ViewOp.cpp
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/SerializationTest.cpp
The file was modifiedmlir/include/mlir/IR/Module.h
The file was modifiedmlir/test/mlir-tblgen/op-operand.td
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/examples/toy/Ch3/include/toy/Dialect.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/include/mlir/Dialect/VectorOps/VectorOps.h
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
The file was modifiedmlir/test/mlir-tblgen/op-attribute.td
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/include/mlir/IR/Function.h
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/RangeOp.h
The file was modifiedmlir/examples/Linalg/Linalg3/lib/LoadStoreOps.cpp
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/g3doc/Tutorials/Linalg/Ch-1.md
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-3.md
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/ToyDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.h
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.h
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/SliceOp.h
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
The file was modifiedmlir/test/mlir-tblgen/op-result.td
The file was modifiedmlir/lib/IR/Module.cpp
The file was modifiedmlir/include/mlir/Dialect/VectorOps/VectorOps.td
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/examples/toy/Ch4/include/toy/Dialect.h
The file was modifiedmlir/g3doc/OpDefinitions.md
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/lib/IR/FunctionSupport.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/ViewOp.h
The file was modifiedmlir/examples/Linalg/Linalg1/lib/RangeOp.cpp
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/test/mlir-tblgen/op-decl.td
The file was modifiedmlir/examples/toy/Ch4/mlir/ToyDialect.cpp
Commit 3a643de92b4c1a93b0725f171f4384c8dd941dd5 by gardener
NFC: Pass OpAsmPrinter by reference instead of by pointer.
MLIR follows the LLVM style of pass-by-reference.
PiperOrigin-RevId: 270401378
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/lib/ViewOp.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/lib/Dialect/VectorOps/VectorOps.cpp
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/test/mlir-tblgen/op-decl.td
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/SliceOp.h
The file was modifiedmlir/examples/Linalg/Linalg3/lib/LoadStoreOps.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/lib/RangeOp.cpp
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
The file was modifiedmlir/lib/IR/Module.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/include/mlir/IR/Module.h
The file was modifiedmlir/include/mlir/Dialect/LoopOps/LoopOps.td
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/examples/Linalg/Linalg2/include/linalg2/TensorOps.h
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/ViewOp.h
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/lib/IR/FunctionSupport.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/lib/SliceOp.cpp
The file was modifiedmlir/include/mlir/Dialect/VectorOps/VectorOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.h
The file was modifiedmlir/include/mlir/IR/Function.h
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.td
The file was modifiedmlir/examples/Linalg/Linalg2/lib/TensorOps.cpp
The file was modifiedmlir/lib/Dialect/LoopOps/LoopOps.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.h
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/examples/Linalg/Linalg2/include/linalg2/TensorOps-inl.h
The file was modifiedmlir/examples/Linalg/Linalg3/include/linalg3/LoadStoreOps.h
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/lib/IR/Function.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/include/linalg1/RangeOp.h
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/include/mlir/Dialect/VectorOps/VectorOps.h
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
Commit 33a3a91ba2decbf5187228e0fdd528c05b6b963c by gardener
Make GlobalOp's value attribute optional.
Make GlobalOp's value attribute an OptionalAttr. Change code that uses
the value to handle 'nullopt'. Translate an unitialized value attribute
to llvm::UndefValue.
PiperOrigin-RevId: 270423646
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was modifiedmlir/test/Dialect/LLVMIR/global.mlir
The file was modifiedmlir/test/Target/llvmir.mlir
Commit 8e4906362edba6ea763497c8a050a66291c3b087 by gardener
[ODS] Add support for FloatElementsAttr
This CL adds a new FloatElementsAttr definition to ODS for float
elements attributes of a certain type.
Tests are added to show both verification and how to use it in patterns.
PiperOrigin-RevId: 270455487
The file was modifiedmlir/test/IR/attribute.mlir
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/test/mlir-tblgen/pattern.mlir
Commit 4d880d09e0ce2d026ff1313b596151102420ad2b by gardener
Add a note about the use of recursion in the developer guide
PiperOrigin-RevId: 270455509
The file was modifiedmlir/g3doc/DeveloperGuide.md
Commit f559c38c28caf67576d23a8f9e3f02c88ecc13e4 by gardener
Upgrade/fix/simplify store to load forwarding
- fix store to load forwarding for a certain set of cases (where
forwarding shouldn't have happened); use AffineValueMap difference
based MemRefAccess equality checking; utility logic is also greatly
simplified
- add missing equality/inequality operators for AffineExpr ==/!= ints
- add == != operators on MemRefAccess
Closes tensorflow/mlir#136
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/136
from bondhugula:store-load-forwarding
d79fd1add8bcfbd9fa71d841a6a9905340dcd792 PiperOrigin-RevId: 270457011
The file was modifiedmlir/include/mlir/Analysis/AffineAnalysis.h
The file was modifiedmlir/lib/Analysis/Utils.cpp
The file was modifiedmlir/include/mlir/IR/AffineExpr.h
The file was modifiedmlir/lib/IR/AffineExpr.cpp
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/lib/Transforms/MemRefDataFlowOpt.cpp
The file was modifiedmlir/test/Transforms/memref-dataflow-opt.mlir
Commit 2ec8e2be1f01aaec0a9543ed90dd8f472c037a45 by gardener
[spirv] Add OpControlBarrier and OpMemoryBarrier.
Add OpControlBarrier and OpMemoryBarrier (de)serialization.
Closes tensorflow/mlir#130
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/130
from denis0x0D:sandbox/memory_barrier
2e3fff16bca44904dc1039592cb9a65d526faea8 PiperOrigin-RevId: 270457478
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was addedmlir/test/Dialect/SPIRV/Serialization/barrier.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
Commit a26bb0346e88a09a28ba8f2eb5e74136084c161e by gardener
minor spelling tweaks
Closes tensorflow/mlir#143
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/143
from brettkoonce:minor_sp_demo 76bdf7c121a824417969627fc15e50259356a2fa
PiperOrigin-RevId: 270462293
The file was modifiedmlir/g3doc/OpDefinitions.md
The file was modifiedmlir/g3doc/TestingGuide.md
Commit 2c11997d4857ceacebf4124aa73725e2b584c6dd by gardener
Add integer sign- and zero-extension and truncation to standard.
This adds sign- and zero-extension and truncation of integer types to
the standard dialects. This allows to perform integer type conversions
without having to go to the LLVM dialect and introduce custom type casts
(between standard and LLVM integer types).
Closes tensorflow/mlir#134
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/134
from ombre5733:sext-zext-trunc-in-std
c7657bc84c0ca66b304e53ec03797e09152e4d31 PiperOrigin-RevId: 270479722
The file was modifiedmlir/test/IR/core-ops.mlir
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/Target/llvmir.mlir
Commit 6414c0855605e2cf96b9f4f918b4e06a69fe0abe by gardener
Fix undefined reference to mlir::getElementTypeOrSelf(mlir::Type)
Fix undefined reference: mlir/lib/Dialect/StandardOps/Ops.cpp:2029:
undefined reference to `mlir::getElementTypeOrSelf(mlir::Type)'
Closes tensorflow/mlir#144
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/144
from denis0x0D:sandbox/fix_undef
494d4f7fa2e98ba21954d2b2f7ec1776b9397e08 PiperOrigin-RevId: 270545190
The file was modifiedmlir/lib/Dialect/StandardOps/CMakeLists.txt
Commit 08ae1bb83014e84dfe5e335a3d7e835321542f9d by gardener
update layout map examples in doc, drop stale ones
- add more examples for affine layout maps showing various use
cases
- affine map range sizes were removed from code, but examples in
LangRef weren't updated
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#142
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/142
from bondhugula:doc 3291a8784bc69883f7a7cead21445fc8118aaad2
PiperOrigin-RevId: 270548991
The file was modifiedmlir/g3doc/LangRef.md
Commit 541f1945d105b0b2c076da27abb7e58d34ca3d90 by gardener
Update TruncateIOp builder to pass OperationState by reference.
PiperOrigin-RevId: 270560295
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
Commit 54f4522a5c9c321648fbc52e787fef811205f3c6 by gardener
Specalize f32->i8/u8 Quanitization with C++ native arithmetic to
optimize performance.
The CL adds a rounding mode flag to the class and changes the default to
rmNearestTiesToAway from rmNearestTiesToEven because 1) Tensorflow
QuantizeV2 ops uses rmNearestTiesToAway; 2) the specialization only
implements rmNearestTiesToAway.
PiperOrigin-RevId: 270600739
The file was modifiedmlir/include/mlir/Dialect/QuantOps/UniformSupport.h
The file was modifiedmlir/test/Dialect/QuantOps/convert-const.mlir
Commit f1442f1eff482ff1d331e0f9871590063e7546bd by gardener
[NFC] Replace std::clamp with inline implementation.
std::clamp is not in C++14, thus replace it with std::min and std::max.
PiperOrigin-RevId: 270604708
The file was modifiedmlir/include/mlir/Dialect/QuantOps/UniformSupport.h
Commit c900d4994e609ac0f4730d0cdd918eae958e9d28 by gardener
Fix a number of Clang-Tidy warnings.
PiperOrigin-RevId: 270632324
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/lib/Transforms/LowerAffine.cpp
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/lib/Analysis.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
The file was modifiedmlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
The file was modifiedmlir/lib/Transforms/LowerVectorTransfers.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/lib/Pass/PassTiming.cpp
The file was modifiedmlir/lib/Transforms/ViewRegionGraph.cpp
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/lib/IR/Diagnostics.cpp
The file was modifiedmlir/lib/Transforms/AffineDataCopyGeneration.cpp
The file was modifiedmlir/lib/Parser/Lexer.cpp
The file was modifiedmlir/examples/Linalg/Linalg3/lib/Transforms.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/lib/Pass/Pass.cpp
Commit b8676da1fc5e7d371a76defbd1b4a93a41fe2e33 by gardener
Outline GPU kernel function into a nested module.
Roll forward of commit 5684a12.
When outlining GPU kernels, put the kernel function inside a nested
module. Then use a nested pipeline to generate the cubins, independently
per kernel. In a final pass, move the cubins back to the parent module.
PiperOrigin-RevId: 270639748
The file was modifiedmlir/test/Dialect/GPU/outlining.mlir
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
The file was modifiedmlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
The file was modifiedmlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
The file was modifiedmlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
Commit 59e3b30af05357adc41344a4451b2e7629baf64e by gardener
Add variants of interleave that take separator
Make the common case of string separator easier to specify.
PiperOrigin-RevId: 270697581
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
The file was modifiedmlir/include/mlir/Support/STLExtras.h
Commit 4b6b58ec0f391b09acbb65c4bc8cf97f9eec685b by gardener
NFC: Fix warning for uninitialized field. PiperOrigin-RevId: 270704572
The file was modifiedmlir/lib/Pass/PassRegistry.cpp
Commit 3eade4304656fd20773a24b7e0c3b183b3e7b426 by gardener
Update the Pass, Analysis, and PassManager sections of WritingAPass.md.
These have become out-of-date with the pass manager generalization.
PiperOrigin-RevId: 270719105
The file was modifiedmlir/g3doc/WritingAPass.md
Commit c61991ef01c34aa2d09fe6d16aead943b7fba2fa by gardener
Refactor DiagnosticEngine to support multiple registered diagnostic
handlers.
This fixes a problem with current save-restore pattern of diagnostics
handlers, as there may be a thread race between when the previous
handler is destroyed. For example, this occurs when using multiple
ParallelDiagnosticHandlers asynchronously:
Handler A Handler B | - LifeTime - |    Restore A here. Handler C | ---
LifeTime ---| Restore B after it has been destroyed.
The new design allows for multiple handlers to be registered in a stack
like fashion. Handlers can return success() to signal that they have
fully processed a diagnostic, or failure to propagate otherwise.
PiperOrigin-RevId: 270720625
The file was modifiedmlir/g3doc/Diagnostics.md
The file was modifiedmlir/lib/IR/Diagnostics.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
The file was modifiedmlir/include/mlir/IR/Diagnostics.h
Commit 8965011fadf24f4986b0d9c00fc6af0f2b13ee28 by gardener
Add interfaces for call-like/callable operations.
These two operation interfaces will be used in a followup to support
building a callgraph:
* CallOpInterface
- Operations providing this interface are call-like, and have a "call"
target. A call target may be a symbol reference, via SymbolRefAttr, or a
SSA value.
* CallableOpInterface
- Operations providing this interfaces define destinations to call-like
operations, e.g. FuncOp. These operations may define any number of
callable regions.
PiperOrigin-RevId: 270723300
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.h
The file was modifiedmlir/lib/Support/CMakeLists.txt
The file was modifiedmlir/include/mlir/IR/Attributes.h
The file was modifiedmlir/lib/IR/CMakeLists.txt
The file was modifiedmlir/test/lib/TestDialect/TestDialect.h
The file was addedmlir/include/mlir/Analysis/CallInterfaces.td
The file was modifiedmlir/lib/Dialect/StandardOps/CMakeLists.txt
The file was addedmlir/include/mlir/Analysis/CallInterfaces.h
The file was addedmlir/lib/Analysis/CallGraph.cpp
The file was addedmlir/include/mlir/Analysis/CMakeLists.txt
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/include/mlir/CMakeLists.txt
The file was modifiedmlir/lib/Analysis/CMakeLists.txt
The file was modifiedmlir/include/mlir/IR/Function.h
Commit 8cb405a8bed4a6a3782591c5eb447a83857f94c8 by gardener
Add initial callgraph support.
Using the two call interfaces, CallOpInterface and CallableOpInterface,
this change adds support for an initial multi-level CallGraph. This call
graph builds a set of nodes for each callable region, and connects them
via edges. An edge may be any of the following types:
* Abstract
- An edge not produced by a call operation, used for connecting to
internal nodes from external nodes.
* Call
- A call edge is an edge defined via a call-like operation.
* Child
- This is an artificial edge connecting nested callgraph nodes.
This callgraph will be used, and improved upon, to begin supporting more
interesting interprocedural analyses and transformation. In a followup,
this callgraph will be used to support more complex inlining support.
PiperOrigin-RevId: 270724968
The file was modifiedmlir/lib/Analysis/CallGraph.cpp
The file was modifiedmlir/lib/IR/SymbolTable.cpp
The file was addedmlir/include/mlir/Analysis/CallGraph.h
The file was modifiedmlir/test/lib/Transforms/CMakeLists.txt
The file was modifiedmlir/include/mlir/IR/SymbolTable.h
The file was addedmlir/test/Analysis/test-callgraph.mlir
The file was addedmlir/test/lib/Transforms/TestCallGraph.cpp
Commit 5583252173682098a4dfa0fff0fc225b7e2f1034 by gardener
Add convenience methods to set an OpBuilder insertion point after an
Operation (NFC)
PiperOrigin-RevId: 270727180
The file was modifiedmlir/lib/Transforms/PipelineDataTransfer.cpp
The file was modifiedmlir/include/mlir/IR/Builders.h
The file was modifiedmlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
Commit 98d1d3fc437f5d2b9b3dc99ab79ee734c8127072 by gardener
Simplify the way spirv::StructTypes are parsed.
The existing logic to parse spirv::StructTypes is very brittle. This
change simplifies the parsing logic a lot. The simplification also
allows for memberdecorations to be separated by commas instead of spaces
(which was an artifact of the existing parsing logic). The change also
needs a modification to mlir::parseType to return the number of chars
parsed. Adding a new parseType method to do so.
Also allow specification of spirv::StructType with no members.
PiperOrigin-RevId: 270739672
The file was modifiedmlir/include/mlir/Parser.h
The file was modifiedmlir/test/Dialect/SPIRV/types.mlir
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/struct.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
The file was modifiedmlir/test/IR/invalid.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
Commit 4a862fbd6337bb926e7a88ed4749b726e1a09ed9 by gardener
Use constant's location for reporting errors in parsing of hex constant
Before this the line following the error would be reported in some
cases.
PiperOrigin-RevId: 270778722
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/test/IR/invalid.mlir
Commit 75906bd565a199edb6b9b8088236376d6234a9a6 by gardener
Handle OpMemberName instruction in SPIR-V deserializer.
Sdd support in deserializer for OpMemberName instruction. For now the
name is just processed and not associated with the spirv::StructType
being built. That needs an enhancement to spirv::StructTypes itself. Add
tests to check for errors reported during deserialization with some
refactoring to common out some utility functions. PiperOrigin-RevId:
270794524
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/SPIRVBinaryUtils.cpp
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBinaryUtils.h
Commit 0e7edcfe7e434221c46fac2a4166c672cbb35de5 by gardener
Let mlir-translate support -split-input-file
Similar to mlir-opt, having a -split-input-file mode is quite useful in
mlir-translate. It allows to put logically related tests in the same
test file for better organization.
PiperOrigin-RevId: 270805467
The file was addedmlir/include/mlir/Support/ToolUtilities.h
The file was modifiedmlir/lib/Support/CMakeLists.txt
The file was addedmlir/lib/Support/ToolUtilities.cpp
The file was modifiedmlir/tools/mlir-translate/mlir-translate.cpp
The file was modifiedmlir/lib/Support/MlirOptMain.cpp
Commit 69af46875479c33cf40fdad96f1517260f9f33fb by gardener
Make spirv::RuntimeArrayType part of spirv::CompositeType.
According to SPIR-V spec, spirv::CompositeType includes
spirv::RuntimeArrayType. This allows using objects of
spirv::RuntimeArrayType with spirv::AccessChainOp. PiperOrigin-RevId:
270809492
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
Commit 6caa4f500b149fd74086e60ff5dbcd33a826c30e by gardener
[spirv] NFC: clean up (de)serialization tests
This CL uses the newly added -split-input-file CLI option to
mlir-translate to combine certain (de)serialization tests. It also
renames certain test filenames.
PiperOrigin-RevId: 270816324
The file was addedmlir/test/Dialect/SPIRV/Serialization/array.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/variable_reference.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/global-variable.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/glslops.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/entry_interface.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/access_chain.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/bin_ops.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/select.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/extension.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/spec-constant.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/arithmetic-ops.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/module.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/logical-ops.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/function_call.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/load_store.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/array_stride.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/capability.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/entry-point.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/glsl-ops.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/execution_mode.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/execution-mode.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/spec_constant.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/variables_init.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/minimal-module.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/function-call.mlir
The file was addedmlir/test/Dialect/SPIRV/Serialization/memory-ops.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/entry.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/variables.mlir
The file was removedmlir/test/Dialect/SPIRV/Serialization/rtarray.mlir
Commit eba6014cdc1cc1a9d9732a2e9010afde2d9d898e by gardener
Allow null Attribute for value when building GlobalOp.
PiperOrigin-RevId: 270853596
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
Commit 74cdbf5909e57b42b6ed5b3b6eea4f76448a7d48 by gardener
Clone called functions into nested GPU module.
PiperOrigin-RevId: 270891190
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/test/Dialect/GPU/outlining.mlir
Commit 42d8fa667bcdb81ad305e64a4d6fb0ff1cc4cc3d by gardener
Normalize lowering of MemRef types
The RFC for unifying Linalg and Affine compilation passes into an
end-to-end flow with a predictable ABI and linkage to external function
calls raised the question of why we have variable sized descriptors for
memrefs depending on whether they have static or dynamic dimensions
(https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).
This CL standardizes the ABI on the rank of the memrefs. The LLVM struct
for a memref becomes equivalent to:
``` template <typename Elem, size_t Rank> struct {
Elem *ptr;
int64_t sizes[Rank];
};
```
PiperOrigin-RevId: 270947276
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
The file was modifiedmlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/g3doc/ConversionToLLVMDialect.md
The file was modifiedmlir/examples/toy/Ch5/mlir/LateLowering.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
The file was modifiedmlir/test/Examples/Linalg/Linalg1.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
Commit 458ede8775d0180434692cada24c12eb25839efc by gardener
Introduce splat op + provide its LLVM lowering
- introduce splat op in standard dialect (currently for int/float/index
input
type, output type can be vector or statically shaped tensor)
- implement LLVM lowering (when result type is 1-d vector)
- add constant folding hook for it
- while on Ops.cpp, fix some stale names
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#141
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/141
from bondhugula:splat 48976a6aa0a75be6d91187db6418de989e03eb51
PiperOrigin-RevId: 270965304
The file was modifiedmlir/utils/vim/syntax/mlir.vim
The file was modifiedmlir/g3doc/Dialects/Standard.md
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/test/IR/core-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
The file was modifiedmlir/test/Transforms/constant-fold.mlir
The file was modifiedmlir/g3doc/LangRef.md
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
Commit 635544fc120cc3956f909af08d861dca9b709fef by gardener
Allow attaching descriptions to OpInterfaces and InterfaceMethods.
This change adds support for documenting interfaces and their methods. A
tablegen generator for the interface documentation is also
added(gen-op-interface-doc).
Documentation is added to an OpInterface via the `description` field:
def MyOpInterface : OpInterface<"MyOpInterface"> {
let description = [{
   My interface is very interesting.
}];
}
Documentation is added to an InterfaceMethod via a new `description`
field that comes right before the optional body:
InterfaceMethod<"void", "foo", (ins), [{
This is the foo method.
}]>,
PiperOrigin-RevId: 270965485
The file was modifiedmlir/tools/mlir-tblgen/OpInterfacesGen.cpp
The file was addedmlir/tools/mlir-tblgen/DocGenUtilities.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
The file was modifiedmlir/include/mlir/Analysis/CallInterfaces.td
The file was modifiedmlir/tools/mlir-tblgen/OpDocGen.cpp
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/g3doc/OpDefinitions.md
Commit f7ad5b411c7b051565d9a3c372882f44f1719e0b by gardener
NFC: Add a description to the ODS interface example. PiperOrigin-RevId:
270978748
The file was modifiedmlir/g3doc/Interfaces.md
Commit cf00feed037bdd9d2d53d3ff34fc90378247038a by gardener
[spirv] Replace bitwiseCast with llvm::bit_cast
PiperOrigin-RevId: 271035618
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
Commit c5284fe85ed547a25007f67ce5449a34f0d1f3a1 by gardener
Add support for GLSL Binary ops, and use it to implement GLSL FMax.
A base class is added to implement all GLSL Binary operations and is
used to implement the FMax operation. The existing framework already
generates all the necessary (de)serialization code.
PiperOrigin-RevId: 271037166
The file was modifiedmlir/test/Dialect/SPIRV/glslops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/glsl-ops.mlir
Commit 03db4223598a6757f3ac7dc5f65135fe5e508e17 by gardener
NFC: Add 'const' dereference method to OperandTypeIterator.
The deference provided by mapped_iterator is non-const.
PiperOrigin-RevId: 271051375
The file was modifiedmlir/include/mlir/IR/Operation.h
Commit 3a4bee0fe1883dfad62233675513c61fdaa060f5 by gardener
Miscellaneous fixes to SPIR-V Deserializer (details below).
1) Process and ignore the following debug instructions: OpSource,
OpSourceContinued, OpSourceExtension, OpString, OpModuleProcessed. 2)
While processing OpTypeInt instruction, ignore the signedness
specification. Currently MLIR doesnt make a distinction between signed
and unsigned integer types. 3) Process and ignore BufferBlock decoration
(similar to Buffer decoration). StructType needs to be enhanced to track
this attribute since its needed for proper validation checks. 4) Report
better error for unhandled instruction during deserialization.
PiperOrigin-RevId: 271057060
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
Commit 4e32dc9b8ae3735a49f8e4ce23a620044f51c55f by gardener
Forward declare LogicalResult as a struct to be consistent
This addresses a MSVC linker error saying splitAndProcessBuffer was
unresolved.
PiperOrigin-RevId: 271126570
The file was modifiedmlir/include/mlir/Support/ToolUtilities.h
Commit b76c4f878025f112af28f38e4a88ce97e2c249cd by gardener
Fix memref-stride-calculation on Windows
Call llvm::outs().flush() to make sure we don't mix streams. Remove
CHECK-LABEL to avoid assuming the relative order between the additional
info and the output IR.
PiperOrigin-RevId: 271131100
The file was modifiedmlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
The file was modifiedmlir/test/AffineOps/memref-stride-calculation.mlir
Commit 9b7435fb50230621b5660a8d3dad51c40c6c348d by gardener
Add tablegen verification traits for comparing different properties
This allows things like comparing the rank of one operand to the size of
another that specifies indices into it.
PiperOrigin-RevId: 271150439
The file was modifiedmlir/test/mlir-tblgen/types.mlir
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit 3848baec69e3e5f67b5cefb59543a701553a1b09 by gardener
Emit function name being tested in TestMemRefStrideCalculation
Bring back CHECK-LABEL post
PiperOrigin-RevId: 271166428
The file was modifiedmlir/test/AffineOps/memref-stride-calculation.mlir
The file was modifiedmlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
Commit a2bce652af5ed78ff2463cfe927f880e8bb54b49 by gardener
Minor spelling tweaks
Closes tensorflow/mlir#145
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/145
from kiszk:spelling_tweaks_g3doc
ae9140aab5b797441e880d43e557903585815e40 PiperOrigin-RevId: 271173907
The file was modifiedmlir/g3doc/DefiningAttributesAndTypes.md
The file was modifiedmlir/g3doc/Canonicalization.md
The file was modifiedmlir/g3doc/QuickstartRewrites.md
The file was modifiedmlir/g3doc/Tutorials/Linalg/Ch-1.md
The file was modifiedmlir/g3doc/Quantization.md
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-1.md
The file was modifiedmlir/g3doc/DeclarativeRewrites.md
The file was modifiedmlir/g3doc/GenericDAGRewriter.md
The file was modifiedmlir/g3doc/Rationale.md
The file was modifiedmlir/g3doc/Dialects/SPIR-V.md
The file was modifiedmlir/g3doc/OpDefinitions.md
The file was modifiedmlir/g3doc/Dialects/LLVM.md
The file was modifiedmlir/g3doc/TestingGuide.md
The file was modifiedmlir/g3doc/Dialects/Vector.md
The file was modifiedmlir/g3doc/RationaleSimplifiedPolyhedralForm.md
The file was modifiedmlir/g3doc/Tutorials/Linalg/LLVMConversion.md
The file was modifiedmlir/g3doc/Dialects/Affine.md
The file was modifiedmlir/g3doc/LangRef.md
The file was modifiedmlir/g3doc/DeveloperGuide.md
The file was modifiedmlir/g3doc/MLIRForGraphAlgorithms.md
Commit ae13c28f3f69843fc1b98d63be42f3b00ce8d2a0 by gardener
[spirv] Add SPV_UnaryOp and spv.FNegate
This CL also moves common parsers and printers to the same section in
SPIRVOps.cpp.
PiperOrigin-RevId: 271233546
The file was modifiedmlir/utils/spirv/gen_spirv_dialect.py
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/arithmetic-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/test/Dialect/SPIRV/arithmetic-ops.mlir
Commit 47a7021cc3b0858e53c52a468b234a3f1a4c4abf by gardener
Change the return type of createPrintCFGGraphPass to match other passes.
PiperOrigin-RevId: 271252404
The file was modifiedmlir/lib/Transforms/ViewRegionGraph.cpp
The file was modifiedmlir/include/mlir/Transforms/ViewRegionGraph.h
Commit 6f0e65441c5cd018e8b0ad5c340435c0ee57eea1 by gardener
Add spv.Bitcast operation to SPIR-V dialect
Support the OpBitcast instruction of SPIR-V using the spv.Bitcast
operation. The semantics implemented in the dialect differ from the
SPIR-V spec in that the dialect does not allow conversion to/from
pointer types from/to non-pointer types.
PiperOrigin-RevId: 271255957
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was addedmlir/test/Dialect/SPIRV/Serialization/cast-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
Commit 94298cea933991b29dcb7f340725bc25e78cebcf by gardener
Remove unused variables and methods to address compiler warnings
PiperOrigin-RevId: 271256784
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
The file was modifiedmlir/lib/TableGen/Pattern.cpp
Commit 116dac00baa6870aec2a2b469b2d6f95c2fbb316 by gardener
Add AllReduceOp to GPU dialect with lowering to NVVM.
The reduction operation is currently fixed to "add", and the scope is
fixed to "workgroup".
The implementation is currently limited to sizes that are multiple 32
(warp size) and no larger than 1024.
PiperOrigin-RevId: 271290265
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
The file was modifiedmlir/test/Dialect/GPU/ops.mlir
The file was modifiedmlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
The file was addedmlir/test/mlir-cuda-runner/all-reduce.mlir
Commit 99be3351b874444498c03a87e2aeec6f2f8c208d by gardener
Drop support for memrefs from JitRunner
The support for functions taking and returning memrefs of floats was
introduced in the first version of the runner, created before MLIR had
reliable lowering of allocation/deallocation to library calls.  It
forcibly runs MLIR transformation convering affine, loop and standard
dialects into the LLVM dialect, unlike the other runner flows that
accept the LLVM dialect directly. Memref support leads to more complex
layering and is generally fragile.  Drop it in favor of functions
returning a scalar, or library-based function calls to print memrefs and
other data structures.
PiperOrigin-RevId: 271330839
The file was modifiedmlir/test/mlir-cpu-runner/simple.mlir
The file was modifiedmlir/lib/Support/JitRunner.cpp
The file was modifiedmlir/tools/mlir-cpu-runner/CMakeLists.txt
Commit 445232df0b43cd8a6fdf34392626c61f819c94f2 by gardener
Decouple tiling from fusion in Linalg.
This CL modifies the linalg-fusion pass such that it does not tile
anymore as part of the pass. Tiling is a separate concern that enables
linalg fusion but should happen before. This makes fusion more
composable with other decisions. In particular the fusion pass now
becomes greedy and only applies the transformation on a best-effort
basis.
This should also let fusion work in a multi-hop fashion with chains of
producer/consumers.
Since the fusion pass does not perform tiling anymore, tests are
rewritten to be in pretiled form and make the intent of the test clearer
(albeit more verbose).
PiperOrigin-RevId: 271357741
The file was modifiedmlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
The file was modifiedmlir/test/Dialect/Linalg/fusion.mlir
The file was modifiedmlir/lib/Dialect/Linalg/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
The file was modifiedmlir/test/Dialect/Linalg/fusion-2-level.mlir
Commit 19841775d4c18385379b7fcec52b05e58b82026b by gardener
Make result ops generated output deterministic
Sort the result ops reported in lexographical order.
PiperOrigin-RevId: 271426258
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
Commit 7385d8789560a392971c60426c7d17569551bd32 by gardener
Disable failing tests
PiperOrigin-RevId: 271460509
The file was modifiedmlir/test/mlir-cpu-runner/linalg_integration_test.mlir
The file was modifiedmlir/test/mlir-cpu-runner/simple.mlir
Commit fee40fef5c37fee2b398d4d6ec28958bf5c0c0f5 by gardener
[ROCm] Adding ROCDL Dialect.
This commit introduces the ROCDL Dialect (i.e. the ROCDL ops + the code
to lower those ROCDL ops to LLWM intrinsics/functions). Think of ROCDL
Dialect as analogous to the NVVM Dialect, but for AMD GPUs. This patch
contains just the essentials needed to get a simple example up and
running. We expect to make further additions to the ROCDL Dialect.
This is the first of 3 commits, the follow-up will be:
* add a pass that lowers GPU Dialect to ROCDL Dialect
* add a "mlir-rocm-runner" utility
Closes tensorflow/mlir#146
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/146
from deven-amd:deven-rocdl-dialect
e78e8005c75a78912631116c78dc844fcc4b0de9 PiperOrigin-RevId: 271511259
The file was modifiedmlir/tools/mlir-translate/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
The file was addedmlir/test/Dialect/LLVMIR/rocdl.mlir
The file was modifiedmlir/lib/Target/CMakeLists.txt
The file was addedmlir/include/mlir/Dialect/LLVMIR/ROCDLOps.td
The file was modifiedmlir/lib/Dialect/LLVMIR/CMakeLists.txt
The file was addedmlir/test/Target/rocdl.mlir
The file was addedmlir/include/mlir/Dialect/LLVMIR/ROCDLDialect.h
The file was addedmlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
The file was addedmlir/include/mlir/Target/ROCDLIR.h
The file was addedmlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
Commit 18f4a37836a2de53b043053239b825bb2a3282dd by gardener
Fix missing links in the documentation
Closes tensorflow/mlir#149
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/149
from kiszk:missing_links_g3doc 5f98bc279649d54ea3dcf9fe0e17be6ad6d6cb8f
PiperOrigin-RevId: 271568274
The file was modifiedmlir/g3doc/LangRef.md
The file was modifiedmlir/g3doc/Dialects/Affine.md
The file was modifiedmlir/g3doc/WritingAPass.md
The file was modifiedmlir/g3doc/Dialects/Vector.md
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-1.md
The file was modifiedmlir/g3doc/OpDefinitions.md
Commit e39b5a19ba2e5ed89975c1906ae2994b4d70cca8 by gardener
Fix Documentation OpDefinitions.md
Add missing semicolon for the builders example.
Closes tensorflow/mlir#150
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/150
from denis0x0D:sandbox/doc_fix 07e3680e678bf141a70af7747136e9fde7b4cc0a
PiperOrigin-RevId: 271568527
The file was modifiedmlir/g3doc/OpDefinitions.md
Commit 6543e99fe51b9077d8185ba9741770adc5f7cde5 by gardener
Fix JitRunner.cpp Error creation pattern and reactivate tests.
linalg_integration_test.mlir and simple.mlir were temporarily disabled
due to an OSS-only failure.
The issue is that, once created, an llvm::Error must be explicitly
checked before it can be discarded or overwritten.
This CL fixes the issue and reenable the test.
PiperOrigin-RevId: 271589651
The file was modifiedmlir/lib/Support/JitRunner.cpp
The file was modifiedmlir/test/mlir-cpu-runner/linalg_integration_test.mlir
The file was modifiedmlir/test/mlir-cpu-runner/simple.mlir
Commit ddf737c5da728f25c5e0413bc737d04b2d92df96 by gardener
Promote MemRefDescriptor to a pointer to struct when passing function
boundaries in LLVMLowering.
The strided MemRef RFC discusses a normalized descriptor and interaction
with library calls
(https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).
Lowering of nested LLVM structs as value types does not play nicely with
externally compiled C/C++ functions due to ABI issues. Solving the ABI
problem generally is a very complex problem and most likely involves
taking a dependence on clang that we do not want atm.
A simple workaround is to pass pointers to memref descriptors at
function boundaries, which this CL implement.
PiperOrigin-RevId: 271591708
The file was modifiedmlir/examples/Linalg/Linalg3/Execution.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
The file was modifiedmlir/test/Dialect/GPU/invalid.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-funcs.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h
The file was modifiedmlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
The file was modifiedmlir/test/Examples/Linalg/Linalg1.mlir
The file was modifiedmlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
Commit 74eabdd14eb3ed697d6dc4d72c3423ec81dd80f4 by gardener
NFC - clean up op accessor usage, std.load/store op verify, other stale
info
- also remove stale terminology/references in docs
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#148
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/148
from bondhugula:cleanup e846b641a3c2936e874138aff480a23cdbf66591
PiperOrigin-RevId: 271618279
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.h
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/lib/Transforms/LowerAffine.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/include/mlir/Analysis/NestedMatcher.h
The file was modifiedmlir/lib/Transforms/LoopTiling.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopFusionUtils.cpp
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/test/IR/core-ops.mlir
The file was modifiedmlir/lib/Transforms/MaterializeVectors.cpp
The file was modifiedmlir/g3doc/Rationale.md
Commit bc4984e4f7c40ae9a51c84bcd3c4bb4c876b0b13 by gardener
Add TODO to revisit coupling of CallOp to MemRefType lowering
PiperOrigin-RevId: 271619132
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
Commit b569c969f0e3aec63f13b97b99a05f70a17867ad by gardener
Remove spurious debug spew in tests
PiperOrigin-RevId: 271624731
The file was modifiedmlir/test/Examples/Linalg/Linalg1.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-funcs.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
Commit 5f8dff936b3015f161537a65b5e64a5f93cb2322 by gardener
Append a newline when dumping a Value.
This is more consistent with other dump methods. Otherwise successive
Value dumps are concatenated in same line, hurting readability.
PiperOrigin-RevId: 271669846
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit e7c3ca92f846fd757fd755b2fa0c908bb1775b1b by gardener
Tablegen helpers for accessing properties of shaped types
Tablegen's lack of functions continues to be annoying
PiperOrigin-RevId: 271680947
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit c57f202c8cbb14f3f8a403056c56011cd10f93c9 by gardener
Switch explicit create methods to match generated build's order
The generated build methods have result type before the arguments
(operands and attributes, which are also now adjacent in the explicit
create method). This also results in changing the create method's
ordering to match most build method's ordering.
PiperOrigin-RevId: 271755054
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/unittests/IR/OperationSupportTest.cpp
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/include/mlir/IR/Operation.h
Commit b6cec098f930932a557a3db6a8a9cab65e27e62a by gardener
Fix syntax of 'call' and 'splat' ops
- fix missing return value syntax on call / splat ops
- reflow cond_br / store op syntax
Closes tensorflow/mlir#161
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/161
from bondhugula:patch-1 2beb5bdcb387a5e7c52438985f79e2987d3b3ebe
PiperOrigin-RevId: 271876453
The file was modifiedmlir/g3doc/Dialects/Standard.md
Commit 0db0fe3c0396f1b43ea7fd7588d01a5d947350af by gardener
Fix a typo in Toy Chapter 2 tutorial documentation
Closes tensorflow/mlir#155
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/155
from Robertorosmaninho:patch-1 232ac4e1253948c7f3150515e93abe50fcec2f96
PiperOrigin-RevId: 271876515
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-2.md
Commit f45a39256603a2cb7f6818cc6a07d9029bf703d2 by gardener
update Rationale.md - remove outdated info
- removing outdated/confusing info
- the affine dialect is missing documentation on
affine.load/affine.store; the references herein have to be updated
once that's updated.
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#159
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/159
from bondhugula:doc 86dd794f2d0d7fd097dde5764c62eb406ed4f910
PiperOrigin-RevId: 271876525
The file was modifiedmlir/g3doc/Rationale.md
Commit e5a43186d38c239380c22c2629dff748677c4bd1 by gardener
Add InferTypeOpTrait & enable generating its member function definition
Use OpInterfaces to add an interface for ops defining a return type
function.
This change does not use this trait in any meaningful way, I'll use it
in a follow up to generalize and unify some of the op type
traits/constraints. Also, currently the infer type function can only be
manually specified in C++, that should rather be the fallback in future.
PiperOrigin-RevId: 271883746
The file was modifiedmlir/include/mlir/Analysis/CMakeLists.txt
The file was modifiedmlir/test/lib/TestDialect/TestPatterns.cpp
The file was addedmlir/include/mlir/Analysis/InferTypeOpInterface.h
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was addedmlir/include/mlir/Analysis/InferTypeOpInterface.td
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/lib/TestDialect/TestDialect.h
The file was addedmlir/test/mlir-tblgen/return-types.mlir
The file was modifiedmlir/lib/Analysis/CMakeLists.txt
The file was addedmlir/lib/Analysis/InferTypeOpInterface.cpp
Commit 3d9679bde4de0250207ee6282a5359df41e54e75 by gardener
Switch comments from GPU dialect terms to CUDA terms (NFC).
local workgroup -> block, subgroup -> warp, invocation -> thread.
PiperOrigin-RevId: 271946342
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
Commit 1ce524623cd6150e7938e42c9301720af198fde5 by gardener
Fix MemRefType::getStrides corner case
MemRefType::getStrides uses AffineExpr::walk which operates in
post-order from the leaves. In order to compute strides properly, it
needs to escape on terminal nodes and analyze binary ops only. This did
not work for AffineExpr that consist of a single term (i.e. without a
binary op).
This CL fixes the corner case and adds relevant tests.
PiperOrigin-RevId: 271975746
The file was modifiedmlir/test/AffineOps/memref-stride-calculation.mlir
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
Commit a932f0786c25db7607470925021758b40cbb9835 by gardener
Use MaybeAlign when setting alignment
PiperOrigin-RevId: 272000548
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
Commit 2f7bb1e25f1be3ee5c6dce72aa1eced4c823f123 by gardener
Add support for Logical Ops in SPIR-V dialect
Add operations corresponding to OpLogicalAnd, OpLogicalNot,
OpLogicalEqual, OpLogicalNotEqual and OpLogicalOr instructions in SPIR-V
dialect. This needs changes to class hierarchy in SPIR-V TableGen files
to split SPIRVLogicalOp into SPIRVLogicalUnaryOp and
SPIRVLogicalBinaryOp. All derived classes of SPIRVLogicalOp are updated
accordingly.
Update the spirv dialect generation script to 1) Allow specifying base
class to use for instruction spec generation and file name to generate
the specification in separately. 2) Use the existing descriptions for
operations. 3) Update define_inst.sh to also invoke define_opcode.sh to
also define the corresponding SPIR-V instruction opcode enum.
PiperOrigin-RevId: 272014876
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/utils/spirv/gen_spirv_dialect.py
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/utils/spirv/define_inst.sh
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
Commit 2713f3638e5905f5fb938a84fadd950040f4bbf9 by gardener
[DRR] Explain result type deduction in doc
PiperOrigin-RevId: 272031467
The file was modifiedmlir/g3doc/DeclarativeRewrites.md
Commit 923b33ea16ac8734bc7430ccb4cc4169d0bce785 by gardener
Normalize MemRefType lowering to LLVM as strided MemRef descriptor
This CL finishes the implementation of the lowering part of the [strided
memref
RFC](https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).
Strided memrefs correspond conceptually to the following templated C++
struct:
``` template <typename Elem, size_t Rank> struct {
Elem *ptr;
int64_t offset;
int64_t sizes[Rank];
int64_t strides[Rank];
};
``` The linearization procedure for address calculation for strided
memrefs is the same as for linalg views:
`base_offset + SUM_i index_i * stride_i`.
The following CL will unify Linalg and Standard by removing !linalg.view
in favor of strided memrefs.
PiperOrigin-RevId: 272033399
The file was modifiedmlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
The file was modifiedmlir/g3doc/ConversionToLLVMDialect.md
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
The file was modifiedmlir/examples/Linalg/Linalg3/Execution.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
The file was modifiedmlir/test/Examples/Linalg/Linalg1.mlir
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
Commit c97a9320a0eb20c7cba5bb23e4ff5ca46cadd4e0 by gardener
Adding some missing SPIR-V core and GLSL extended ops.
PiperOrigin-RevId: 272039887
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
Commit 8e67039e31dc77f4762173c45052928983d0cb4e by gardener
NFC: Change `classof` on registered operations to use pointer
comparison.
The current implementation always uses string comparison, but if the
operation is registered the AbstractOperation instance can be used to
provide faster pointer comparison.
PiperOrigin-RevId: 272041333
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
Commit 0b81eb928b3882ccb63e38ef26348fd0fb75c2cd by gardener
Enable autogenerating OpInterface method declarations
Add DeclareOpInterfaceFunctions to enable specifying whether
OpInterfaceMethods for an OpInterface should be generated automatically.
This avoids needing to declare the extra methods, while also allowing
adding function declaration by way of trait/inheritance.
Most of this change is mechanical/extracting classes to be reusable.
PiperOrigin-RevId: 272042739
The file was modifiedmlir/include/mlir/TableGen/OpTrait.h
The file was modifiedmlir/tools/mlir-tblgen/OpInterfacesGen.cpp
The file was modifiedmlir/g3doc/OpDefinitions.md
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was addedmlir/lib/TableGen/OpInterfaces.cpp
The file was modifiedmlir/lib/TableGen/OpTrait.cpp
The file was addedmlir/include/mlir/TableGen/OpInterfaces.h
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Commit f015b020f3dc4cfddd7fee9b5dd1d8474bdc98bc by gardener
Add missing file from cmakelist
PiperOrigin-RevId: 272054623
The file was modifiedmlir/lib/TableGen/CMakeLists.txt
Commit 5ef8b2d31e708b7fd87715b4cc94233501651cab by gardener
Adding signed integer ops for abs, sign, min, and max in the GLSL
extension.
PiperOrigin-RevId: 272067942
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
Commit 219421ece7426d7e28c81c98b17bc3a6da77f0dd by gardener
[spirv] Add array length check.
According to the SPIR-V spec:
"Length is the number of elements in the array. It must be at least 1."
Closes tensorflow/mlir#160
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/160
from denis0x0D:sandbox/array_len
0840dc0986ad0088a3aa7d5d8d3e97d489377ed9 PiperOrigin-RevId: 272094669
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
The file was modifiedmlir/test/Dialect/SPIRV/types.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
Commit fb41df9c4adb8249660623480a77e31146eb8d85 by gardener
Format markdown list.
PiperOrigin-RevId: 272095611
The file was modifiedmlir/g3doc/Rationale.md
Commit 1c649d57857d866daf2439b50c17eb835754e2dc by gardener
Pass the pointer of the parent pipeline collection pass to
PassInstrumentation::run*Pipeline.
For the cases where there are multiple levels of nested pass managers,
the parent thread ID is not enough to distinguish the parent of a given
pass pipeline. Passing in the parent pass gives an exact anchor point.
PiperOrigin-RevId: 272105461
The file was modifiedmlir/lib/Pass/PassTiming.cpp
The file was modifiedmlir/include/mlir/Pass/PassInstrumentation.h
The file was modifiedmlir/lib/Pass/Pass.cpp
Commit 66bcd05bb7ed1653d3dc1619c20dcaa858471c9f by gardener
Fold away reduction over 0 dimensions.
PiperOrigin-RevId: 272113564
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
Commit f479f816f99aea10f1f2d09282b90c7695a8b0c6 by gardener
Add integer shift ops to LLVM dialect.
PiperOrigin-RevId: 272140049
The file was modifiedmlir/test/Target/llvmir.mlir
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
Commit 8503ffbe3af8a7b9c30f668353054a3721263374 by gardener
Add verification error message for ops that require at least one operand
or result.
PiperOrigin-RevId: 272153634
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/IR/traits.mlir
The file was modifiedmlir/lib/IR/Operation.cpp
Commit 1129931a625b19b57800c938f528b53f9ce737c1 by gardener
Change all_reduce lowering to support 2D and 3D blocks.
Perform second reduce only with first warp. This requires an additional
__sync_threads(), but doesn't need special handling when the last warp
is small. This simplifies support for block sizes that are not multiple
of 32.
Supporting partial warp reduce will be done in a separate CL.
PiperOrigin-RevId: 272168917
The file was modifiedmlir/test/mlir-cuda-runner/all-reduce.mlir
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
Commit f8ae7396130d7483b7038fa3639751980e8e5dc4 by gardener
[spirv] NFC: rename SPV_ArithmeticOp to SPV_ArithmeticBinaryOp
Also rename SPV_UnaryArithmeticOp to SPV_ArithmeticUnaryOp to be
consistent.
PiperOrigin-RevId: 272173974
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
Commit e36337a998a6be39d65872eab3e3e2291b6518b9 by gardener
Unify Linalg types by using strided memrefs
This CL finishes the implementation of the Linalg + Affine type
unification of the [strided memref
RFC](https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).
As a consequence, the !linalg.view type, linalg::DimOp, linalg::LoadOp
and linalg::StoreOp can now disappear and Linalg can use standard types
everywhere.
PiperOrigin-RevId: 272187165
The file was removedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/test/Dialect/Linalg/invalid.mlir
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
The file was modifiedmlir/test/mlir-cpu-runner/linalg_integration_test.mlir
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/Utils/Utils.h
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/test/Dialect/Linalg/promote.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgTypes.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgTraits.h
The file was modifiedmlir/test/Dialect/Linalg/fusion.mlir
The file was modifiedmlir/test/Dialect/Linalg/tile_conv.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir
The file was modifiedmlir/test/Dialect/Linalg/tile.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgTypes.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.h
The file was modifiedmlir/include/mlir/Dialect/Linalg/Utils/Intrinsics.h
The file was modifiedmlir/test/mlir-cpu-runner/cblas_interface.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/Dialect/Linalg/fusion-2-level.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
The file was modifiedmlir/test/Dialect/Linalg/llvm.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
Commit c760f233b30ef3f93dfe3380fb85437460180465 by gardener
Fix and simplify CallOp/CallIndirectOp to LLVM::CallOp conversion
A recent ABI compatibility change affected the conversion from standard
CallOp/CallIndirectOp to LLVM::CallOp by changing its signature. In
order to analyze the signature, the code was looking up the callee
symbol in the module. This is incorrect since, during the conversion,
the module may contain both the original and the converted function op
that have the same symbol name. There is no strict guarantee on which of
the two symbols will be found by the lookup. The conversion was not
failing because the type legalizer converts the LLVM types to themselves
making the original and the converted function signatures ultimately
produce the same type.
Instead of looking up the function signature to get the list of result
types, use the types of the CallOp/CallIndirectOp results which must
match those of the function in valid IR. These types are guaranteed to
be the original, unconverted types when converting the operation.
Furthermore, this avoids the need to perform a lookup of a symbol name
in the module which may be expensive.
Finally, propagate attributes as-is from the original op to the
converted op since they share the attribute name for the callee of
direct calls and the rest of attributes are not affected by the
conversion. This removes the need for additional contorsions between
direct and indirect calls to extract the name of the optional callee
attribute only to insert it back. This also prevents the conversion from
unintentionally dropping the other attributes of the op.
PiperOrigin-RevId: 272218871
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
Commit 9e6dde3977911628a1f5f531a5462b58b79658ee by gardener
Add a pair of hooks to DominanceInfo.
This exposes hooks for accessing internal dominance nodes, and updating
the internal DFS numbers.
Closes tensorflow/mlir#151
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/151
from schweitzpgi:dominance_hooks
69d14214a423b816cbd59feffcacdd02f3b5f921 PiperOrigin-RevId: 272287352
The file was modifiedmlir/include/mlir/Analysis/Dominance.h
The file was modifiedmlir/lib/Analysis/Dominance.cpp
Commit 3597711bdd18d21e5f36b7dff9c26c65c7c98452 by gardener
[spirv] Change enum case uniquing in gen_spirv_dialect.py
In SPIR-V we can have multiple symbols corresponding to the same enum
value. This is because when an extension is introduced into the core
spec, its suffix is typically removed, e.g., 'VulkanKHR' memory model
becomes 'Vulkan' memory model in SPIR-V 1.5.
Previously we just keep the first symbol for an enum value. That symbol
is not necessarily a better one. This CL changes to sort symbols,
grouped by enum values, alphabetically and then keep the first one,
which is typically shorter and without the extension suffix. We also fix
up certain ones like HlslSemanticGOOGLE.
PiperOrigin-RevId: 272290363
The file was modifiedmlir/utils/spirv/gen_spirv_dialect.py
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
Commit 2b86e27dbd822ee972da8ab71ec1b368302127c0 by gardener
Show type even if elementsattr is elided in graph
The type is quite useful for debugging and shouldn't be too large.
PiperOrigin-RevId: 272390311
The file was modifiedmlir/lib/Transforms/ViewOpGraph.cpp
Commit e81b3129b465b3b6a79ad041f27921e80fe69e71 by gardener
[ROCm] Adding pass to lower GPU Dialect to ROCDL Dialect.
This is a follow-up to the PRtensorflow/mlir#146 which introduced the
ROCDL Dialect. This PR introduces a pass to lower GPU Dialect to the
ROCDL Dialect. As with the previous PR, this one builds on the work done
by @whchung, and addresses most of the review comments in the original
PR.
Closes tensorflow/mlir#154
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/154
from deven-amd:deven-lower-gpu-to-rocdl
809893e08236da5ab6a38e3459692fa04247773d PiperOrigin-RevId: 272390729
The file was addedmlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
The file was addedmlir/include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h
The file was addedmlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
The file was addedmlir/lib/Conversion/GPUToROCDL/CMakeLists.txt
Commit 98594d4dd5fba018c72875e701ad59badd112a29 by gardener
Replace spurious `long` stride type by int64_t - NFC
PiperOrigin-RevId: 272425434
The file was modifiedmlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp
Commit 088f4c502f9fcba5f39d255ff6cdcf2ab050b201 by gardener
Fix example in OpInterfaces documentation
The concept-based polymorphism structure was missing an inheritance link
between the concept and the model. The interface class did not re-export
the base class constructor, which made it unusable with llvm::isa calls.
Fix these and reformat the code around.
PiperOrigin-RevId: 272452062
The file was modifiedmlir/g3doc/Interfaces.md
Commit f294e0e513464b97ae1bb2f9532979f8698c441e by gardener
[spirv] Add support for spv.selection
Similar to spv.loop, spv.selection is another op for modelling SPIR-V
structured control flow. It covers both OpBranchConditional and OpSwitch
with OpSelectionMerge.
Instead of having a `spv.SelectionMerge` op to directly model selection
merge instruction for indicating the merge target, we use regions to
delimit the boundary of the selection: the merge target is the next op
following the `spv.selection` op. This way it's easier to discover all
blocks belonging to the selection and it plays nicer with the MLIR
system.
PiperOrigin-RevId: 272475006
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was addedmlir/test/Dialect/SPIRV/Serialization/selection.mlir
The file was modifiedmlir/g3doc/Dialects/SPIR-V.md
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/test/Dialect/SPIRV/control-flow-ops.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
Commit 9604bb6269bc5ff87c85dad7c8aa4b4f5f0f4696 by gardener
Extract MemRefType::getStridesAndOffset as a free function and fix
dynamic offset determination.
This also adds coverage with a missing test, which uncovered a bug in
the conditional for testing whether an offset is dynamic or not.
PiperOrigin-RevId: 272505798
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
Commit 44ef5e5525931ac60ce80f51a575ef7ab22e4da8 by gardener
Disallow index types in memrefs.
As specified in the MLIR language reference and rationale documents,
`memref` types should not be allowed to have `index` as element types.
As observed in
https://groups.google.com/a/tensorflow.org/forum/#!msg/mlir/P49hVWqTMNc/nW89a4i_AgAJ
this restriction was lifted when canonicalization unit tests for affine
operations were introduced, without sufficient motivation to lift the
restriction itself.  The test in question can be trivially rewritten
(return the value from a function instead of storing it to prevent DCE
from removing the producer operation) and the restriction put back in
place.
If `memref<...x index>` is relevant for some use cases, the relaxation
of the type system can be implemented separately with appropriate
modifications to the documentation.
PiperOrigin-RevId: 272607043
The file was modifiedmlir/test/AffineOps/canonicalize.mlir
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/test/IR/invalid.mlir
Commit e0d78eac23898d44171e3e6a3b817c7c76aeb244 by gardener
NFC: rename Conversion/ControlFlowToCFG to Conversion/LoopToStandard
This makes the name of the conversion pass more consistent with the
naming scheme, since it actually converts from the Loop dialect to the
Standard dialect rather than working with arbitrary control flow
operations.
PiperOrigin-RevId: 272612112
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
The file was modifiedmlir/tools/mlir-cuda-runner/CMakeLists.txt
The file was addedmlir/include/mlir/Conversion/LoopToStandard/ConvertLoopToStandard.h
The file was removedmlir/include/mlir/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.h
The file was modifiedmlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
The file was modifiedmlir/examples/Linalg/Linalg3/lib/CMakeLists.txt
The file was removedmlir/lib/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.cpp
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
The file was modifiedmlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
The file was modifiedmlir/test/Conversion/convert-to-cfg.mlir
The file was removedmlir/lib/Conversion/ControlFlowToCFG/CMakeLists.txt
The file was addedmlir/lib/Conversion/LoopToStandard/CMakeLists.txt
The file was addedmlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
The file was modifiedmlir/examples/Linalg/Linalg1/lib/CMakeLists.txt
Commit bd4762502c5b76285aa3910209ee16401f392229 by gardener
Add parentheses around boolean operators in assert
This removes a warning and is generally a good practice.
PiperOrigin-RevId: 272613597
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
Commit 8633b6bc8e50697defc91c7debd53768385e51ed by gardener
Give modules a name
Modules are now Ops and, as such, can be nested. They do not produce an
SSA value so there is no possibility to refer to them in the IR.
Introduce support for symbol names attached to the module Op so that it
can be referred to using SymbolRefAttrs. The name is optional, for
example the implicit top-level module does not have a name.
PiperOrigin-RevId: 272671600
The file was modifiedmlir/lib/IR/Module.cpp
The file was modifiedmlir/test/IR/module-op.mlir
The file was modifiedmlir/include/mlir/IR/Module.h
Commit 0b93c092b620f0d70987061ad67f621b9c69925b by gardener
Make Module::getName return Optional<StringRef>
Module names are optional so it makes more sense to take and return an
optional any time the name is involved. Also update the language
reference to reflect the module names.
PiperOrigin-RevId: 272684698
The file was modifiedmlir/include/mlir/IR/Module.h
The file was modifiedmlir/lib/IR/Module.cpp
The file was modifiedmlir/g3doc/LangRef.md
Commit 218f0e611a624516da2043e9495bc6c0e2bcd8a5 by gardener
Add syntactic sugar for strided memref parsing. This CL implements the
last remaining bit of the [strided memref
proposal](https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/MaL8m2nXuio).
The syntax is a bit more explicit than what was originally proposed and
resembles:
`memref<?x?xf32, offset: 0 strides: [?, 1]>`
Nonnegative strides and offsets are currently supported. Future
extensions will include negative strides.
This also gives a concrete example of syntactic sugar for the ([RFC]
Proposed Changes to MemRef and Tensor MLIR
Types)[https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/-wKHANzDNTg].
The underlying implementation still uses AffineMap layout.
PiperOrigin-RevId: 272717437
The file was modifiedmlir/test/Dialect/Linalg/fusion-2-level.mlir
The file was modifiedmlir/test/Dialect/Linalg/llvm.mlir
The file was modifiedmlir/test/Dialect/Linalg/tile_conv.mlir
The file was modifiedmlir/g3doc/LangRef.md
The file was modifiedmlir/test/Dialect/Linalg/promote.mlir
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
The file was modifiedmlir/test/Dialect/Linalg/fusion.mlir
The file was modifiedmlir/lib/Parser/TokenKinds.def
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/test/Dialect/Linalg/tile.mlir
The file was modifiedmlir/test/IR/invalid.mlir
The file was modifiedmlir/test/AffineOps/memref-stride-calculation.mlir
Commit 496f4590a1ab17615fe798de3266da3f34dfbddb by gardener
Generalize parse/printBinaryOp to parse/printOneResultOp.
PiperOrigin-RevId: 272722539
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was modifiedmlir/lib/IR/Operation.cpp
Commit 0dfa7fc9082cd7792f3769f738468d5f1dfd5a3a by gardener
Add fpext and fptrunc to the Standard dialect and includes conversion to
LLVM
PiperOrigin-RevId: 272768027
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
The file was modifiedmlir/test/IR/core-ops.mlir
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
Commit 8c95223e3c9555165fb9f56db35c3c8e85ddd4c1 by gardener
Add `axis` attribute to the quant.stats op
The first dim length of the axisStats attribute should equals to the
slice size of the input argument when splitted by the axis dimension.
PiperOrigin-RevId: 272798042
The file was modifiedmlir/test/Dialect/QuantOps/parse-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/QuantOps/QuantOps.td
The file was modifiedmlir/test/Dialect/QuantOps/parse-ops-invalid.mlir
The file was modifiedmlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
The file was modifiedmlir/lib/Dialect/QuantOps/IR/QuantOps.cpp
Commit a20d96e436272b52d36f52c4a07c86ed285502e9 by gardener
Update the Inliner pass to work on SCCs of the CallGraph.
This allows for the inliner to work on arbitrary call operations. The
updated inliner will also work bottom-up through the callgraph enabling
support for multiple levels of inlining.
PiperOrigin-RevId: 272813876
The file was modifiedmlir/lib/Transforms/Utils/InliningUtils.cpp
The file was modifiedmlir/include/mlir/Transforms/InliningUtils.h
The file was modifiedmlir/test/Transforms/inlining.mlir
The file was modifiedmlir/include/mlir/Analysis/CallInterfaces.td
The file was modifiedmlir/lib/Transforms/Inliner.cpp
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
Commit 5830f71a45df33e24c864bea4c5de070be47b488 by gardener
Add support for inlining calls with different arg/result types from the
callable.
Some dialects have implicit conversions inherent in their modeling,
meaning that a call may have a different type that the type that the
callable expects. To support this, a hook is added to the dialect
interface that allows for materializing conversion operations during
inlining when there is a mismatch. A hook is also added to the callable
interface to allow for introspecting the expected result types.
PiperOrigin-RevId: 272814379
The file was modifiedmlir/include/mlir/Transforms/InliningUtils.h
The file was modifiedmlir/lib/Transforms/Inliner.cpp
The file was modifiedmlir/lib/Transforms/Utils/InliningUtils.cpp
The file was modifiedmlir/include/mlir/IR/Function.h
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/include/mlir/Analysis/CallInterfaces.td
The file was modifiedmlir/test/Transforms/inlining.mlir
Commit 85dcaf19c721c4c745cd4fa3972aa9093acd69d3 by gardener
Fix typos, NFC.
PiperOrigin-RevId: 272851237
The file was modifiedmlir/include/mlir/Dialect/QuantOps/UniformSupport.h
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/include/mlir/Support/StringExtras.h
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/lib/IR/Dialect.cpp
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/lib/Quantizer/Support/UniformSolvers.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopFusionUtils.cpp
The file was modifiedmlir/examples/toy/Ch3/include/toy/Parser.h
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.h
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/examples/toy/Ch4/include/toy/Dialect.h
The file was modifiedmlir/include/mlir/IR/Operation.h
The file was modifiedmlir/examples/toy/Ch4/include/toy/Parser.h
The file was modifiedmlir/examples/toy/Ch1/include/toy/Parser.h
The file was modifiedmlir/tools/mlir-tblgen/ReferenceImplGen.cpp
The file was modifiedmlir/include/mlir/IR/Block.h
The file was modifiedmlir/lib/Transforms/MemRefDataFlowOpt.cpp
The file was modifiedmlir/include/mlir/Analysis/Utils.h
The file was modifiedmlir/examples/toy/Ch3/include/toy/Dialect.h
The file was modifiedmlir/include/mlir/IR/Diagnostics.h
The file was modifiedmlir/lib/IR/IntegerSet.cpp
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/MLIRGen.cpp
The file was modifiedmlir/include/mlir/TableGen/OpTrait.h
The file was modifiedmlir/lib/Dialect/QuantOps/Transforms/ConvertSimQuant.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
The file was modifiedmlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
The file was modifiedmlir/examples/toy/Ch3/parser/AST.cpp
The file was modifiedmlir/examples/toy/Ch5/include/toy/Dialect.h
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/examples/toy/Ch5/include/toy/Parser.h
The file was modifiedmlir/lib/IR/Attributes.cpp
The file was modifiedmlir/lib/Analysis/AffineAnalysis.cpp
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
The file was modifiedmlir/examples/toy/Ch2/include/toy/Parser.h
The file was modifiedmlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
Commit d064469f6feb3187450f6220e15d92cc1a1ecada by gardener
Moving the GPUIndexIntrinsicOpLowering template to a common location
The GPUIndexIntrinsicOpLowering template is currently used by the code
in both the GPUToNVVM and GPUToROCDL dirs. Moving it to a common
location to remove code duplication.
Closes tensorflow/mlir#163
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/163
from deven-amd:deven-refactor-gpu-index-ops-lowering
b8dc2a5f5353df196039b6ff2ad42106028693ed PiperOrigin-RevId: 272863297
The file was addedmlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
Commit 516f6a3477073d52224a744a720f2d62f0ea3ca9 by gardener
Add missing Linalg lowerings to allow roundtrip.mlir to lower to LLVM
Certain lowering patterns were reported as
[missing](https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/dkdmHa77sSQ).
This CL adds them and allows Linalg/roundtrip.mlir and Linalg/loops.mlir
to lower to LLVM directly. Those 2 tests are updated to additionally
check that the direct lowering to LLVM does not crash.
The following points, left as TODOs still need to be addressed for
correct end-to-end execution: 1. the lowering for ConvOp needs to pass
attributes such as strides and dilations; the external library call
needs to support it. 2. the lowering for GenericOp needs to support
lowering to loops as a DialectConversion pattern. This is blocked on the
DialectConversion infrastructure accepting an OperationFolder.
PiperOrigin-RevId: 272878131
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/test/Dialect/Linalg/llvm.mlir
Commit 754ea72794c819dceeab1f4cc15933971d228aed by gardener
Replace constexpr MemRefType::kDynamicStrideOrOffset by a
MemRefType:;getDynamicStrideOrOffset() method - NFC
This fixes global ODR-use issues, some of which manifest in Parser.cpp.
Fixes tensorflow/mlir#167.
PiperOrigin-RevId: 272886347
The file was modifiedmlir/lib/IR/StandardTypes.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
Commit 77a809d7a12bf83096a670dc3c611d9c1f95eb0d by gardener
Add some utility builder functions for SPIR-V operations.
Add builder functions for spv._address_of, spv.EntryPoint,
spv.ExecutionMode and spv.Load to make it easier to create these
operations. Fix a minor bug in printing of spv.EntryPoint Add a utility
function to get the attribute name associated with a decoration.
PiperOrigin-RevId: 272952846
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
Commit 3f8bde40cb267f1f6b168ea7bbdd918dfda650a4 by gardener
Add spv.Undef op to support OpUndef instruction in SPIR-V.
Adding support for OpUndef instruction. Updating the dialect generation
script to fix a few bugs in the instruction spec generation.
PiperOrigin-RevId: 272975685
The file was addedmlir/test/Dialect/SPIRV/Serialization/undef.mlir
The file was modifiedmlir/utils/spirv/gen_spirv_dialect.py
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
Commit 58e2ead31489aef4b3972a1af1e1e7d9a5ab4f1a by gardener
Add missing dependency on the TypeInferOpInterface from the Test dialect
This is fixing a build failure, usually non-deterministic because of
parallelism in the build, but could be reliably reproduced:
ninja
projects/mlir/test/lib/TestDialect/CMakeFiles/MLIRTestDialect.dir/TestPatterns.cpp.o
PiperOrigin-RevId: 272998436
The file was modifiedmlir/test/lib/TestDialect/CMakeLists.txt
Commit c020480fc61c9c414203e3e4d18942474ccc0809 by gardener
[spirv] Allow return ops to be in control flow ops
Use `getParentOfType<FunctionOp>()` instead of
`cast<FuncOp>(getParentOp())` to avoid crash when return ops are used
inside spv.selection/spv.loop.
PiperOrigin-RevId: 273006041
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/test/Dialect/SPIRV/control-flow-ops.mlir
Commit 8b9b72cee81226299602d3d37e794aea8efb141a by gardener
NFC: Cleanup test ops and traits tests
1. Rename a few ops to make it clear they operate on *element* types. 2.
Remove unused and generic operand and result ODS names (e.g. $res, $arg,
$input). These are just clutter and don't make the op definitions any
clearer. 3. Give test cases with duplicate names clearer names. 4. Add
missing test case for no operands in SameOperandAndResultElementType.
PiperOrigin-RevId: 273067933
The file was modifiedmlir/test/IR/traits.mlir
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
Commit 18db4ce493b176d64ad180dc4da9bbeb148ec5d5 by gardener
Allow element type traits to operate on scalars
This allows confirming that a scalar argument has the same element type
as a shaped one. It's easy to validate a type is shaped on its own if
that's desirable, so this shouldn't make that use case harder. This
matches the behavior of other traits that operate on element type (e.g.
AllElementTypesMatch). Also this makes the code simpler because now we
just use getElementTypeOrSelf.
Verified that all uses in core already check the type is shaped in
another way.
PiperOrigin-RevId: 273068507
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was modifiedmlir/test/IR/traits.mlir
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit 77672c9777a16c26e6ba569f465a75e3349fa728 by gardener
Enable emitting dialect summary & description during op generation
Sort ops per dialect and emit summary & description (if provided) of
each dialect before emitting the ops of the dialect.
PiperOrigin-RevId: 273077138
The file was modifiedmlir/include/mlir/TableGen/Operator.h
The file was modifiedmlir/include/mlir/TableGen/Dialect.h
The file was modifiedmlir/lib/TableGen/Dialect.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpDocGen.cpp
Commit 7c765d97f98779ad2739a6a3e0ff500a4661efac by gardener
Support reduction of partial warps.
gpu.all_reduce now supports block sizes that are not multiple of 32.
PiperOrigin-RevId: 273255204
The file was modifiedmlir/test/mlir-cuda-runner/all-reduce.mlir
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
Commit da984166df8c6240ef898cbe55c0ea56ec535a1c by gardener
Add OpaqueLoc to MLIR locations.
See RFC:
https://groups.google.com/a/tensorflow.org/forum/#!topic/mlir/xE2IzfhE3Wg.
Opaque location stores two pointers, one of them points to some data
structure that is external to MLIR, and the other one is unique for each
type and represents type id of that data structure. OpaqueLoc also
stores an optional location that can be used if the first one is not
suitable. OpaqueLoc is managed similar to FileLineColLoc. It is passed
around by MLIR transformations and can be used in compound locations
like CallSiteLoc.
PiperOrigin-RevId: 273266510
The file was modifiedmlir/lib/IR/LocationDetail.h
The file was addedmlir/test/lib/Transforms/TestOpaqueLoc.cpp
The file was modifiedmlir/include/mlir/IR/Attributes.h
The file was addedmlir/test/IR/opaque_locations.mlir
The file was modifiedmlir/g3doc/Diagnostics.md
The file was modifiedmlir/include/mlir/IR/Location.h
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/lib/IR/Location.cpp
Commit c07a604f87216a21e815802ad0b186af34924f6b by gardener
Fix CMake build after adding TestOpaqueLoc.cpp
PiperOrigin-RevId: 273296399
The file was modifiedmlir/test/lib/Transforms/CMakeLists.txt
Commit 27e8efedf868303961b8b081151c5dfe42acb9a5 by gardener
Add DialectType and generate docs for dialect types
Add new `typeDescription` (description was already used by base
constraint class) field to type to allow writing longer descriptions
about a type being defined. This allows for providing additional
information/rationale for a defined type. This currently uses
`description` as the heading/name for the type in the generated
documentation.
PiperOrigin-RevId: 273299332
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/include/mlir/TableGen/Dialect.h
The file was modifiedmlir/lib/TableGen/Dialect.cpp
The file was modifiedmlir/include/mlir/TableGen/Type.h
The file was modifiedmlir/tools/mlir-tblgen/OpDocGen.cpp
The file was modifiedmlir/lib/TableGen/Type.cpp
Commit 9f98bcda47f1d1a20d584471dc8541777bc61413 by gardener
Support AllocOp terminal in Linalg::AliasAnalysis.
Now that linalg.view and strided memrefs are unified, there is no reason
to disallow AllocOp in alias analysis. This CLs adds support for AllocOp
which allows writing shorter tests that do not require explicitly
creating a view for each operation.
PiperOrigin-RevId: 273303060
The file was modifiedmlir/test/Dialect/Linalg/fusion.mlir
The file was modifiedmlir/lib/Dialect/Linalg/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
Commit 3b4f133fb70b635dff8077c77296941a109a0303 by gardener
Start a minimal mlir_utils runtime library for testing debugging
purposes
Now that MLIR has a standardized StridedMemRef descriptor, it becomes
very easy to interact with external library functions and build
utilities directly in C++. This CL introduces basic printing support in
a libmlir_utils.so. Unit tests are rewritten using this feature and also
to improve coverage.
For now, C mandates that we have a unique function for each MemRef
element type and rank. In a future a simple unranked descriptor can be
introduced to only require uniqu'ing by element type.
PiperOrigin-RevId: 273304741
The file was modifiedmlir/test/mlir-cpu-runner/cblas_interface.cpp
The file was modifiedmlir/test/CMakeLists.txt
The file was addedmlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
The file was modifiedmlir/test/mlir-cpu-runner/include/cblas.h
The file was addedmlir/test/mlir-cpu-runner/utils.mlir
The file was modifiedmlir/test/mlir-cpu-runner/CMakeLists.txt
The file was addedmlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
Commit b66d6e54330380987bf103a0230a9228324af276 by gardener
Fix a comment in the OperationInterface example.
PiperOrigin-RevId: 273308494
The file was modifiedmlir/g3doc/OpDefinitions.md
Commit 9f11b0e12f964779cbf3d7cc38eaea6675370ccd by gardener
Change Block::getParent() to be a const function. This is only necessary
because ilist_node_with_parent specifically requires a 'getParent()
const' method. If/When ilist_node removes this constraint we should drop
the const to fit the rest of the MLIR const model.
PiperOrigin-RevId: 273316153
The file was modifiedmlir/include/mlir/IR/Operation.h
The file was modifiedmlir/include/mlir/IR/Block.h
The file was modifiedmlir/lib/IR/Block.cpp
Commit 89e7a76a1cc77f9b67adb866e3a9e09ec5470790 by gardener
fix simplify-affine-structures bug
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#157
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/157
from bondhugula:quickfix bd1fcd79825fc0bd5b4a3e688153fa0993ab703d
PiperOrigin-RevId: 273316498
The file was modifiedmlir/test/Transforms/memref-normalize.mlir
The file was modifiedmlir/lib/Transforms/SimplifyAffineStructures.cpp
Commit ebf584b8134e6e0530e5848be55a330d185c688d by gardener
[spirv] Fix function entry block erase after moving to spv.selection
The structured selection/loop's entry block does not have arguments. If
the function's header block is also part of the structured control flow,
we cannot just simply erase it because it may contain arguments matching
the function signature and used by the cloned blocks. Instead, turn it
into a block only containing a spv.Branch op.
Also, we can directly emit instructions for the spv.selection header
block to the block containing the spv.selection op. This eliminates
unnecessary branches in the SPIR-V blob.
Added a test for nested spv.loop.
PiperOrigin-RevId: 273351424
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/loop.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/selection.mlir
Commit 9e9c3a009a19a1a35f364d79288949c66e7482af by gardener
Update UndefOp (de)serialization to generate OpUndef at module level.
The SPIR-V spec recommends all OpUndef instructions be generated at
module level. For the SPIR-V dialect its better for UndefOp to produce
an SSA value for use with other instructions. If UndefOp is to be used
at module level, it cannot produce an SSA value (use of this SSA value
within FuncOp would need implicit capture). To satisfy needs of the
SPIR-V spec while making it simpler to represent UndefOp in the SPIR-V
dialect, the serialization is updated to create OpUndef instruction at
module scope.
PiperOrigin-RevId: 273355526
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/undef.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
Commit aeada290b8777dc2f83350ced7df77d82fadbb5b by gardener
Add a new class, OpPrintingFlags, to enable programmatic control of
Operation::print behavior.
This allows for controlling the behavior of the AsmPrinter
programmatically, instead of relying exclusively on cl::opt flags. This
will also allow for more fine-tuned control of printing behavior per
callsite, instead of being applied globally.
PiperOrigin-RevId: 273368361
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/include/mlir/IR/Module.h
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was modifiedmlir/include/mlir/IR/Operation.h
Commit 5a1108c9a683b8b8f48cc4e6f870e21c8807d8ff by gardener
[spirv] Disable a crashing spv.loop test
PiperOrigin-RevId: 273379318
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/loop.mlir
Commit 37e0e8cf16650b8d99e1f044c63fc69cca8f0899 by gardener
Do not add spirv::BitcastOp for cast from signed to unsigned type.
Since MLIR integer types don't make a distinction between signed vs
unsigned integers, during deserialization of SPIR-V binaries, the
OpBitcast might result in a cast from/to the same type. Do not add a
spv.Bitcast operation to the spv.module in these cases.
PiperOrigin-RevId: 273381887
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
Commit 6b3462a77b18b4968bbf9e56d5fd69c6107b2a45 by gardener
Expose `fuseProducerOf` in Linalg/Utils/Utils.h.
PiperOrigin-RevId: 273384063
The file was modifiedmlir/include/mlir/Dialect/Linalg/Utils/Utils.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
Commit 17606a108b9464da4f960e11b132c9e968f31adb by gardener
Print result types when dumping graphviz.
PiperOrigin-RevId: 273406833
The file was modifiedmlir/lib/Transforms/ViewOpGraph.cpp
Commit a8a73f0640b483ff47140b642ef8ce3d9735a174 by gardener
Add a flag to the AsmPrinter for eliding large ElementsAttrs.
Some modules may have extremely large ElementsAttrs, which makes
debugging involving IR dumping extremely slow and painful. This change
adds a flag that will elide ElementsAttrs with a "large"(as defined by
the user) number of elements by printing "..." instead of the element
data.
PiperOrigin-RevId: 273413100
The file was addedmlir/test/IR/pretty-attributes.mlir
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
Commit 780f107a57113706a4551e32c32fcd60006d9263 by gardener
Update upgrade some uses of mlir::interleave API to take container
argument directly.
PiperOrigin-RevId: 273446814
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit 90d65d32d69ca46f52a9a744eafdad0d97b4a185 by gardener
Use named modules for gpu.launch_func
The kernel function called by gpu.launch_func is now placed into an
isolated nested module during the outlining stage to simplify separate
compilation. Until recently, modules did not have names and could not be
referenced. This limitation was circumvented by introducing a stub
kernel at the same name at the same nesting level as the module
containing the actual kernel. This relation is only effective in one
direction: from actual kernel function to its launch_func "caller".
Leverage the recently introduced symbol name attributes on modules to
refer to a specific nested module from `gpu.launch_func`. This removes
the implicit connection between the identically named stub and kernel
functions. It also enables support for `gpu.launch_func`s to call
different kernels located in the same module.
PiperOrigin-RevId: 273491891
The file was modifiedmlir/g3doc/Dialects/GPU.md
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
The file was modifiedmlir/test/Dialect/GPU/outlining.mlir
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
The file was modifiedmlir/test/Conversion/GPUToSPIRV/builtins.mlir
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/test/Dialect/GPU/invalid.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/simple.mlir
The file was modifiedmlir/test/Dialect/GPU/ops.mlir
The file was modifiedmlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/load_store.mlir
Commit 16af5924cb6fd2bea3a4f9acf55aef4e796f5b11 by gardener
Fuse GenerateCubinAccessors pass into LaunchFunctToCuda
Now that the accessor function is a trivial getter of the global
variable, it makes less sense to have the getter generation as a
separate pass. Move the getter generation into the lowering of
`gpu.launch_func` to CUDA calls. This change is mostly code motion, but
the process can be simplified further by generating the addressof
inplace instead of using a call. This is will be done in a follow-up.
PiperOrigin-RevId: 273492517
The file was modifiedmlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
The file was removedmlir/test/Conversion/GPUToCUDA/insert-cubin-getter.mlir
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
The file was removedmlir/lib/Conversion/GPUToCUDA/GenerateCubinAccessors.cpp
The file was modifiedmlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
Commit 52e082b6ed964ad408abc637b995bc13ff2fb122 by gardener
GPUToCUDA: emit addressof directly instead of wrapping it into a getter
function
Originally, the CUBIN getter function was introduced as a mechanism to
circumvent the absence of globals in the LLVM dialect. It would allocate
memory and populate it with the CUBIN data. LLVM dialect now supports
globals and they are already used to store CUBIN data, making the getter
function a trivial address computation of a global. Emit the address
computation directly at the place of `gpu.launch_func` instead of
putting it in a function and calling it. This simplifies the conversion
flow and prepares it for using the DialectConversion infrastructure.
PiperOrigin-RevId: 273496221
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
Commit 11d12670daef546f55cc76d8fe0b32f137ab3bb6 by gardener
GPUToCUDA: attach CUBIN to the nested module rather than to the function
Originally, we were attaching attributes containing CUBIN blobs to the
kernel function called by `gpu.launch_func`. This kernel is now
contained in a nested module that is used as a compilation unit. Attach
compiled CUBIN blobs to the module rather than to the function since we
were compiling the module. This also avoids duplication of the attribute
on multiple kernels within the same module.
PiperOrigin-RevId: 273497303
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
The file was modifiedmlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
The file was modifiedmlir/tools/mlir-cuda-runner/mlir-cuda-runner.cpp
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
Commit 0cdc53a762c4300c9c60a5a0d0714f323b3eed86 by gardener
Linalg to LLVM lowering: decrease the reliance on symbol lookup in a
module
During the conversion, both the original and the converted function may
coexist in the module and have the same symbol name. There is no
guarantee which of the two will be found by the symbol lookup. Avoid
returning the result of the library function lookup when lowering Linalg
to Standard or LLVM. Use the symbol reference instead. After the
conversion completes, only one symbol will remain and the Ops using
SymbolRefAttrs will be referring to the correct one.
PiperOrigin-RevId: 273510079
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
Commit 0dd404e4e10eb494859d866185dbdb09621a0ea8 by gardener
NFC: Remove unused default cl::opt value.
The default value is never used as the value of the elide option is only
used if it has an occurrence.
PiperOrigin-RevId: 273545143
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit ac91e673757f215325781cde4a286e96d7734fef by gardener
Add support for walking the uses of a symbol.
MLIR uses symbol references to model references to many global entities,
such as functions/variables/etc. Before this change, there is no way to
actually reason about the uses of such entities. This change provides a
walker for symbol references(via SymbolTable::walkSymbolUses), as well
as 'use_empty' support(via SymbolTable::symbol_use_empty). It also
resolves some deficiencies in the LangRef definition of SymbolRefAttr,
namely the restrictions on where a SymbolRefAttr can be stored,
ArrayAttr and DictionaryAttr, and the relationship with operations
containing the SymbolTable trait.
PiperOrigin-RevId: 273549331
The file was modifiedmlir/test/lib/CMakeLists.txt
The file was addedmlir/test/lib/IR/TestSymbolUses.cpp
The file was modifiedmlir/include/mlir/IR/SymbolTable.h
The file was addedmlir/test/lib/IR/CMakeLists.txt
The file was modifiedmlir/g3doc/LangRef.md
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
The file was modifiedmlir/lib/IR/SymbolTable.cpp
The file was addedmlir/test/IR/test-symbol-uses.mlir
Commit 6136f33d5960a63961f2b471f82e5b7df583f8f2 by gardener
unroll and jam: fix order of jammed bodies
- bodies would earlier appear in the order (i, i+3, i+2, i+1) instead of
(i, i+1, i+2, i+3) for example for factor 4.
- clean up hardcoded test cases
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#170
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/170
from bondhugula:ujam b66b405b2b1894a03b376952e32a9d0292042665
PiperOrigin-RevId: 273613131
The file was modifiedmlir/lib/Transforms/LoopUnrollAndJam.cpp
The file was modifiedmlir/test/Transforms/unroll-jam.mlir
Commit 49b29dd18645e30deb49d25b5e618f628b2e96d6 by gardener
Add a PatternRewriter hook for cloning a region into another.
This is similar to the `inlineRegionBefore` hook, except the original
blocks are unchanged. The region to be cloned *must* not have been
modified during the conversion process at the point of cloning, i.e. it
must belong an operation that has yet to be converted, or the operation
that is currently being converted.
PiperOrigin-RevId: 273622533
The file was modifiedmlir/test/Transforms/test-legalizer-full.mlir
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
The file was modifiedmlir/include/mlir/IR/PatternMatch.h
The file was modifiedmlir/test/lib/TestDialect/TestPatterns.cpp
The file was modifiedmlir/lib/IR/PatternMatch.cpp
The file was modifiedmlir/test/Transforms/test-legalizer.mlir
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h
Commit d21ba951de62baf463097bfbe3fbba9dea9cf91a by gardener
[spirv] Add a pass to decorate the composite types with layout info.
Add a pass to decorate the composite types used by composite objects in
the StorageBuffer, PhysicalStorageBuffer, Uniform, and PushConstant
storage classes with layout information.
Closes tensorflow/mlir#156
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/156
from denis0x0D:sandbox/layout_info_decoration
7c50840fd38ca169a2da7ce9886b52b50c868b84 PiperOrigin-RevId: 273634140
The file was addedmlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
The file was addedmlir/test/Dialect/SPIRV/Transforms/layout-decoration.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
The file was addedmlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
The file was modifiedmlir/tools/mlir-opt/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/Passes.h
Commit 956a8311306bd21eee33ddbe9575fed5c1f8877a by gardener
[ROCm] Fix the return type for the device function calls from i32 to
i64.
This is matching what the runtime library is expecting.
Closes tensorflow/mlir#171
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/171
from deven-amd:deven-rocdl-device-func-i64
80762629a8c34e844ebdc542b34dd783990db9db PiperOrigin-RevId: 273640767
The file was modifiedmlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
The file was modifiedmlir/test/Target/rocdl.mlir
Commit 71c7962201cace1300ca9c981959b9693edb8eea by gardener
Add support for parsing/printing non bare-identifier SymbolRefs.
The restriction that symbols can only have identifier names is
arbitrary, and artificially limits the names that a symbol may have.
This change adds support for parsing and printing symbols that don't fit
in the 'bare-identifier' grammar by printing the reference in quotes,
e.g. @"0_my_reference" can now be used as a symbol name.
PiperOrigin-RevId: 273644768
The file was modifiedmlir/test/IR/parser.mlir
The file was modifiedmlir/g3doc/LangRef.md
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/lib/Parser/Token.cpp
The file was modifiedmlir/lib/Parser/Token.h
The file was modifiedmlir/lib/IR/Module.cpp
The file was modifiedmlir/lib/IR/FunctionSupport.cpp
The file was modifiedmlir/lib/Parser/Lexer.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/include/mlir/IR/OpImplementation.h
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
Commit 744615123618e000caba27ed9fe3885e79668cb5 by gardener
Add Instance Specific Pass Options.
This allows individual passes to define options structs and for these
options to be parsed per instance of the pass while building the pass
pipeline from the command line provided textual specification.
The user can specify these per-instance pipeline options like so:
``` struct MyPassOptions : public PassOptions<MyPassOptions> {
Option<int> exampleOption{*this, "flag-name", llvm::cl::desc("...")};
List<int> exampleListOption{*this, "list-flag-name",
llvm::cl::desc("...")};
};
static PassRegistration<MyPass, MyPassOptions> pass("my-pass",
"description");
```
PiperOrigin-RevId: 273650140
The file was modifiedmlir/test/Transforms/parametric-tiling.mlir
The file was addedmlir/test/Pass/pipeline-options-parsing.mlir
The file was modifiedmlir/lib/Pass/PassRegistry.cpp
The file was modifiedmlir/test/lib/Pass/TestPassManager.cpp
The file was modifiedmlir/g3doc/WritingAPass.md
The file was modifiedmlir/lib/Support/MlirOptMain.cpp
The file was modifiedmlir/test/lib/Transforms/TestLoopParametricTiling.cpp
The file was modifiedmlir/include/mlir/Pass/PassRegistry.h
Commit b3a6ae8363b9d9c4d3794edabc0b3407280e4fd2 by gardener
Update the symbol utility methods to handle the case of unknown
operations.
This enhances the symbol table utility methods to handle the case where
an unknown operation may define a symbol table. When walking symbols, we
now collect all symbol uses before allowing the user to iterate. This
prevents the user from assuming that all symbols are actually known
before performing a transformation.
PiperOrigin-RevId: 273651963
The file was modifiedmlir/include/mlir/IR/SymbolTable.h
The file was modifiedmlir/test/lib/IR/TestSymbolUses.cpp
The file was modifiedmlir/lib/IR/SymbolTable.cpp
The file was modifiedmlir/test/IR/test-symbol-uses.mlir
Commit 85b46314c047532e5d38b3c417cb65014c97033e by gardener
Allow dynamic but ranked types in ops with SameOperandsAndResultShape
and SameOperandsAndResultType traits
Currently SameOperandsAndResultShape trait allows operands to have
tensor<*xf32> and tensor<2xf32> but doesn't allow tensor<?xf32> and
tensor<10xf32>.
Also, use the updated shape compatibility helper function in
TensorCastOp::areCastCompatible method.
PiperOrigin-RevId: 273658336
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/lib/IR/TypeUtilities.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/lib/IR/Operation.cpp
The file was modifiedmlir/test/IR/invalid-ops.mlir
The file was modifiedmlir/include/mlir/IR/TypeUtilities.h
The file was modifiedmlir/test/IR/traits.mlir
Commit 395ce4b41b8ac30c173ea52a2247d214e048ac3e by gardener
NFC: Fully qualify use of std::string. PiperOrigin-RevId: 273668957
The file was modifiedmlir/test/lib/Pass/TestPassManager.cpp
Commit 7c67ec0f032f41565d8d958703fd96717f7f7dce by gardener
Assert that region is not cloned into itself.
PiperOrigin-RevId: 273707291
The file was modifiedmlir/lib/IR/Region.cpp
Commit 48f819c113d7f518d7722c66e130b64a708b1ad8 by gardener
Change to doxygen comments. NFC.
PiperOrigin-RevId: 273707610
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
Commit c9c24ca23b669307102878c3c41e88d4ef5431f9 by gardener
Add exp operation to LLVMOPs.td.
PiperOrigin-RevId: 273718958
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/test/Target/llvmir-intrinsics.mlir
Commit 15f8ee62239c61300b03f07d49cadb1b0a990fd4 by gardener
Update the usage and comments in define_inst.sh.
PiperOrigin-RevId: 273723108
The file was modifiedmlir/utils/spirv/define_inst.sh
Commit 3451055614a26f353438430d32e7920ce57ab4b9 by gardener
Add support for some multi-store cases in affine fusion
This PR is a stepping stone towards supporting generic multi-store
source loop nests in affine loop fusion. It extends the algorithm to
support fusion of multi-store loop nests that:
1. have only one store that writes to a function-local live out, and
2. the remaining stores are involved in loop nest self dependences
   or no dependences within the function.
Closes tensorflow/mlir#162
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/162
from dcaballe:dcaballe/multi-output-fusion
7fb7dec6fe8b45f5ce176f018bfe37b256420c45 PiperOrigin-RevId: 273773907
The file was modifiedmlir/lib/Transforms/LoopFusion.cpp
The file was modifiedmlir/test/Transforms/loop-fusion.mlir
Commit 171637d4f062e5993ecd807f3480cb2a565fa188 by gardener
Fix Windows linkage error
This CL fixes bad macro names usage in mlir_runner_utils.h. The macro
mlir_runner_utils_EXPORTS now matches what is defined in CMakeLists.txt.
PiperOrigin-RevId: 273773931
The file was modifiedmlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
Commit e2ed25bc437fa5137fb47d0f76426a3b81256399 by gardener
Make SPIR-V lowering infrastructure follow Vulkan SPIR-V validation.
The lowering infrastructure needs to be enhanced to lower into a
spv.Module that is consistent with the SPIR-V spec. The following
changes are needed 1) The Vulkan/SPIR-V validation rules dictates entry
functions to have signature of void(void). This requires changes to the
function signature conversion infrastructure within the dialect
conversion framework. When an argument is dropped from the original
function signature, a function can be specified that when invoked will
return the value to use as a replacement for the argument from the
original function. 2) Some changes to the type converter to make the
converted type consistent with the Vulkan/SPIR-V validation rules,
  a) Add support for converting dynamically shaped tensors to
  spv.rtarray type.
  b) Make the global variable of type !spv.ptr<!spv.struct<...>> 3)
Generate the entry point operation for the kernel functions and
automatically compute all the interface variables needed
PiperOrigin-RevId: 273784229
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
The file was modifiedmlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
The file was modifiedmlir/test/Conversion/GPUToSPIRV/load_store.mlir
The file was modifiedmlir/test/Conversion/GPUToSPIRV/simple.mlir
Commit 35bb732032aca1c57ffe2dfb47d6d05e651b24e2 by gardener
Guard rewriter insertion point during signature conversion.
Avoid unexpected side effect in rewriter insertion point.
PiperOrigin-RevId: 273785794
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
Commit ae6946ec11e0953461ae35077d082d59ab3573cf by gardener
Add ::printAsTextualPipeline to Pass and OpPassManager.
Allow printing out pipelines in a format that is as close as possible to
the textual pass pipeline format. Individual passes can override the
print function in order to format any options that may have been used to
construct that pass.
PiperOrigin-RevId: 273813627
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/include/mlir/Pass/Pass.h
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/test/Pass/pipeline-options-parsing.mlir
The file was modifiedmlir/test/lib/Pass/TestPassManager.cpp
The file was modifiedmlir/g3doc/WritingAPass.md
Commit 27f400c8137a90e389b104138a3634044b3b3937 by gardener
minor spelling tweaks
-- f93661f2c25aab6cc5bf439606b0a1312998a575 by Kazuaki Ishizaki
<ishizaki@jp.ibm.com>:
address @River707's comment
Closes tensorflow/mlir#176
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/176
from kiszk:spelling_tweaks_include_tools
f93661f2c25aab6cc5bf439606b0a1312998a575 PiperOrigin-RevId: 273830689
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
The file was modifiedmlir/include/mlir/Dialect/FxpMathOps/FxpMathOps.td
The file was modifiedmlir/include/mlir/Pass/PassInstrumentation.h
The file was modifiedmlir/include/mlir/IR/IntegerSet.h
The file was modifiedmlir/include/mlir/Quantizer/Support/UniformSolvers.h
The file was modifiedmlir/include/mlir/Dialect/SDBM/SDBMExpr.h
The file was modifiedmlir/include/mlir/Analysis/CallGraph.h
The file was modifiedmlir/include/mlir/IR/AffineExprVisitor.h
The file was modifiedmlir/include/mlir/IR/Block.h
The file was modifiedmlir/include/mlir/TableGen/Pattern.h
The file was modifiedmlir/include/mlir/Target/LLVMIR.h
The file was modifiedmlir/include/mlir/Transforms/Passes.h
The file was modifiedmlir/include/mlir/IR/Matchers.h
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.h
The file was modifiedmlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
The file was modifiedmlir/include/mlir/Target/NVVMIR.h
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h
The file was modifiedmlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
The file was modifiedmlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp
The file was modifiedmlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
The file was modifiedmlir/include/mlir/EDSC/Intrinsics.h
The file was modifiedmlir/include/mlir/IR/Types.h
The file was modifiedmlir/include/mlir/Quantizer/Support/Statistics.h
The file was modifiedmlir/include/mlir/IR/Attributes.h
The file was modifiedmlir/include/mlir/TableGen/Operator.h
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/include/mlir/Transforms/InliningUtils.h
The file was modifiedmlir/include/mlir/Dialect/SPIRV/Serialization.h
The file was modifiedmlir/include/mlir/Dialect/Traits.h
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/tools/mlir-tblgen/EnumsGen.cpp
The file was modifiedmlir/include/mlir/IR/Module.h
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/include/mlir/Quantizer/Support/Metadata.h
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
The file was modifiedmlir/include/mlir/Target/ROCDLIR.h
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
Commit 221e661e911af59f01b7b9ba214377daf8f50611 by gardener
Pre-allocate space for results from a regex match that uses 3 match
strings.
That space is 4 StringRefs, not 3, because element 0 of the match always
contains the entire source string.
PiperOrigin-RevId: 273875606
The file was modifiedmlir/lib/IR/Diagnostics.cpp
Commit f5813ff8e1133be1cea20166230e578281e341c3 by gardener
Fix typo in QuantizedType method names
Closes tensorflow/mlir#172
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/172
from kiszk:quantops e27b57eac8f4c6ef7ee6a6f7b497d3e2f56f6798
PiperOrigin-RevId: 273879164
The file was modifiedmlir/include/mlir/Dialect/QuantOps/QuantTypes.h
The file was modifiedmlir/lib/Dialect/QuantOps/IR/QuantTypes.cpp
The file was modifiedmlir/lib/Dialect/QuantOps/IR/TypeParser.cpp
Commit 309b4556d00f531988f34930eedb546512ee619f by gardener
Add test for fix to tablegen for custom folders for ops that return a
single variadic result.
Add missing test for single line fix to `void
OpEmitter::genFolderDecls()` entitled "Fold away reduction over 0
dimensions."
PiperOrigin-RevId: 273880337
The file was modifiedmlir/test/Transforms/test-canonicalize.mlir
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
Commit 5e7959a3531c8019052bae3a84a42a67c5857bc9 by gardener
Use llvm.func to define functions with wrapped LLVM IR function type
This function-like operation allows one to define functions that have
wrapped LLVM IR function type, in particular variadic functions. The
operation was added in parallel to the existing lowering flow, this
commit only switches the flow to use it.
Using a custom function type makes the LLVM IR dialect type system more
consistent and avoids complex conversion rules for functions that
previously had to use the built-in function type instead of a wrapped
LLVM IR dialect type and perform conversions during the analysis.
PiperOrigin-RevId: 273910855
The file was modifiedmlir/lib/Support/JitRunner.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/LateLowering.cpp
The file was modifiedmlir/include/mlir/Conversion/GPUToCUDA/GPUToCUDAPass.h
The file was modifiedmlir/test/Target/nvvmir.mlir
The file was modifiedmlir/test/mlir-cpu-runner/utils.mlir
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
The file was modifiedmlir/test/Target/llvmir.mlir
The file was modifiedmlir/test/Target/rocdl.mlir
The file was modifiedmlir/g3doc/ConversionToLLVMDialect.md
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
The file was modifiedmlir/lib/Target/LLVMIR/ConvertToROCDLIR.cpp
The file was modifiedmlir/test/Target/llvmir-intrinsics.mlir
The file was modifiedmlir/g3doc/Dialects/LLVM.md
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
The file was modifiedmlir/lib/Target/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
The file was modifiedmlir/test/mlir-cpu-runner/simple.mlir
The file was modifiedmlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-nvvm-kernel-to-cubin.mlir
The file was modifiedmlir/lib/Dialect/GPU/CMakeLists.txt
The file was modifiedmlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
Commit cc145706aa57d882b0c863fab29f7e777c1839a0 by gardener
NFC: Cleanup of type checking tests
1. Rename test ops referencing operand to index from 0 consistent with
how we index elsewhere. 2. Don't limit type checking that functions for
all shaped types to only tensors. 3. Don't limit (element) type checking
functions and add tests for scalars. 4. Remove SSA values that don't do
anything.
PiperOrigin-RevId: 273917608
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/IR/traits.mlir
The file was modifiedmlir/test/mlir-tblgen/types.mlir
Commit 82dc6c449211c48473e23883e43395ebbff63b14 by gardener
Mark GPU dialect as illegal when lowering to NVVM.
PiperOrigin-RevId: 273948293
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUDialect.h
Commit ea34c2a7a4eba46a1ab7d81ed6c6159b852510da by gardener
Python bindings: export index_cast
We are now properly enforcing the absence of index elements in memrefs
and tensors. Instead, users are expected to store sized integers and
cast them to index type if necessary. Expose the respective operation to
Python bindings.
PiperOrigin-RevId: 273985856
The file was modifiedmlir/bindings/python/pybind.cpp
The file was modifiedmlir/bindings/python/test/test_py2and3.py
Commit 438dc176b14dca318fb6c69250b1ec12666501d2 by jpienaar
Remove the need to convert operations in regions of operations that have
been replaced.
When an operation with regions gets replaced, we currently require that
all of the remaining nested operations are still converted even though
they are going to be replaced when the rewrite is finished. This cl adds
a tracking for a minimal set of operations that are known to be "dead".
This allows for ignoring the legalization of operations that are won't
survive after conversion.
PiperOrigin-RevId: 274009003
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
The file was modifiedmlir/test/Transforms/test-legalizer-full.mlir
The file was modifiedmlir/test/Transforms/test-legalizer.mlir
Commit 6b1cc3c6eac0f76c6a771cb8dbde4d8b58c34f21 by jpienaar
Add support for canonicalizing callable regions during inlining.
This will allow for inlining newly devirtualized calls, as well as give
a more accurate cost model(when we have one). Currently canonicalization
will only run for nodes that have no child edges, as the child nodes may
be erased during canonicalization. We can support this in the future,
but it requires more intricate deletion tracking.
PiperOrigin-RevId: 274011386
The file was modifiedmlir/test/AffineOps/inlining.mlir
The file was modifiedmlir/lib/Analysis/CallGraph.cpp
The file was modifiedmlir/include/mlir/IR/PatternMatch.h
The file was modifiedmlir/include/mlir/Analysis/CallGraph.h
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
The file was modifiedmlir/lib/Transforms/Inliner.cpp
The file was modifiedmlir/test/Transforms/inlining.mlir
Commit 736f80d0ddd87dcdf165aa39730a4af04a8f71e2 by jpienaar
Add trait for specified shapes matching
PiperOrigin-RevId: 274046434
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/test/mlir-tblgen/types.mlir
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
Commit 28d7f9c052c8cb524e016827e54314946cf0d037 by jpienaar
Add lowering of constant ops to SPIR-V.
The lowering is specified as a pattern and is done only if the result is
a SPIR-V scalar type or vector type. Handling ConstantOp with index
return type needs special handling since SPIR-V dialect does not have
index types. Based on the bitwidth of the attribute value, either i32 or
i64 is chosen. Other constant lowerings are left as a TODO.
PiperOrigin-RevId: 274056805
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.td
The file was addedmlir/test/Conversion/StandardToSPIRV/op_conversion.mlir
The file was removedmlir/test/Dialect/SPIRV/standard_ops_to_spirv.mlir
Commit 4dde19f02473fdec8e047de2488b6b770523077a by jpienaar
Translation to LLVM: check the validity of module-level Ops
Translation to LLVM expects the entry module to have only specific types
of ops that correspond to LLVM IR entities allowed in a module.
Currently those are restricted to functions and globals. Introduce an
additional check at the module level. Inside individual functions, the
check for supported Ops is already performed, but it accepts all LLVM
dialect Ops and wouldn't be immediately applicable at the module level.
PiperOrigin-RevId: 274058651
The file was modifiedmlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
The file was modifiedmlir/lib/Target/LLVMIR/ModuleTranslation.cpp
Commit 08a2ce8a14077b5f39ac196525e16cad513a578b by jpienaar
Standard-to-LLVM conversion: check that operands have LLVM types
In Standard to LLVM dialect conversion, the binary op conversion pattern
implicitly assumed some operands were of LLVM IR dialect type. This is
not necessarily true, for example if the Ops that produce those operands
did not match the existing convresion patterns. Check if all operands
are of LLVM IR dialect type and if not, fail to patch the binary op
pattern.
Closes tensorflow/mlir#168
PiperOrigin-RevId: 274063207
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
Commit b245e9519c3870b3ecaac100b429381aeb5382ca by gardener
NFC: Initialize pass manager option fields inline instead of the class
constructor. PiperOrigin-RevId: 274087577
The file was modifiedmlir/lib/Pass/PassManagerOptions.cpp
Commit 7a7dcc171da1472dcb2ab80cec3de218088796a5 by gardener
Add support for generating reproducers on pass crash and failure.
This cl adds support for generating a .mlir file containing a reproducer
for crashes and failures that happen during pass execution. The
reproducer contains a comment detailing the configuration of the pass
manager(e.g. the textual description of the pass pipeline that the pass
manager was executing), along with the original input module.
Example Output:
// configuration: -pass-pipeline='func(cse, canonicalize), inline'
// note: verifyPasses=false
module {
...
}
PiperOrigin-RevId: 274088134
The file was modifiedmlir/test/lib/Pass/TestPassManager.cpp
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/g3doc/WritingAPass.md
The file was addedmlir/test/Pass/crash-recovery.mlir
The file was modifiedmlir/lib/Pass/PassManagerOptions.cpp
Commit 978b209d3820f4939ef8178bc968288303018b24 by gardener
NFC: Print the generic op form after pass failure.
On failure, the IR is likely to be in an invalid state, meaning the
custom printer for some operations may now crash. Using the generic op
form prevents this from happening.
PiperOrigin-RevId: 274104146
The file was modifiedmlir/lib/Pass/IRPrinting.cpp
Commit 304e44a6b0eab92114761a50d36bbe6cc371ec10 by gardener
LLVM conversion: harden a test to check for LLVM funcs rather than any
funcs
This test was not updated in the original commit that switched to using
LLVM functions since it wasn't broken by that change. FileCheck was able
to match the `func` part of `llvm.func` to the expected pattern and
continue as usual. Make sure the `llvm.` dialect prefix is included in
the expected output.
PiperOrigin-RevId: 274127281
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-funcs.mlir
Commit 00d2a37e32067a6b41d16d605dfeb8637cc4cfbb by gardener
Add unary ops and ExpOp to Standard Dialect.
PiperOrigin-RevId: 274152154
The file was modifiedmlir/include/mlir/IR/OpDefinition.h
The file was modifiedmlir/g3doc/Dialects/Standard.md
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
The file was modifiedmlir/test/IR/core-ops.mlir
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
Commit 7301ac72bc45e0dd9a4fab507d53826e159139b0 by gardener
Rename LLVM::exp and LLVM::fmuladd to LLVM::ExpOP and LLVM::FMulAddOp.
PiperOrigin-RevId: 274154655
The file was modifiedmlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
Commit 47596f534555477ac5cee3b55095af97ca7d7cdb by gardener
Drop obsolete code from std to llvm memref lowering
- dropping what looks like outdated code post some of the previous
updates
Signed-off-by: Uday Bondhugula <uday@polymagelabs.com>
Closes tensorflow/mlir#179
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/179
from bondhugula:llfix 2a72ea441fe1b3924802273ffbe9870afeb90f91
PiperOrigin-RevId: 274158273
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
Commit 71b82bcbf653fff62bf350991eb23fccd8796531 by gardener
LLVM Dialect: introduce llvm.mlir.null operation
Similarly to `llvm.mlir.undef`, this auxiliary operation creates an SSA
value that corresponds to `null` in LLVM IR.  This operation is
necessary to model sizeof(<...>) behavior when allocating memory.
PiperOrigin-RevId: 274158760
The file was modifiedmlir/g3doc/Dialects/LLVM.md
The file was modifiedmlir/test/Dialect/LLVMIR/invalid.mlir
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/test/Target/llvmir.mlir
The file was modifiedmlir/test/Dialect/LLVMIR/roundtrip.mlir
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
Commit 8c2ea320728a381c8b7441990bc9929ff22fae5f by gardener
Emit LLVM IR equivalent of sizeof when lowering alloc operations
Originally, the lowering of `alloc` operations has been computing the
number of bytes to allocate when lowering based on the properties of
MLIR type. This does not take into account type legalization that
happens when compiling LLVM IR down to target assembly. This
legalization can widen the type, potentially leading to out-of-bounds
accesses to `alloc`ed data due to mismatches between address computation
that takes the widening into account and allocation that does not. Use
the LLVM IR's equivalent of `sizeof` to compute the number of bytes to
be allocated:
%0 = getelementptr %type* null, %indexType 0
%1 = ptrtoint %type* %0 to %indexType adapted from
http://nondot.org/sabre/LLVMNotes/SizeOf-OffsetOf-VariableSizedStructs.txt
PiperOrigin-RevId: 274159900
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
The file was modifiedmlir/test/Examples/Toy/Ch5/lowering.toy
Commit a3d084848da3ee5c58e2fe54b5ecadeec3c22c4c by gardener
Add LLVM IR dialect hooks for FP128 and X86_FP80 types
Closes tensorflow/mlir#184
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/184
from schweitzpgi:more-float-types
ca27d00510a86ffc9c79c65fb3a0193b5ea097a0 PiperOrigin-RevId: 274288813
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
The file was modifiedmlir/test/Dialect/LLVMIR/roundtrip.mlir
Commit c2285b619d47ad3e9efc2dcee026dcb8fd77391d by gardener
Add lowering of VectorOps dialect to LLVM to the Linalg LLVM lowering
pass
This fixes an omission that prevents Linalg to lower generic ops regions
operating on ops in the VectorOps dialect. To achieve this we simply
need to `populateVectorToLLVMConversionPatterns` in the conversion.
Relevant tests are added.
PiperOrigin-RevId: 274577325
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/test/Dialect/Linalg/llvm.mlir
Commit 5c5d83afb469b275866cf92eaaabcc2c9ff1775f by gardener
Fix linalg.subview behavior in (partially) static cases.
When the implementation of the strided memref
[RFC](https://groups.google.com/a/tensorflow.org/forum/#!msg/mlir/MaL8m2nXuio/1scRqZa6AQAJ)
landed, linalg started using this type instead of the now retired
!linalg.view.
As static and partially static cases appear, the stride information
needs to be maintained properly. In particular, the result type of the
subview op was generally incorrect.
This CL fixes the issue by computing a return type that: 1. always has
dynamic sizes, which is generally the only correct way to construct a
subview in the absence of data padding and/or code versioning. 2. has
the same strides as the base strided memref.
Point 1. above can be further refined but will needs further analysis
and canonicalization to optimize the particular case where: 1. The base
memref has static size along a given dimension. 2. The subview size can
be statically derived (e.g. after canonicalization). 3. *And* the
subview size is an even divisor of the base memref.
This 3rd constraint is well-known in the case of tiled layouts that
don't assume implicit padding: the boundary tile may be only partial and
has size given by `problem_size % tile_size`.
Tests are updated as appropriate.
PiperOrigin-RevId: 274578624
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/test/Dialect/Linalg/tile.mlir
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/test/Dialect/Linalg/fusion.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
Commit 24c392f21c6ea9d2e1dbe39728e8a2fddb25e740 by gardener
Use single quotes to wrap '@HOST_LDFLAGS@' in LIT config file
ldflags can contain double-quoted paths, so must use single quotes here.
PiperOrigin-RevId: 274581983
The file was modifiedmlir/test/lit.site.cfg.py.in
Commit 96de7091bcac2086fb3be55169ec4e826145c574 by gardener
Allowing replacing non-root operations in DialectConversion.
When dealing with regions, or other patterns that need to generate
temporary operations, it is useful to be able to replace other
operations than the root op being matched. Before this PR, these
operations would still be considered for legalization meaning that the
conversion would either fail, erroneously need to mark these ops as
legal, or add unnecessary patterns.
PiperOrigin-RevId: 274598513
The file was modifiedmlir/test/lib/TestDialect/TestPatterns.cpp
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/Transforms/test-legalizer-full.mlir
Commit f29731d17f469722c73e33b6d503be0ab39cf907 by gardener
NFC: Replace usages of Value::getKind with explicit isa/casts.
It is more idiomatic to use the llvm::cast infrastructure for checking
the type of a value.
PiperOrigin-RevId: 274684945
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/lib/IR/Value.cpp
Commit 300112e135f82b1f6faf8aa2ef266a27f07234de by gardener
Merge Ch3 of the Toy tutorial into chapter 2.
This effectively rewrites Ch.2 to introduce dialects, operations, and
registration instead of deferring to Ch.3. This allows for introducing
the best practices up front(using ODS, registering operations, etc.),
and limits the opaque API to the chapter document instead of the code.
PiperOrigin-RevId: 274724289
The file was addedmlir/examples/toy/Ch2/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch2/invalid.mlir
The file was addedmlir/examples/toy/Ch2/include/toy/Dialect.h
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-2.md
The file was modifiedmlir/examples/toy/Ch2/CMakeLists.txt
The file was addedmlir/examples/toy/Ch2/include/toy/Ops.td
The file was modifiedmlir/examples/toy/Ch2/toyc.cpp
The file was addedmlir/test/Examples/Toy/Ch2/scalar.toy
The file was modifiedmlir/examples/toy/Ch2/mlir/MLIRGen.cpp
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit 98815cfdd935a21e4b7358485aefca6c8a8d77b8 by gardener
AsmPrinter: avoid unused-variable warning
The value defined in a loop was not being used and the function
producing it re-evaluated instead. Use the value to avoid both the
warning and the re-evaluation.
PiperOrigin-RevId: 274794459
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit c50e53c109e24e7926c29633f21e6b01cbd83604 by gardener
Expose mlir::parseType to bindings
Python bindings currently currently provide a makeScalarType function
that constructs one of the predefined types. It was implemented in the
bindings directly to circumvent the absence of standalone type parsing
function. Now that mlir::parseType has been made available, rely on the
core parsing procedure to construct types from strings in the bindings.
This changes includes a library reshuffling that splits out "CoreAPIs"
implementing the binding helper APIs into a separate library and makes
that dependent on the Parser library.
PiperOrigin-RevId: 274794516
The file was modifiedmlir/include/mlir-c/Core.h
The file was modifiedmlir/lib/EDSC/CoreAPIs.cpp
The file was modifiedmlir/lib/EDSC/CMakeLists.txt
The file was modifiedmlir/bindings/python/pybind.cpp
The file was modifiedmlir/bindings/python/test/test_py2and3.py
Commit abf5c60af9d35284263b05f7a00c3974d553d467 by gardener
Add conversion for splat of vectors of 2+D
This CL adds a missing lowering for splat of multi-dimensional vectors.
Additional support is also added to the runtime utils library to allow
printing memrefs with such vectors.
PiperOrigin-RevId: 274794723
The file was modifiedmlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/mlir-cpu-runner/utils.mlir
The file was modifiedmlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
Commit 31c5a41a30a7d4dc6874a684c6c6c21f1d36ba63 by gardener
Consistent use of int in mlir_runner_utils.cpp
This should fix the OSS build by only using int in template types.
PiperOrigin-RevId: 274843584
The file was modifiedmlir/test/mlir-cpu-runner/mlir_runner_utils.cpp
Commit 4e85dafeddc14b5ddca8e819f04dbdeeac57bbfc by gardener
Fix typos in LangRef and OpDefinitions
PiperOrigin-RevId: 274848361
The file was modifiedmlir/g3doc/OpDefinitions.md
The file was modifiedmlir/g3doc/LangRef.md
Commit cd45b0c8d9f0eac7e76a892a2f2e993b340e90b5 by gardener
Update Chapter 3 to demonstrate pattern match and rewrite optimizations
This is using Table-driven Declarative Rewrite Rules (DRR), the previous
version of the tutorial only showed the C++ patterns.
Closes tensorflow/mlir#187
PiperOrigin-RevId: 274852321
The file was modifiedmlir/test/Examples/Toy/Ch3/scalar.toy
The file was addedmlir/examples/toy/Ch3/mlir/ToyCombine.cpp
The file was modifiedmlir/examples/toy/Ch3/include/toy/Dialect.h
The file was removedmlir/examples/toy/Ch3/mlir/ToyDialect.cpp
The file was modifiedmlir/examples/toy/Ch3/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch3/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch3/include/toy/AST.h
The file was modifiedmlir/examples/toy/Ch3/parser/AST.cpp
The file was modifiedmlir/examples/toy/Ch3/toyc.cpp
The file was addedmlir/examples/toy/Ch3/mlir/ToyCombine.td
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-3.md
The file was modifiedmlir/examples/toy/Ch3/include/toy/Lexer.h
The file was addedmlir/examples/toy/Ch3/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch3/codegen.toy
The file was addedmlir/examples/toy/Ch3/include/toy/Ops.td
The file was modifiedmlir/test/Examples/Toy/Ch3/invalid.mlir
Commit f16e89f841c122f0c7df16bfcbd1751878fed3dc by gardener
Fix typos in InferTypeOpInterface.
PiperOrigin-RevId: 274866986
The file was modifiedmlir/include/mlir/Analysis/InferTypeOpInterface.td
Commit 2903594635584076cda84df337c0ace06e78e991 by gardener
Fix minor typos
PiperOrigin-RevId: 274892763
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-1.md
Commit e03e1519833439e57f2834b2717b35eba501a73e by gardener
[spirv] Add support for SpecId decoration on spv.specConstant
The SpecId decoration is the handle for providing external
specialization. Similar to descriptor set and binding on global
variables, we directly bake it into assembly parsing and printing.
PiperOrigin-RevId: 274893879
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/spec-constant.mlir
The file was modifiedmlir/test/Dialect/SPIRV/structure-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
Commit 1f83316a6be64e60b42b9032f490b26a9151e7e1 by gardener
Fix typo
PiperOrigin-RevId: 274894550
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-2.md
Commit 050241ed3d1d941744d5bf4f9aeb7afee338c852 by gardener
NFC: Split out ToyOpsIncGen into a separate CMakeLists.txt.
This fixes an issue with make where it fails to properly handle the
dependency ordering.
PiperOrigin-RevId: 274897702
The file was modifiedmlir/examples/toy/Ch3/CMakeLists.txt
The file was addedmlir/examples/toy/Ch2/include/toy/CMakeLists.txt
The file was addedmlir/examples/toy/Ch3/include/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch2/CMakeLists.txt
The file was addedmlir/examples/toy/Ch2/include/CMakeLists.txt
The file was addedmlir/examples/toy/Ch3/include/toy/CMakeLists.txt
Commit c0b11f5cf4374ff846d0de41be35a83a07f391ec by gardener
Fix typos
PiperOrigin-RevId: 274902838
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-3.md
Commit 2fc29f1eabc4ea58407cfed47e4288ca7e27e004 by gardener
Fix typo
PiperOrigin-RevId: 274905193
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-3.md
Commit 950979745aea77f75015d5cd629ac8a3621a50fa by gardener
Add support for OpBitwiseOr, OpBitwiseXor, and OpBitwiseAnd in SPIR-V
dialect.
PiperOrigin-RevId: 274935374
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was addedmlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
The file was addedmlir/test/Dialect/SPIRV/bit-ops.mlir
Commit a08482c1ad67002be80fefd2d0f8116941f37d02 by gardener
NFC: Various code cleanups for Ch3.
This change refactors the toyc driver to be much cleaner and easier to
extend. It also cleans up a few comments in the combiner.
PiperOrigin-RevId: 274973808
The file was modifiedmlir/examples/toy/Ch3/toyc.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/ToyCombine.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/ToyCombine.td
Commit 98f64b4da1afb7ca2c96de75d5c9cbe628ce3976 by gardener
NFC: Remove NoSideEffect traits from all ops except for ConstantOp.
These traits are added in chapter 3 when we begin discussion
optimization on the toy operations.
PiperOrigin-RevId: 274974010
The file was modifiedmlir/examples/toy/Ch2/include/toy/Ops.td
Commit b843cc5d5af10e35081751866d4fc216a0b5e5e4 by gardener
Implement simple loop-invariant-code-motion based on dialect interfaces.
PiperOrigin-RevId: 275004258
The file was addedmlir/include/mlir/Transforms/SideEffectsInterface.h
The file was modifiedmlir/include/mlir/Dialect/LoopOps/LoopOps.td
The file was modifiedmlir/lib/Transforms/LoopInvariantCodeMotion.cpp
The file was addedmlir/include/mlir/Transforms/LoopLikeInterface.h
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/include/mlir/IR/Block.h
The file was addedmlir/lib/Transforms/AffineLoopInvariantCodeMotion.cpp
The file was modifiedmlir/test/Transforms/loop-invariant-code-motion.mlir
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.h
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOps.td
The file was addedmlir/include/mlir/Transforms/LoopLikeInterface.td
The file was modifiedmlir/include/mlir/Transforms/Passes.h
The file was modifiedmlir/include/mlir/Dialect/LoopOps/LoopOps.h
The file was modifiedmlir/lib/Dialect/LoopOps/LoopOps.cpp
The file was addedmlir/test/Transforms/affine-loop-invariant-code-motion.mlir
Commit 2c533e29c23cea23dc4d38c60f5e207d1848b1c9 by gardener
Fix typo in VectorOps.td
PiperOrigin-RevId: 275025323
The file was modifiedmlir/include/mlir/Dialect/VectorOps/VectorOps.td
Commit f1f9e3b8d18f305fd5eea2f209e323772f3ba76d by gardener
Fix CMake configuration after introduction of LICM and LoopLikeInterface
b843cc5d5a introduced a new op LICM transformation and a LoopLike
interface, but missed the CMake aspects of it. This should fix the
build.
PiperOrigin-RevId: 275038533
The file was modifiedmlir/include/mlir/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/LoopOps/CMakeLists.txt
The file was modifiedmlir/lib/Transforms/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/AffineOps/CMakeLists.txt
The file was addedmlir/include/mlir/Transforms/CMakeLists.txt
Commit dfe09cc621ec11f36ec2e36f4fd01fce8ceec87f by gardener
Add support for PatternRewriter::eraseOp.
This hook is useful when an operation is known to be dead, and no
replacement values make sense.
PiperOrigin-RevId: 275052756
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/include/mlir/IR/PatternMatch.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h
The file was modifiedmlir/lib/Transforms/LowerAffine.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/lib/Transforms/LowerVectorTransfers.cpp
The file was modifiedmlir/lib/IR/PatternMatch.cpp
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/test/lib/TestDialect/TestPatterns.cpp
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
Commit e7b49eef1d6ac06d49ef7bdd7187541afcea40a8 by gardener
Allow for remapping argument to a Value in SignatureConversion.
The current SignatureConversion framework (part of DialectConversion)
allows remapping input arguments to a function from 1->0, 1->1 or
1->many arguments during conversion. Another case is where the argument
itself is dropped, but it's use are remapped to another Value*.
An example of this is: The Vulkan/SPIR-V spec requires entry functions
to be of type void(void). The GPU -> SPIR-V conversion implemented this
without having the DialectConversion framework track the remapping that
lead to some undefined behavior. The changes here addresses that.
PiperOrigin-RevId: 275059656
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
The file was modifiedmlir/g3doc/DialectConversion.md
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h
Commit d2f0f847af31009203215b158a5363f70c0b4d8d by gardener
Support custom accumulator provided as region to gpu.all_reduce.
In addition to specifying the type of accumulation through the 'op'
attribute, the accumulation can now also be specified as arbitrary code
region.
Adds a gpu.yield op to specify the result of the accumulation.
Also support more types (integers) and accumulations (mul).
PiperOrigin-RevId: 275065447
The file was modifiedmlir/test/Dialect/GPU/invalid.mlir
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/test/Dialect/GPU/ops.mlir
The file was removedmlir/test/mlir-cuda-runner/all-reduce.mlir
The file was modifiedmlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
The file was addedmlir/test/mlir-cuda-runner/all-reduce-op.mlir
The file was addedmlir/test/mlir-cuda-runner/all-reduce-region.mlir
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
Commit 54a847347040ab50a6c17881998f1cb3e899f1e0 by gardener
Makes spv.module generated by GPU->SPIRV conversion spec compliant
Makes the spv.module generated by the GPU to SPIR-V conversion SPIR-V
spec compliant (validated using spirv-val from Vulkan tools).
1) Separate out the VulkanLayoutUtils from
DecorateSPIRVCompositeTypeLayoutPass to make it reusable within the Type
converter in SPIR-V lowering infrastructure. This is used to compute the
layout of the !spv.struct used in global variable type description. 2)
Set the capabilities of the spv.module to Shader (needed for use of
Logical Memory Model, and the extensions to
SPV_KHR_storage_buffer_storage_class for use of Storage Buffer)
PiperOrigin-RevId: 275081486
The file was addedmlir/include/mlir/Dialect/SPIRV/LayoutUtils.h
The file was modifiedmlir/test/Conversion/GPUToSPIRV/load_store.mlir
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/CMakeLists.txt
The file was addedmlir/lib/Dialect/SPIRV/LayoutUtils.cpp
The file was modifiedmlir/test/Conversion/GPUToSPIRV/simple.mlir
Commit a3726a13f73040063786ced52ea6ba9c6c54f859 by gardener
NFC: Update VectorOrTensor -> Shaped
This was missed when the type was renamed.
PiperOrigin-RevId: 275082588
The file was modifiedmlir/lib/IR/TypeDetail.h
Commit e88dbc8c955a9c17d5ef444c716633752ced338c by gardener
Update comments in ast.toy
PiperOrigin-RevId: 275084969
The file was modifiedmlir/test/Examples/Toy/Ch3/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch1/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch2/ast.toy
Commit 3940b90d84d7239f2bc849068df97f1d248554fe by gardener
Update Chapter 4 of the Toy tutorial
This Chapter now introduces and makes use of the Interface concept in
MLIR to demonstrate ShapeInference. END_PUBLIC
Closes tensorflow/mlir#191
PiperOrigin-RevId: 275085151
The file was addedmlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
The file was modifiedmlir/test/Examples/Toy/Ch4/scalar.toy
The file was modifiedmlir/examples/toy/Ch4/mlir/MLIRGen.cpp
The file was modifiedmlir/test/Examples/Toy/Ch4/codegen.toy
The file was modifiedmlir/examples/toy/Ch4/include/toy/Passes.h
The file was modifiedmlir/test/Examples/Toy/Ch4/ast.toy
The file was modifiedmlir/examples/toy/Ch4/toyc.cpp
The file was modifiedmlir/lib/Transforms/Inliner.cpp
The file was addedmlir/examples/toy/Ch4/mlir/DeadFunctionEliminationPass.cpp
The file was modifiedmlir/examples/toy/Ch4/include/toy/Lexer.h
The file was addedmlir/examples/toy/Ch4/include/toy/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch4/CMakeLists.txt
The file was removedmlir/test/Examples/Toy/Ch4/trivialReshape.toy
The file was removedmlir/test/Examples/Toy/Ch4/transpose_transpose.toy
The file was modifiedmlir/include/mlir/Transforms/Passes.h
The file was modifiedmlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
The file was addedmlir/examples/toy/Ch4/include/toy/Ops.td
The file was modifiedmlir/examples/toy/Ch4/include/toy/Dialect.h
The file was addedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was addedmlir/examples/toy/Ch4/mlir/ToyCombine.td
The file was modifiedmlir/examples/toy/Ch4/include/toy/AST.h
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-4.md
The file was addedmlir/examples/toy/Ch4/include/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch4/mlir/ToyCombine.cpp
The file was removedmlir/examples/toy/Ch4/mlir/ToyDialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch4/invalid.mlir
Commit ab79c25d646ed7ef214b19042d49f15425c49818 by gardener
Code cleanups on Ch.4
This change performs general cleanups of the implementation of ch.4 and
fixes some bugs. For example, the operations currently don't inherit
from the shape inference interface.
PiperOrigin-RevId: 275089914
The file was addedmlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.h
The file was modifiedmlir/examples/toy/Ch4/include/toy/Dialect.h
The file was modifiedmlir/examples/toy/Ch4/mlir/DeadFunctionEliminationPass.cpp
The file was modifiedmlir/examples/toy/Ch4/include/toy/Ops.td
The file was modifiedmlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
The file was modifiedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
Commit a245023c1ceff40aa565104e27c2a9cc23b5ef46 by gardener
Add ComplexType to TableGen with Tensor support
Create a ComplexType for table gen references. Include an AnyComplex
type to check whether the resulting tensor can be complex. Expand
tensors to allow complex types.
PiperOrigin-RevId: 275144804
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/include/mlir/IR/StandardTypes.h
The file was modifiedmlir/g3doc/LangRef.md
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/mlir-tblgen/types.mlir
Commit 7053a30f4b304f7f779c11eb3aa9a50bdc231ce9 by gardener
Fix typo in tutorial.
PiperOrigin-RevId: 275147795
The file was modifiedmlir/examples/toy/Ch4/mlir/ToyCombine.td
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-3.md
The file was modifiedmlir/examples/toy/Ch3/mlir/ToyCombine.td
Commit 7045471913e7211fc75b8f073cc0ed4a90e902e2 by gardener
Add support for inlining toy call operations.
The GenericCallOp needed to have the CallOpInterface to be picked up by
the inliner. This also adds a CastOp to perform shape casts that are
generated during inlining. The casts generated by the inliner will be
folded away after shape inference.
PiperOrigin-RevId: 275150438
The file was modifiedmlir/examples/toy/Ch4/include/toy/Ops.td
The file was modifiedmlir/examples/toy/Ch4/mlir/ShapeInferencePass.cpp
The file was modifiedmlir/examples/toy/Ch4/CMakeLists.txt
The file was addedmlir/test/Examples/Toy/Ch4/shape_inference.mlir
The file was modifiedmlir/examples/toy/Ch4/toyc.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/ToyCombine.cpp
Commit 1ba9bb05078aee74420bc64394a20c782f13a125 by gardener
Add Ch.5 of the toy tutorial.
This chapter adds a partial lowering of toy operations, all but PrintOp,
to a combination of the Affine and Std dialects. This chapter focuses on
introducing the conversion framework, the benefits of partial lowering,
and how easily dialects may co-exist in the IR.
PiperOrigin-RevId: 275150649
The file was addedmlir/examples/toy/Ch5/include/toy/Ops.td
The file was removedmlir/test/Examples/Toy/Ch5/transpose_transpose.toy
The file was modifiedmlir/examples/toy/Ch5/mlir/ShapeInferencePass.cpp
The file was removedmlir/test/Examples/Toy/Ch5/lowering.toy
The file was modifiedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/MLIRGen.cpp
The file was addedmlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.h
The file was modifiedmlir/examples/toy/Ch5/include/toy/AST.h
The file was modifiedmlir/examples/toy/Ch3/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch5/include/toy/Dialect.h
The file was modifiedmlir/examples/toy/Ch5/toyc.cpp
The file was modifiedmlir/examples/toy/Ch5/CMakeLists.txt
The file was modifiedmlir/examples/toy/Ch4/mlir/MLIRGen.cpp
The file was removedmlir/examples/toy/Ch5/include/toy/Lowering.h
The file was removedmlir/examples/toy/Ch5/mlir/LateLowering.cpp
The file was removedmlir/test/Examples/Toy/Ch5/trivialReshape.toy
The file was modifiedmlir/examples/toy/Ch5/include/toy/Lexer.h
The file was modifiedmlir/examples/toy/Ch5/include/toy/Passes.h
The file was addedmlir/examples/toy/Ch5/include/toy/CMakeLists.txt
The file was removedmlir/examples/toy/Ch5/mlir/ToyDialect.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/ToyCombine.cpp
The file was addedmlir/examples/toy/Ch5/mlir/DeadFunctionEliminationPass.cpp
The file was modifiedmlir/test/Examples/Toy/Ch5/codegen.toy
The file was addedmlir/test/Examples/Toy/Ch5/affine-lowering.mlir
The file was modifiedmlir/test/Examples/Toy/Ch5/invalid.mlir
The file was addedmlir/test/Examples/Toy/Ch5/shape_inference.mlir
The file was modifiedmlir/test/Examples/Toy/Ch5/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch5/scalar.toy
The file was addedmlir/examples/toy/Ch5/include/CMakeLists.txt
The file was addedmlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td
The file was addedmlir/examples/toy/Ch5/mlir/ToyCombine.td
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-5.md
The file was addedmlir/examples/toy/Ch5/mlir/LowerToAffineLoops.cpp
The file was removedmlir/examples/toy/Ch5/mlir/EarlyLowering.cpp
The file was addedmlir/examples/toy/Ch5/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch4/ast.toy
Commit 0e3efb32c6fc38de789d766eec05fc698c129c33 by gardener
[spirv] Implement inliner interface
We just need to implement a few interface hooks to
DialectInlinerInterface and CallOpInterface to gain the benefits of an
inliner. :)
Right now only supports some trivial cases:
* Inlining single block with spv.Return/spv.ReturnValue
* Inlining multi block with spv.Return
* Inlining spv.selection/spv.loop without return ops
More advanced cases will require block argument and Phi support.
PiperOrigin-RevId: 275151132
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was addedmlir/test/Dialect/SPIRV/Transforms/inlining.mlir
Commit bdc250c5a744e95a7d0ddd283c6b19c564c725a5 by gardener
Fix invalid transpose in example and add proper verification.
The transpose in the example had the same result type as its input,
which is incorrect.
PiperOrigin-RevId: 275186568
The file was modifiedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch3/include/toy/Ops.td
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-5.md
The file was modifiedmlir/examples/toy/Ch5/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch5/affine-lowering.mlir
The file was modifiedmlir/examples/toy/Ch3/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch2/mlir/Dialect.cpp
The file was modifiedmlir/examples/toy/Ch5/include/toy/Ops.td
The file was modifiedmlir/examples/toy/Ch2/include/toy/Ops.td
The file was modifiedmlir/examples/toy/Ch4/include/toy/Ops.td
Commit 1358df19ca73165cdbd64d099cb5c7ccfd23e477 by gardener
Add LLVM_DEBUG in RewritersGen.cpp and Pattern.cpp
It's usually hard to understand what went wrong if mlir-tblgen crashes
on some input. This CL adds a few useful LLVM_DEBUG statements so that
we can use mlir-tblegn -debug to figure out the culprit for a crash.
PiperOrigin-RevId: 275253532
The file was modifiedmlir/include/mlir/TableGen/Pattern.h
The file was modifiedmlir/lib/TableGen/Pattern.cpp
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
Commit 603117b2d62b320e86d3452fa0b9f7b00d125574 by gardener
Fix RewriterGen to support using NativeCodeCall as auxiliary pattern
NativeCodeCall is handled differently than normal op creation in
RewriterGen
(because its flexibility). It will only be materialized to output stream
if it is used. But when using it for auxiliary patterns, we still want
the side effect even if it is not replacing matched root op's results.
PiperOrigin-RevId: 275265467
The file was modifiedmlir/test/lib/TestDialect/TestPatterns.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
The file was modifiedmlir/test/mlir-tblgen/pattern.mlir
Commit 23d21af65c467468743711a08a5719ecd866ee6c by gardener
[DRR] Allow capturing and referencing no-result ops
Previously when we bind a symbol to an op in DRR, it means to capture
the op's result(s) and later references will be expanded to result(s).
This means for ops without result, we are replacing the symbol with
nothing. This CL treats non-result op capturing and referencing as a
special case to mean the op itself.
PiperOrigin-RevId: 275269702
The file was modifiedmlir/test/lib/TestDialect/TestPatterns.cpp
The file was modifiedmlir/lib/TableGen/Pattern.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/mlir-tblgen/pattern.mlir
Commit 6ebc7318b0137961cf5ad30b2c47589bf8d2fbee by gardener
Use a SmallVector instead of an ArrayRef to materialize a temporary
local array
This pattern is error prone and unfortunately none of the sanitizer is
catching it at the moment.
Fixes tensorflow/mlir#192
Closes tensorflow/mlir#193
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/193
from joker-eph:fix_array_ref 8092252e64c426c6a8a790b7638f847bea4818b1
PiperOrigin-RevId: 275280201
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
Commit 10039d04e279d7b63fecf2046a07c6d8bbba2b28 by gardener
Rename LoopNestBuilder to AffineLoopNestBuilder - NFC
PiperOrigin-RevId: 275310747
The file was modifiedmlir/include/mlir/EDSC/Builders.h
The file was modifiedmlir/lib/Transforms/LowerVectorTransfers.cpp
The file was modifiedmlir/test/mlir-tblgen/reference-impl.td
The file was modifiedmlir/g3doc/Tutorials/Linalg/DeclarativeBuilders.md
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/bindings/python/pybind.cpp
The file was modifiedmlir/lib/EDSC/Builders.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Utils/Utils.h
Commit 057dc41bf6e91f5962060505ad53f72c0f6b96f7 by gardener
Allow '_' when pretty printing dialect symbols
'_' is used frequently enough as the separator of words in symbols. We
should allow it in dialect symbols when considering pretty printing.
Also updated LangRef.md regarding pretty form.
PiperOrigin-RevId: 275312494
The file was modifiedmlir/g3doc/LangRef.md
The file was modifiedmlir/test/IR/parser.mlir
The file was modifiedmlir/test/Dialect/LLVMIR/roundtrip.mlir
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit a560505d1adf751edfffc1cfc3c5d5e5beaf9331 by gardener
[spirv] Add a canonicalization pattern for spv.selection.
Add a canonicalization pattern for spv.selection operation. Convert
spv.selection operation to spv.Select based on simple pattern.
Closes tensorflow/mlir#183
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/183
from denis0x0D:sandbox/canon_select
43d04d923272dd60b9da39f70bdbc51a5168db62 PiperOrigin-RevId: 275312748
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/test/Dialect/SPIRV/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
Commit 5b03e692f6716ff4fcc4ae0887d1792562456f4b by gardener
Decouple Linalg promotion from Linalg tiling - NFC
This CL creates a new Linalg promotion pass that operates on SubViewOp
and decouples it from Linalg tiling. This is mostly moving code around.
PiperOrigin-RevId: 275329213
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.h
The file was modifiedmlir/test/Dialect/Linalg/promote.mlir
The file was addedmlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
The file was modifiedmlir/test/mlir-cpu-runner/linalg_integration_test.mlir
The file was modifiedmlir/lib/Dialect/Linalg/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Linalg/Utils/Utils.h
Commit 0372eb413f1cf917106562be35c633ae428f2973 by gardener
Add Ch.6 of the Toy tutorial.
This chapters introduces the notion of a full conversion, and adds
support for lowering down to the LLVM dialect, LLVM IR, and thus code
generation.
PiperOrigin-RevId: 275337786
The file was addedmlir/test/Examples/Toy/Ch6/invalid.mlir
The file was addedmlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
The file was addedmlir/examples/toy/Ch6/include/toy/CMakeLists.txt
The file was addedmlir/test/Examples/Toy/Ch6/llvm-lowering.mlir
The file was addedmlir/examples/toy/Ch6/include/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was addedmlir/examples/toy/Ch6/mlir/ToyCombine.td
The file was addedmlir/examples/toy/Ch6/include/toy/MLIRGen.h
The file was addedmlir/examples/toy/Ch6/mlir/Dialect.cpp
The file was addedmlir/examples/toy/Ch6/mlir/ToyCombine.cpp
The file was addedmlir/test/Examples/Toy/Ch6/scalar.toy
The file was addedmlir/examples/toy/Ch6/CMakeLists.txt
The file was addedmlir/examples/toy/Ch6/parser/AST.cpp
The file was addedmlir/test/Examples/Toy/Ch6/shape_inference.mlir
The file was addedmlir/examples/toy/Ch6/mlir/LowerToAffineLoops.cpp
The file was addedmlir/examples/toy/Ch6/include/toy/AST.h
The file was addedmlir/examples/toy/Ch6/mlir/DeadFunctionEliminationPass.cpp
The file was addedmlir/examples/toy/Ch6/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/CMakeLists.txt
The file was addedmlir/examples/toy/Ch6/include/toy/Ops.td
The file was addedmlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td
The file was modifiedmlir/test/CMakeLists.txt
The file was addedmlir/test/Examples/Toy/Ch6/codegen.toy
The file was addedmlir/examples/toy/Ch6/include/toy/Parser.h
The file was addedmlir/examples/toy/Ch6/mlir/ShapeInferencePass.cpp
The file was addedmlir/test/Examples/Toy/Ch6/ast.toy
The file was addedmlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.h
The file was addedmlir/examples/toy/Ch6/include/toy/Dialect.h
The file was addedmlir/examples/toy/Ch6/include/toy/Lexer.h
The file was addedmlir/examples/toy/Ch6/toyc.cpp
The file was addedmlir/g3doc/Tutorials/Toy/Ch-6.md
The file was addedmlir/test/Examples/Toy/Ch6/affine-lowering.mlir
The file was addedmlir/examples/toy/Ch6/include/toy/Passes.h
Commit dae0ae6879122b72e8e46fd6146928f94b3162e9 by gardener
NFC: Delete the Linalg tutorial.
This part of the tutorial is now covered by a new flow in Toy. This also
removes a point of confusion as there is also a proper Linalg dialect.
PiperOrigin-RevId: 275338933
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/Types.h
The file was removedmlir/examples/Linalg/Linalg3/Example.cpp
The file was removedmlir/examples/Linalg/Linalg3/lib/TensorOps.cpp
The file was removedmlir/examples/Linalg/Linalg1/TestHarness.h
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/LLVMIntrinsics.h
The file was removedmlir/examples/Linalg/Linalg2/include/linalg2/TensorOps-inl.h
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/Intrinsics.h
The file was removedmlir/examples/Linalg/Linalg3/include/linalg3/Analysis.h
The file was modifiedmlir/examples/CMakeLists.txt
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/RangeOp.h
The file was removedmlir/examples/Linalg/Linalg1/lib/Dialect.cpp
The file was removedmlir/examples/Linalg/Linalg3/Execution.cpp
The file was removedmlir/g3doc/Tutorials/Linalg/LLVMConversion.md
The file was removedmlir/examples/Linalg/Linalg2/lib/CMakeLists.txt
The file was removedmlir/g3doc/Tutorials/Linalg/Ch-1.md
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/Dialect.h
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/Passes.h
The file was removedmlir/examples/Linalg/Linalg3/Conversion.cpp
The file was removedmlir/examples/Linalg/Linalg3/include/linalg3/ConvertToLLVMDialect.h
The file was removedmlir/examples/Linalg/CMakeLists.txt
The file was removedmlir/examples/Linalg/Linalg3/include/linalg3/LoadStoreOps.h
The file was removedmlir/examples/Linalg/Linalg2/CMakeLists.txt
The file was removedmlir/examples/Linalg/Linalg2/lib/TensorOps.cpp
The file was removedmlir/examples/Linalg/Linalg1/lib/DialectConstruction.cpp
The file was removedmlir/examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
The file was removedmlir/examples/Linalg/Linalg3/lib/Transforms.cpp
The file was removedmlir/examples/Linalg/Linalg2/Example.cpp
The file was removedmlir/examples/Linalg/Linalg2/include/linalg2/Transforms.h
The file was removedmlir/examples/Linalg/Linalg3/lib/CMakeLists.txt
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/ConvertToLLVMDialect.h
The file was removedmlir/examples/Linalg/Linalg2/include/linalg2/Ops.h
The file was removedmlir/examples/Linalg/Linalg3/include/linalg3/Transforms.h
The file was addedmlir/g3doc/EDSC.md
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/Analysis.h
The file was removedmlir/examples/Linalg/Linalg1/lib/DialectRegistration.cpp
The file was removedmlir/examples/Linalg/Linalg1/lib/ViewType.cpp
The file was removedmlir/examples/Linalg/Linalg2/include/linalg2/Intrinsics.h
The file was removedmlir/g3doc/Tutorials/Linalg/DeclarativeBuilders.md
The file was removedmlir/examples/Linalg/Linalg4/Example.cpp
The file was removedmlir/examples/Linalg/Linalg1/lib/Common.cpp
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/Ops.h
The file was removedmlir/examples/Linalg/Linalg1/lib/SliceOp.cpp
The file was removedmlir/examples/Linalg/Linalg3/lib/LoadStoreOps.cpp
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/RangeType.h
The file was removedmlir/examples/Linalg/Linalg1/lib/Analysis.cpp
The file was removedmlir/examples/Linalg/Linalg3/include/linalg3/TensorOps-inl.h
The file was modifiedmlir/test/CMakeLists.txt
The file was removedmlir/examples/Linalg/Linalg4/lib/CMakeLists.txt
The file was removedmlir/examples/Linalg/Linalg1/lib/Utils.cpp
The file was removedmlir/g3doc/Tutorials/Linalg/Ch-2.md
The file was removedmlir/examples/Linalg/Linalg4/include/linalg4/Transforms.h
The file was removedmlir/examples/Linalg/Linalg3/include/linalg3/Ops.h
The file was removedmlir/examples/Linalg/Linalg4/CMakeLists.txt
The file was removedmlir/test/Examples/Linalg/Linalg1.mlir
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/ViewOp.h
The file was removedmlir/examples/Linalg/Linalg2/lib/DialectConstruction.cpp
The file was removedmlir/examples/Linalg/Linalg4/lib/Transforms.cpp
The file was removedmlir/examples/Linalg/Linalg3/lib/DialectConstruction.cpp
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/Common.h
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/SliceOp.h
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/Utils.h
The file was removedmlir/examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
The file was removedmlir/examples/Linalg/Linalg3/include/linalg3/Intrinsics.h
The file was removedmlir/examples/Linalg/Linalg1/include/linalg1/ViewType.h
The file was removedmlir/examples/Linalg/Linalg3/include/linalg3/TensorOps.h
The file was removedmlir/examples/Linalg/Linalg3/lib/Analysis.cpp
The file was removedmlir/examples/Linalg/Linalg1/lib/ViewOp.cpp
The file was removedmlir/examples/Linalg/Linalg1/CMakeLists.txt
The file was removedmlir/examples/Linalg/Linalg2/lib/Transforms.cpp
The file was removedmlir/examples/Linalg/Linalg1/lib/CMakeLists.txt
The file was removedmlir/examples/Linalg/Linalg1/lib/RangeOp.cpp
The file was removedmlir/examples/Linalg/Linalg2/include/linalg2/Analysis.h
The file was removedmlir/examples/Linalg/Linalg3/CMakeLists.txt
The file was removedmlir/examples/Linalg/Linalg2/include/linalg2/TensorOps.h
Commit b65c8bb5d6ab418bb3fcd0302aee19d3615d90f1 by gardener
Add EDSC support for loop.for operations
This CL adds support for loop.for operations in EDSC and adds a test.
This will be used in a followup commit to implement lowering of
vector_transfer ops so that it works more generally and is not subject
to affine constraints.
PiperOrigin-RevId: 275349796
The file was modifiedmlir/lib/EDSC/CMakeLists.txt
The file was modifiedmlir/include/mlir/EDSC/Builders.h
The file was modifiedmlir/lib/EDSC/Builders.cpp
The file was modifiedmlir/g3doc/EDSC.md
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/bindings/python/pybind.cpp
Commit 6090643877fde4d7f00c25e0d78e1f7eec4f3cdb by gardener
Introduce a wrapper around ConversionPattern that operates on the
derived class
Analogous to OpRewritePattern, this makes writing conversion patterns
more convenient.
PiperOrigin-RevId: 275349854
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
Commit 575405f4d6762830c1c4520569de4e4ed3c8eed5 by gardener
Automated rollback of commit b65c8bb5d6ab418bb3fcd0302aee19d3615d90f1
PiperOrigin-RevId: 275370861
The file was modifiedmlir/lib/EDSC/Builders.cpp
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/lib/EDSC/CMakeLists.txt
The file was modifiedmlir/g3doc/EDSC.md
The file was modifiedmlir/bindings/python/pybind.cpp
The file was modifiedmlir/include/mlir/EDSC/Builders.h
Commit 2acc220f17bacbf933d024a68385a909b44352fd by gardener
NFC: Remove trivial builder get methods.
These don't add any value, and some are even more restrictive than the
respective static 'get' method.
PiperOrigin-RevId: 275391240
The file was modifiedmlir/examples/toy/Ch5/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/Dialect.cpp
The file was modifiedmlir/lib/Analysis/LoopAnalysis.cpp
The file was modifiedmlir/lib/IR/FunctionSupport.cpp
The file was modifiedmlir/lib/Transforms/LoopTiling.cpp
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/lib/Dialect/VectorOps/VectorOps.cpp
The file was modifiedmlir/lib/IR/Function.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/lib/Transforms/PipelineDataTransfer.cpp
The file was modifiedmlir/lib/IR/Builders.cpp
The file was modifiedmlir/lib/Transforms/LoopFusion.cpp
The file was modifiedmlir/examples/toy/Ch2/mlir/Dialect.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/lib/Transforms/LoopUnrollAndJam.cpp
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/lib/Transforms/Vectorize.cpp
The file was modifiedmlir/examples/toy/Ch4/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch6/mlir/MLIRGen.cpp
The file was modifiedmlir/lib/Transforms/Utils/Utils.cpp
The file was modifiedmlir/include/mlir/Dialect/AffineOps/AffineOpsBase.td
The file was modifiedmlir/examples/toy/Ch2/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/MLIRGen.cpp
The file was modifiedmlir/include/mlir/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.h
The file was modifiedmlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
The file was modifiedmlir/unittests/Dialect/SPIRV/SerializationTest.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
The file was modifiedmlir/examples/toy/Ch6/mlir/Dialect.cpp
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/include/mlir/IR/Builders.h
Commit fe0ee32da537f94602275635a637e0b5ac4ef7cd by gardener
Add gpu.barrier op to synchronize invocations of a local workgroup.
Adding gen table for rewrite patterns from GPU to NVVM dialect.
Copy missing op documentation from GPUOps.td to GPU.md.
PiperOrigin-RevId: 275419588
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
The file was modifiedmlir/test/Dialect/GPU/ops.mlir
The file was modifiedmlir/g3doc/Dialects/GPU.md
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
The file was addedmlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td
The file was modifiedmlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
Commit 234b8e85ba324a8dfb67ba9e29f8f71975c0c2c0 by gardener
Add documentation on restrictions to dialect conversion rewrites
PiperOrigin-RevId: 275435593
The file was modifiedmlir/g3doc/DialectConversion.md
Commit 3622e1833fa682faf890f8258923ab2f1030c953 by gardener
Use StrEnumAttr for gpu.allreduce op instead of StringAttr to better
encode constraints.
PiperOrigin-RevId: 275448372
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
The file was modifiedmlir/test/Dialect/GPU/invalid.mlir
Commit 3e3ab380219985e08b6bd1106b26f779fcf3e38d by gardener
Fix OSS target name GPUtoNVVMTransforms -> MLIRGPUtoNVVMTransforms
This unbreaks the `cmake -G Ninja ../llvm -DLLVM_BUILD_EXAMPLES=ON
-DLLVM_TARGETS_TO_BUILD="host"`
in my local OSS build
PiperOrigin-RevId: 275452330
The file was modifiedmlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
Commit 151e7e61e85d2af19f283bdc5de51dfecffa39e5 by gardener
Automated rollback of commit 575405f4d6762830c1c4520569de4e4ed3c8eed5
PiperOrigin-RevId: 275461067
The file was modifiedmlir/include/mlir/EDSC/Builders.h
The file was modifiedmlir/test/EDSC/CMakeLists.txt
The file was modifiedmlir/bindings/python/pybind.cpp
The file was modifiedmlir/test/EDSC/builder-api-test.cpp
The file was modifiedmlir/lib/EDSC/CMakeLists.txt
The file was modifiedmlir/g3doc/EDSC.md
The file was modifiedmlir/lib/EDSC/Builders.cpp
Commit 3aae473658d62f5352a0e8b2fa77ebabcbf6a50a by gardener
[DRR] Use eraseOp() to replace no-result ops
PiperOrigin-RevId: 275475229
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
Commit 02b3ea6038b0959d5f0d62ca5ee44fbce9e3c7aa by gardener
Slightly rephrase a difficult-to-parse sentence.
PiperOrigin-RevId: 275499524
The file was modifiedmlir/g3doc/Dialects/Affine.md
Commit 2823b685804b3419c29f3fd8480f4d1ad4fb5c17 by gardener
Implement lowering of VectorTypeCastOp to LLVM
A VectorTypeCastOp can only be used to lower between statically sized
contiguous memrefs of scalar and matching vector type. The sizes and
strides are thus fully static and easy to determine.
A relevant test is added.
This is a step towards solving tensorflow/mlir#189.
PiperOrigin-RevId: 275538981
The file was modifiedmlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
The file was modifiedmlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
The file was modifiedmlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
The file was modifiedmlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
Commit 9e7e297da33be70ec41335800c05b554f5de065b by gardener
Lower vector transfer ops to loop.for operations.
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
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/test/Dialect/Linalg/llvm.mlir
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir
The file was modifiedmlir/lib/Transforms/LowerVectorTransfers.cpp
The file was modifiedmlir/test/mlir-cpu-runner/linalg_integration_test.mlir
The file was modifiedmlir/lib/EDSC/Builders.cpp
The file was modifiedmlir/test/Transforms/Vectorize/lower_vector_transfers.mlir
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
The file was modifiedmlir/test/mlir-cpu-runner/utils.mlir
The file was modifiedmlir/lib/EDSC/Helpers.cpp
Commit 9c9a7e9268bdd4fe3433ea4499eebbd74e015919 by gardener
Add support for function result attributes.
This allows dialect-specific attributes to be attached to func results.
(or more specifically, FunctionLike ops).
For example:
``` func @f() -> (i32 {my_dialect.some_attr = 3})
```
This attaches my_dialect.some_attr with value 3 to the first result of
func @f.
Another more complex example:
``` func @g() -> (i32, f32 {my_dialect.some_attr = "foo",
other_dialect.some_other_attr = [1,2,3]}, i1)
```
Here, the second result has two attributes attached.
PiperOrigin-RevId: 275564165
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/include/mlir/IR/Dialect.h
The file was modifiedmlir/lib/IR/FunctionSupport.cpp
The file was modifiedmlir/lib/IR/Dialect.cpp
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
The file was modifiedmlir/test/lib/TestDialect/TestDialect.h
The file was modifiedmlir/include/mlir/IR/Function.h
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/test/IR/parser.mlir
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/g3doc/LangRef.md
The file was modifiedmlir/test/IR/invalid.mlir
The file was modifiedmlir/test/IR/invalid-func-op.mlir
Commit c5b9fefddc725b274ba6b9cad51fc066f9c827e5 by gardener
NFC: Rename SPIR-V serializer find*ID() to get*ID() to be consistent
We use get*() in deserizer and other places across the codebase.
PiperOrigin-RevId: 275582390
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
Commit d9db842e687da426c627e207234dd3eff1ad139b by gardener
NFC: Add missing include for StringMap. PiperOrigin-RevId: 275588019
The file was modifiedmlir/include/mlir/TableGen/Format.h
Commit 5f6bdd144af44ff0840e2dd0d66a21dec3624299 by gardener
NFC: Cleanup the implementation of walkSymbolUses.
Refactor the implementation to be much cleaner by adding a
`make_second_range` utility to walk the `second` value of a range of
pairs.
PiperOrigin-RevId: 275598985
The file was modifiedmlir/include/mlir/Support/STLExtras.h
The file was modifiedmlir/lib/IR/SymbolTable.cpp
Commit c3e56cd12cf6d4ab3223d402370dc9236acd0f1b by gardener
Get active source lane predicate from shuffle instruction.
nvvm.shfl.sync.bfly optionally returns a predicate whether source lane
was active. Support for this was added to clang in
https://reviews.llvm.org/D68892.
Add an optional 'pred' unit attribute to the instruction to return this
predicate. Specify this attribute in the partial warp reduction so we
don't need to manually compute the predicate.
PiperOrigin-RevId: 275616564
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
The file was modifiedmlir/test/Dialect/LLVMIR/invalid.mlir
The file was modifiedmlir/test/Target/nvvmir.mlir
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/lib/Target/LLVMIR/ConvertToNVVMIR.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/test/Dialect/LLVMIR/nvvm.mlir
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/NVVMOps.td
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
Commit bc577eaf441f06c879ae8cc2edb5b1fc2e05676c by gardener
Use new eraseOp instead of replaceOp with empty values
PiperOrigin-RevId: 275631166
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/lib/Conversion/LoopToStandard/ConvertLoopToStandard.cpp
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
Commit f9462da5695705a1cd73b8d8dddc4539878792fa by gardener
Slight rewording in toy ch2 to make persistence of name clearer
PiperOrigin-RevId: 275650756
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-2.md
Commit 5b1345ff7631ec9c1efd2f6198a49da98793f398 by gardener
Add missing include to llvm Allocator.h
This header is not self-contained otherwise.
PiperOrigin-RevId: 275651582
The file was modifiedmlir/lib/Support/StorageUniquer.cpp
The file was modifiedmlir/include/mlir/Support/StorageUniquer.h
Commit 305dafd3b1b05d88fe783b54f96bd01da0c87c78 by gardener
Add missing include to StringMap in Verifier and DialectConversion.
PiperOrigin-RevId: 275656416
The file was modifiedmlir/lib/Analysis/Verifier.cpp
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h
Commit 8317bd85e5cccc8048cd1be1b3b17c19c953764d by gardener
Add SourceMgrDiagnosticHandler to toy
PiperOrigin-RevId: 275659433
The file was modifiedmlir/examples/toy/Ch3/toyc.cpp
The file was modifiedmlir/examples/toy/Ch4/toyc.cpp
The file was modifiedmlir/examples/toy/Ch5/toyc.cpp
Commit 8bfedb3ca599ccf3c507e721f4bf5e6a3b026f8c by gardener
Fix minor spelling tweaks (NFC)
Closes tensorflow/mlir#177
PiperOrigin-RevId: 275692653
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/lib/Transforms/MemRefDataFlowOpt.cpp
The file was modifiedmlir/lib/Analysis/MemRefBoundCheck.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
The file was modifiedmlir/lib/TableGen/Predicate.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/lib/Dialect/QuantOps/Utils/FakeQuantSupport.cpp
The file was modifiedmlir/lib/Dialect/QuantOps/IR/TypeDetail.h
The file was modifiedmlir/lib/Parser/Lexer.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/lib/Analysis/TestMemRefDependenceCheck.cpp
The file was modifiedmlir/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
The file was modifiedmlir/lib/ExecutionEngine/OptUtils.cpp
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
The file was modifiedmlir/lib/IR/Builders.cpp
The file was modifiedmlir/lib/Analysis/VectorAnalysis.cpp
The file was modifiedmlir/lib/Quantizer/Support/UniformSolvers.cpp
The file was modifiedmlir/lib/IR/Diagnostics.cpp
The file was modifiedmlir/lib/Transforms/LowerAffine.cpp
The file was modifiedmlir/lib/Conversion/GPUToCUDA/ConvertKernelFuncToCubin.cpp
The file was modifiedmlir/lib/Pass/Pass.cpp
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
The file was modifiedmlir/lib/Pass/PassTiming.cpp
The file was modifiedmlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir
The file was modifiedmlir/lib/Dialect/SDBM/SDBMExpr.cpp
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/lib/Transforms/Vectorize.cpp
The file was modifiedmlir/lib/Analysis/AffineAnalysis.cpp
The file was modifiedmlir/lib/IR/SymbolTable.cpp
The file was modifiedmlir/lib/Analysis/NestedMatcher.cpp
The file was modifiedmlir/lib/Analysis/Utils.cpp
The file was modifiedmlir/lib/Transforms/LoopFusion.cpp
The file was modifiedmlir/lib/TableGen/Pattern.cpp
Commit f28c5aca1766889cc19b09ee32796df3e7b52cfe by gardener
Fix minor spelling tweaks (NFC)
Closes tensorflow/mlir#175
PiperOrigin-RevId: 275726876
The file was modifiedmlir/examples/toy/Ch5/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/MLIRGen.cpp
The file was modifiedmlir/test/Transforms/simplify-affine-structures.mlir
The file was modifiedmlir/examples/toy/Ch1/include/toy/Parser.h
The file was modifiedmlir/examples/toy/Ch2/include/toy/Parser.h
The file was modifiedmlir/examples/toy/Ch4/include/toy/Parser.h
The file was modifiedmlir/examples/toy/Ch6/include/toy/Parser.h
The file was modifiedmlir/examples/toy/Ch4/parser/AST.cpp
The file was modifiedmlir/g3doc/OpDefinitions.md
The file was modifiedmlir/unittests/Dialect/SPIRV/SerializationTest.cpp
The file was modifiedmlir/test/Transforms/loop-fusion.mlir
The file was modifiedmlir/test/Dialect/SPIRV/structure-ops.mlir
The file was modifiedmlir/test/SDBM/sdbm-api-test.cpp
The file was modifiedmlir/test/mlir-tblgen/op-result.td
The file was modifiedmlir/test/Transforms/parametric-tiling.mlir
The file was modifiedmlir/unittests/TableGen/structs.td
The file was modifiedmlir/examples/toy/Ch5/include/toy/Parser.h
The file was modifiedmlir/test/APITest.h
The file was modifiedmlir/examples/toy/Ch6/mlir/MLIRGen.cpp
The file was modifiedmlir/test/IR/affine-map.mlir
The file was modifiedmlir/examples/toy/Ch1/parser/AST.cpp
The file was modifiedmlir/test/lib/Transforms/TestLoopFusion.cpp
The file was modifiedmlir/test/Dialect/SPIRV/types.mlir
The file was modifiedmlir/examples/toy/Ch3/include/toy/Parser.h
The file was modifiedmlir/test/Dialect/SPIRV/control-flow-ops.mlir
The file was modifiedmlir/examples/toy/Ch5/parser/AST.cpp
The file was modifiedmlir/test/IR/parser.mlir
The file was modifiedmlir/examples/toy/Ch2/parser/AST.cpp
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/utils/generate-test-checks.py
The file was modifiedmlir/examples/toy/Ch2/mlir/MLIRGen.cpp
The file was modifiedmlir/test/mlir-tblgen/pattern.mlir
The file was modifiedmlir/examples/toy/Ch6/parser/AST.cpp
The file was modifiedmlir/g3doc/DeclarativeRewrites.md
The file was modifiedmlir/test/Dialect/LLVMIR/invalid.mlir
The file was modifiedmlir/test/Dialect/LLVMIR/roundtrip.mlir
The file was modifiedmlir/unittests/SDBM/SDBMTest.cpp
The file was modifiedmlir/bindings/python/pybind.cpp
The file was modifiedmlir/test/Dialect/GPU/invalid.mlir
The file was modifiedmlir/utils/spirv/gen_spirv_dialect.py
Commit aad15d812e534b97a3ac5489e933f07b27df53b9 by gardener
[DRR] Address GCC warning by wrapping for statement body with {}
Otherwise, we'll see the following warning when compiling with GCC 8:
warning: this ?for? clause does not guard... [-Wmisleading-indentation]
PiperOrigin-RevId: 275735925
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
Commit 0bebd06f9a5bc580bfce4c66974a5b0d8f2dea12 by gardener
Update Ch1 to reflect new changes in the tutorial.
The chapter list is out of date, as well as mentions of matrix
multiplication(now element-wise multiplication).
PiperOrigin-RevId: 275744911
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-1.md
Commit 1bdfc9e74df955b230d22e9252cb9e5f36843057 by gardener
NFC: Fix typo : Retur -> Return PiperOrigin-RevId: 275745931
The file was modifiedmlir/test/Examples/Toy/Ch1/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch3/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch6/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch2/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch4/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch5/ast.toy
Commit 9ac459e8711050114a3b147884d66b32a67ed8a4 by gardener
Add a Symbol trait to simplify defining operations that represent
symbols.
This trait provides accessors for the name, symbol use list methods,
verification, with more to be added.
PiperOrigin-RevId: 275864554
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/lib/IR/SymbolTable.cpp
The file was modifiedmlir/include/mlir/IR/FunctionSupport.h
The file was modifiedmlir/include/mlir/IR/SymbolTable.h
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
The file was modifiedmlir/lib/IR/FunctionSupport.cpp
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/test/Dialect/LLVMIR/global.mlir
The file was modifiedmlir/include/mlir/IR/Function.h
The file was modifiedmlir/test/lib/IR/TestSymbolUses.cpp
Commit 03d7be2acad6d826d06e27a6200a55513bb5cdb5 by gardener
NFC: Elide the value of a UnitAttr within nested attribute dictionaries.
This matches the behavior of the top level attribute dictionary.
PiperOrigin-RevId: 275879828
The file was modifiedmlir/test/IR/parser.mlir
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
Commit b74af4aa5c314f596ad5ed26c00e4b9033dee78f by gardener
Unify GPU op definition names with other dialects.
Rename GPU op names from gpu_Foo to GPU_FooOp.
PiperOrigin-RevId: 275882232
The file was modifiedmlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
The file was modifiedmlir/lib/Dialect/GPU/IR/GPUDialect.cpp
The file was modifiedmlir/lib/Conversion/GPUToNVVM/GPUToNVVM.td
The file was modifiedmlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
The file was modifiedmlir/include/mlir/Dialect/GPU/GPUOps.td
Commit 941a1c43320afed13bc964452cef3eeafa93a48c by gardener
NFC: Fix remaining usages of MulOp as matrix multiplication.
MulOp now represents an element-wise multiplication instead of a matrix
multiplication.
PiperOrigin-RevId: 275886774
The file was modifiedmlir/test/Examples/Toy/Ch3/codegen.toy
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-2.md
The file was modifiedmlir/examples/toy/Ch4/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch4/ast.toy
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-1.md
The file was modifiedmlir/test/Examples/Toy/Ch5/ast.toy
The file was modifiedmlir/examples/toy/Ch6/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch2/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch5/shape_inference.mlir
The file was modifiedmlir/test/Examples/Toy/Ch2/codegen.toy
The file was modifiedmlir/test/Examples/Toy/Ch6/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch6/codegen.toy
The file was modifiedmlir/examples/toy/Ch5/mlir/Dialect.cpp
The file was modifiedmlir/test/Examples/Toy/Ch3/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch4/shape_inference.mlir
The file was modifiedmlir/test/Examples/Toy/Ch5/codegen.toy
The file was modifiedmlir/test/Examples/Toy/Ch1/ast.toy
The file was modifiedmlir/test/Examples/Toy/Ch6/shape_inference.mlir
The file was modifiedmlir/test/Examples/Toy/Ch4/codegen.toy
Commit 4514cdd5eb4844e10790580ab8df9bce433cbe6e by gardener
Cleanup and rewrite Ch-4.md.
This change rewrites Ch-4.md to introduced interfaces in a detailed
step-by-step manner, adds examples, and fixes some errors.
PiperOrigin-RevId: 275887017
The file was modifiedmlir/test/Examples/Toy/Ch4/shape_inference.mlir
The file was modifiedmlir/examples/toy/Ch4/include/toy/ShapeInferenceInterface.td
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-4.md
The file was modifiedmlir/examples/toy/Ch5/toyc.cpp
The file was modifiedmlir/examples/toy/Ch6/toyc.cpp
The file was modifiedmlir/test/Examples/Toy/Ch5/shape_inference.mlir
The file was modifiedmlir/examples/toy/Ch4/toyc.cpp
The file was modifiedmlir/examples/toy/Ch5/include/toy/ShapeInferenceInterface.td
The file was modifiedmlir/test/Examples/Toy/Ch6/shape_inference.mlir
The file was modifiedmlir/examples/toy/Ch6/include/toy/ShapeInferenceInterface.td
Commit 5f867d26b47c0b1fb0a46306bd3b30e1eea0961a by gardener
Use LLVM_Type instead of AnyType in the definition of LLVM_CallOp
The type constraint had to be relaxed due to the order of lowering
passes in the examples, that since has been fixed. The relaxed version
was still used by the CUDA lowering for launch sizes of `index` type.
This is not necessary since the GPU dialect does not restrict the type
of the launch size operands. Use an LLVM type instead and restore the
check in the LLVM_CallOp definition.
PiperOrigin-RevId: 275920109
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
The file was modifiedmlir/test/Conversion/GPUToCUDA/lower-launch-func-to-cuda.mlir
Commit d9fe892e4228909908cf9b0f6dd80d9b56c060b4 by gardener
[spirv] Allow block arguments on spv.Branch(Conditional)
We will use block arguments as the way to model SPIR-V OpPhi in the
SPIR-V dialect.
This CL also adds a few useful helper methods to both ops to get the
block arguments.
Also added tests for branch weight (de)serialization.
PiperOrigin-RevId: 275960797
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/loop.mlir
The file was modifiedmlir/test/Dialect/SPIRV/control-flow-ops.mlir
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/selection.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
Commit 020f9eb68c8808c096228e20a40e5a217f4d2aab by gardener
[DRR] Allow interleaved operands and attributes
Previously DRR assumes attributes to appear after operands. This was the
previous requirements on ODS, but that has changed some time ago. Fix
DRR to also support interleaved operands and attributes.
PiperOrigin-RevId: 275983485
The file was modifiedmlir/include/mlir/TableGen/Operator.h
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/lib/TableGen/Operator.cpp
The file was modifiedmlir/test/mlir-tblgen/pattern.mlir
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
Commit 057ee97c73765e931579f3dc23e740a4bab87843 by gardener
NFC: Add support for parsing attributes programmatically via
mlir::parseAttribute.
This matches the behavior of the public mlir::parseType, and even uses
the internal implementation.
PiperOrigin-RevId: 275989777
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/include/mlir/Parser.h
Commit 0237e52dde1a0b295d4665a522998e2112f8d3ce by gardener
NFC: Remove a right parenthesis from comment. PiperOrigin-RevId:
275998781
The file was modifiedmlir/include/mlir/IR/AffineMap.h
Commit 43de1c43037b352010376b5e1199db0e4e54848e by gardener
Expose optimizations flags in Python bindings
ExecutionEngine currently supports additional parameters that can be
used to run LLVM transformations during JIT compilation. Expose this to
Python bindings. When the ExecutionEngine functionality is moved to
LLVM, the bindings-specific code can be updated to interact with LLVM.
PiperOrigin-RevId: 276060475
The file was modifiedmlir/bindings/python/pybind.cpp
Commit ad6925f479546f4340e88c2223f285d1006a82e0 by gardener
Update loop.for verifier message
fix: nonnegative -> positive
Closes tensorflow/mlir#206
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/206
from bondhugula:bondhugula-patch-1
9a47ca7dfd230180a9df33e9a64b33d02252d30a PiperOrigin-RevId: 276060885
The file was modifiedmlir/lib/Dialect/LoopOps/LoopOps.cpp
The file was modifiedmlir/test/Dialect/Loops/invalid.mlir
Commit d499976098bb37e2741c02259959c2901de88709 by gardener
Update chapter 3 code snippet to match the actual output of the code
PiperOrigin-RevId: 276117540
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-3.md
Commit 0d33703f2a4a457253f60e6661615fed28f48fe6 by gardener
Drop MemRefUtils from the ExecutionEngine
The ExecutionEngine was updated recently to only take the LLVM dialect
as input. Memrefs are no longer expected in the signature of the entry
point function by the executor so there is no need to allocate and free
them. The code in MemRefUtils is therefore dead and furthermore out of
sync with the recent evolution of memref type to support strides. Drop
it.
PiperOrigin-RevId: 276272302
The file was removedmlir/include/mlir/ExecutionEngine/MemRefUtils.h
The file was removedmlir/lib/ExecutionEngine/MemRefUtils.cpp
The file was modifiedmlir/lib/ExecutionEngine/CMakeLists.txt
The file was modifiedmlir/lib/Support/JitRunner.cpp
Commit 5ee610a091ccde30ffe8680f132961f7442c7786 by gardener
NFC: Remove references to the toy.generic attribute.
This was used for shape inference in the previous tutorial flow.
PiperOrigin-RevId: 276351916
The file was modifiedmlir/examples/toy/Ch4/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch3/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch6/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch2/mlir/MLIRGen.cpp
The file was modifiedmlir/examples/toy/Ch5/mlir/MLIRGen.cpp
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-3.md
Commit edffbbcdaef0adde08a0440c2180074c07ed7742 by gardener
Fix "set-but-unused" warning in DialectConversion
The variable in question is only used in an assertion, leading to a
warning in opt builds.
PiperOrigin-RevId: 276352259
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
Commit 21ee4e987f4f3b4d8a55b284dcc25c5220e894f3 by gardener
Add @below and @above directives to verify-diagnostics.
This simplifies defining expected-* directives when there are multiple
that apply to the next or previous line. @below applies the directive to
the next non-designator line, i.e. the next line that does not contain
an expected-* designator. @above applies to the previous non designator
line.
Examples:
// Expect an error on the next line that does not contain a designator.
// expected-remark@below {{remark on function below}}
// expected-remark@below {{another remark on function below}} func
@bar(%a : f32)
// Expect an error on the previous line that does not contain a
designator. func @baz(%a : f32)
// expected-remark@above {{remark on function above}}
// expected-remark@above {{another remark on function above}}
PiperOrigin-RevId: 276369085
The file was modifiedmlir/lib/IR/Diagnostics.cpp
The file was modifiedmlir/test/Transforms/memref-dependence-check.mlir
The file was modifiedmlir/test/IR/test-symbol-uses.mlir
The file was modifiedmlir/g3doc/Diagnostics.md
The file was modifiedmlir/test/IR/invalid-module-op.mlir
Commit 9a18ff3d629f3cd13d1a241700014c05757ca61f by gardener
Wrap ODS to 80 lines and remove const qualifier for local `int` variable
(NFC)
This addresses post-submit comments on 00d2a37e32
PiperOrigin-RevId: 276419770
The file was modifiedmlir/lib/Dialect/StandardOps/Ops.cpp
The file was modifiedmlir/include/mlir/Dialect/StandardOps/Ops.td
Commit d2ce435dba36ca2575073d9d51e34b77ffad2e27 by gardener
Add custom lowering of ExpOp for NVVM and ROCM.
PiperOrigin-RevId: 276440911
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMDialect.h
The file was modifiedmlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was addedmlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
Commit f56d8187fa4bd087c23188036cdc09c5b5c749a8 by gardener
Add missing dependency on MLIRIR on MLIREDSCInterface
MLIRIR includes generated header for interfaces, including these headers
require an extra dependency to ensure these headers are generated before
we attempt to build MLIREDSCInterface.
PiperOrigin-RevId: 276518255
The file was modifiedmlir/lib/EDSC/CMakeLists.txt
Commit ef43b5653830641766997c10699682f90f1c24da by gardener
Add support for replacing all uses of a symbol.
This requires reconstructing the attribute dictionary of each operation
containing a use.
PiperOrigin-RevId: 276520544
The file was modifiedmlir/include/mlir/IR/SymbolTable.h
The file was modifiedmlir/lib/IR/SymbolTable.cpp
The file was addedmlir/test/IR/test-symbol-rauw.mlir
The file was modifiedmlir/test/lib/IR/TestSymbolUses.cpp
Commit 2b61b7979eb59df579a3a4bf6fe768ddf2a556f4 by gardener
Convert the Canonicalize and CSE passes to generic Operation Passes.
This allows for them to be used on other non-function, or even other
function-like, operations. The algorithms are already generic, so this
is simply changing the derived pass type. The majority of this change is
just ensuring that the nesting of these passes remains the same, as the
pass manager won't auto-nest them anymore.
PiperOrigin-RevId: 276573038
The file was modifiedmlir/test/Pass/pipeline-parsing.mlir
The file was modifiedmlir/test/Quantizer/matmul.mlir
The file was modifiedmlir/test/Dialect/FxpMathOps/lower-uniform-real-math-addew.mlir
The file was modifiedmlir/test/Dialect/LLVMIR/terminator.mlir
The file was modifiedmlir/test/lib/Transforms/TestConstantFold.cpp
The file was modifiedmlir/examples/toy/Ch5/toyc.cpp
The file was modifiedmlir/test/AffineOps/canonicalize.mlir
The file was modifiedmlir/test/Dialect/FxpMathOps/lower-uniform-real-math-mulew.mlir
The file was modifiedmlir/test/Dialect/QuantOps/canonicalize.mlir
The file was modifiedmlir/test/Dialect/SPIRV/canonicalize.mlir
The file was modifiedmlir/test/Transforms/canonicalize.mlir
The file was modifiedmlir/test/Transforms/cse.mlir
The file was modifiedmlir/test/Dialect/GPU/canonicalize.mlir
The file was modifiedmlir/g3doc/Tutorials/Toy/Ch-3.md
The file was modifiedmlir/examples/toy/Ch6/toyc.cpp
The file was modifiedmlir/include/mlir/Transforms/Passes.h
The file was modifiedmlir/test/Pass/ir-printing.mlir
The file was modifiedmlir/lib/Transforms/CSE.cpp
The file was modifiedmlir/examples/toy/Ch3/toyc.cpp
The file was modifiedmlir/examples/toy/Ch4/toyc.cpp
The file was modifiedmlir/include/mlir/Pass/PassManager.h
The file was modifiedmlir/lib/Transforms/Canonicalizer.cpp
The file was modifiedmlir/test/Pass/pass-timing.mlir
The file was modifiedmlir/bindings/python/pybind.cpp
The file was modifiedmlir/test/Transforms/test-canonicalize.mlir
Commit dd2e444325ddf047f224524dfc7d1881aa1051e8 by gardener
[spirv] AccessChainOp canonicalization.
Combine chained `spirv::AccessChainOp` operations into one
`spirv::AccessChainOp` operation.
Closes tensorflow/mlir#198
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/198
from denis0x0D:sandbox/canon_access_chain
0cb87955a85511071143d62637ff939d0dabc2bd PiperOrigin-RevId: 276609345
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/test/Dialect/SPIRV/canonicalize.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
Commit b69e8ee049ff1ba1e1ecb90acaa197cf869d9aa3 by gardener
Add support for parsing multiple result name groups.
This allows for parsing things like:
%name_1, %name_2:5, %name_3:2 = "my.op" ...
This is useful for operations that have groups of variadic result
values. The total number of results is expected to match the number of
results defined by the operation.
PiperOrigin-RevId: 276703280
The file was modifiedmlir/test/IR/parser.mlir
The file was modifiedmlir/lib/Parser/Parser.cpp
Commit cde337cfdeecc495692caf42aa8fdd0bf89e7c50 by gardener
Define AnyRankedTensor Type in TableGen
PiperOrigin-RevId: 276714649
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
The file was modifiedmlir/test/mlir-tblgen/types.mlir
The file was modifiedmlir/include/mlir/IR/OpBase.td
Commit 780a108d31d798d4cc3c3373dfd26108a613ae0f by gardener
Fix include guards and add tests for OpToFuncCallLowering.
PiperOrigin-RevId: 276859463
The file was modifiedmlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
The file was modifiedmlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
The file was modifiedmlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
Commit 663f9e0c9fe4d37ad3b899e8e9d25c16dc1fbfe5 by gardener
Lookup function declaration in SymbolTable not ModuleOp.
PiperOrigin-RevId: 277033167
The file was modifiedmlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
Commit e38fe4a7af03f504b1a51b39fba2a3f07aad46f6 by gardener
Print reason why dynamic library could not be loaded during execution.
PiperOrigin-RevId: 277037138
The file was modifiedmlir/lib/ExecutionEngine/ExecutionEngine.cpp
Commit 2f4d0c085a9849fb48b8b55e10f013ac851e470e by gardener
Add support for marking an operation as recursively legal.
In some cases, it may be desirable to mark entire regions of operations
as legal. This provides an additional granularity of context to the
concept of "legal". The `ConversionTarget` supports marking operations,
that were previously added as `Legal` or `Dynamic`, as `recursively`
legal. Recursive legality means that if an operation instance is legal,
either statically or dynamically, all of the operations nested within
are also considered legal. An operation can be marked via
`markOpRecursivelyLegal<>`:
```c++ ConversionTarget &target = ...;
/// The operation must first be marked as `Legal` or `Dynamic`.
target.addLegalOp<MyOp>(...);
target.addDynamicallyLegalOp<MySecondOp>(...);
/// Mark the operation as always recursively legal.
target.markOpRecursivelyLegal<MyOp>();
/// Mark optionally with a callback to allow selective marking.
target.markOpRecursivelyLegal<MyOp, MySecondOp>([](Operation *op) { ...
});
/// Mark optionally with a callback to allow selective marking.
target.markOpRecursivelyLegal<MyOp>([](MyOp op) { ... });
```
PiperOrigin-RevId: 277086382
The file was modifiedmlir/test/Transforms/test-legalizer-full.mlir
The file was modifiedmlir/test/lib/TestDialect/TestPatterns.cpp
The file was modifiedmlir/g3doc/DialectConversion.md
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h
The file was modifiedmlir/lib/Transforms/DialectConversion.cpp
Commit 98226e62ecf4d64323e4531daff39183691800cf by gardener
Standardize Linalg transformations to take an OpBuilder and an
OperationFolder - NFC
This will be used to specify declarative Linalg transformations in a
followup CL. In particular, the PatternRewrite mechanism does not allow
folding and has its own way of tracking erasure.
PiperOrigin-RevId: 277149158
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/LowerToLoops.cpp
The file was modifiedmlir/include/mlir/EDSC/Builders.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Utils/Utils.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Utils/Utils.h
Commit 66ec24d83310dd623d79619840313f98e9a72644 by gardener
Parse locations in parseGenericOperation
For ops that recursively re-enter the parser to parse an operation (such
as ops with a "wraps" pretty form), this ensures that the wrapped op
will parse its location, which can then be used for the locations of the
wrapping op and any other implicit ops.
PiperOrigin-RevId: 277152636
The file was modifiedmlir/test/lib/TestDialect/TestDialect.cpp
The file was modifiedmlir/lib/Parser/Parser.cpp
The file was modifiedmlir/test/IR/wrapping_op.mlir
Commit ca2538e9a749deeedb6c790d85d811133e88ad91 by gardener
[spirv] Support OpPhi using block arguments
This CL adds another control flow instruction in SPIR-V: OpPhi. It is
modelled as block arguments to be idiomatic with MLIR. See the
rationale.md doc for "Block Arguments vs PHI nodes". Serialization and
deserialization is updated to convert between block arguments and SPIR-V
OpPhi instructions.
PiperOrigin-RevId: 277161545
The file was addedmlir/test/Dialect/SPIRV/Serialization/phi.mlir
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
The file was modifiedmlir/g3doc/Dialects/SPIR-V.md
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
Commit 61225d678e5db64ba2109261596492700c5475e0 by gardener
Add a convenient operation build method for spirv::SelectOp
The SelectOp always has the same result type as its true/false value.
Add a builder method that uses the operand type to get the result type.
PiperOrigin-RevId: 277217978
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
Commit 8656af1e8216d521ef38a6d78f2a5c701871058a by gardener
[spirv] Use LLVM graph traversal utility for PrettyBlockOrderVisitor
This removes a bunch of special tailored DFS code in favor of the common
LLVM utility. Besides, we avoid recursion with system stack given that
llvm::depth_first_ext is iterator based and maintains its own stack.
PiperOrigin-RevId: 277272961
The file was modifiedmlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
Commit c87c7f57324233dd9871fe82a00d036ff10a3674 by gardener
Bugfix: Keep worklistMap in sync with worklist in GreedyPatternRewriter
When we removed a pattern, we removed it from worklist but not from
worklistMap. Then, when we tried to add a new pattern on the same
Operation again, the pattern wasn't added since it already existed in
the worklistMap (but not in the worklist).
Closes tensorflow/mlir#211
PiperOrigin-RevId: 277319669
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Commit 5e932afd5bbbba988d1dfae1c075e86657dd71bc by gardener
Add "[TOC]" to generated documentation
PiperOrigin-RevId: 277354482
The file was modifiedmlir/tools/mlir-tblgen/OpDocGen.cpp
Commit f3efb60ccc1942796a006434bf5935659bb5e3fc by gardener
[spirv] Mark control flow ops as InFunctionScope
PiperOrigin-RevId: 277373473
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
Commit 80213ba5f0d72f4c50ec641d40eed171bba464ad by gardener
[spirv] Fix gen_spirv_dialect.py and add spv.Unreachable
This CL fixed gen_spirv_dialect.py to support nested delimiters when
chunking existing ODS entries in .td files and to allow ops without
correspondence in the spec. This is needed to pull in the definition of
OpUnreachable.
PiperOrigin-RevId: 277486465
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/terminator.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/utils/spirv/gen_spirv_dialect.py
The file was modifiedmlir/test/Dialect/SPIRV/control-flow-ops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
Commit 05a5a4141648218db2440b4e3a355398ef822111 by gardener
Add basic support for declarative Linalg transformations
Linalg ops provide a good anchor for pattern matching/rewriting
transformations. This CL adds a simple example of how multi-level tiling
may be specified by attaching a simple StringAttr to ops as they are
transformed so we can easily specify partial lowering to control
transformation application.
This is a first stab at taking advantage of higher-level information
contained in Linalg ops and will evolve in the future.
PiperOrigin-RevId: 277497958
The file was modifiedmlir/include/mlir/Dialect/Linalg/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was addedmlir/include/mlir/Dialect/Linalg/Transforms/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgLibraryOps.td
The file was addedmlir/test/Dialect/Linalg/transform-patterns.mlir
The file was addedmlir/lib/Dialect/Linalg/Transforms/LinalgTransforms.cpp
The file was addedmlir/include/mlir/Dialect/Linalg/Transforms/LinalgTransformPatterns.td
The file was modifiedmlir/lib/Dialect/Linalg/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/Linalg/Passes.h
Commit cb40e36d3bb93e876ec6d05f128a23f26b952604 by gardener
Fix segfault when no symbol is given to an constraint operand
This fixed the segfault when we see the following pattern:
Pat<(...), (...), [(... 1, 2, 3), ...]>
PiperOrigin-RevId: 277544300
The file was modifiedmlir/lib/TableGen/Pattern.cpp
The file was addedmlir/test/mlir-tblgen/expect-symbol.td
Commit 0568e952b6d1dc53f44c8eb5af167fc9d2e0bb34 by gardener
Add a utility accessor 'has_single_element' for ranges.
This provides an easy way to check if a range has a single element.
PiperOrigin-RevId: 277544647
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/lib/IR/Module.cpp
The file was modifiedmlir/lib/Dialect/AffineOps/AffineOps.cpp
The file was modifiedmlir/include/mlir/Support/STLExtras.h
Commit a32f0dcb5d963d2281bc08902468693ea2911342 by gardener
Add support to GreedyPatternRewriter for erasing unreachable blocks.
Rewrite patterns may make modifications to the CFG, including dropping
edges between blocks. This change adds a simple unreachable block
elimination run at the end of each iteration to ensure that the CFG
remains valid.
PiperOrigin-RevId: 277545805
The file was modifiedmlir/test/Transforms/canonicalize.mlir
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Commit 736ad2061c491199938cd6b0f31e8dfaac060974 by gardener
Dump op location in createPrintOpGraphPass for easier debugging.
PiperOrigin-RevId: 277546527
The file was modifiedmlir/lib/Transforms/ViewOpGraph.cpp
Commit d024b68e6b34ae464bd15e58db21cf6661dc8c02 by gardener
Use `not` to invert return code in expected to fail tests
Windows does not like the RUN command of `(... || true) | ...`.
PiperOrigin-RevId: 277587031
The file was modifiedmlir/test/mlir-tblgen/expect-symbol.td
Commit d423d4a3387a90a5b6634f087bdef838566008d3 by gardener
[spirv] Add cast operations
This CL added op definitions for a few cast operations:
* OpConvertFToU
* OpConvertFToS
* OpConvertSToF
* OpConvertUToF
* OpUConvert
* OpSConvert
* OpFConvert
Also moved the definition of spv.Bitcast to the new file.
Closes tensorflow/mlir#208 and tensorflow/mlir#174
COPYBARA_INTEGRATE_REVIEW=https://github.com/tensorflow/mlir/pull/208
from denis0x0D:sandbox/cast_ops 79bc9b37398aafddee6cf6beb301807988fe67f9
PiperOrigin-RevId: 277587891
The file was modifiedmlir/test/Dialect/SPIRV/ops.mlir
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
The file was modifiedmlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
The file was modifiedmlir/test/Dialect/SPIRV/Serialization/cast-ops.mlir
The file was addedmlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td
The file was modifiedmlir/lib/Dialect/SPIRV/SPIRVOps.cpp
The file was modifiedmlir/utils/spirv/define_inst.sh
Commit e55bd90bc7c849128cd14f4bc7a7706c54db4fea by gardener
NFC: Simplify UseRange::iterator to just be a
std::vector::const_iterator.
At some point the implementation of UseRange was more complex, but now
it is just a simple wrapper around a std::vector<SymbolUse>.
PiperOrigin-RevId: 277597294
The file was modifiedmlir/include/mlir/IR/SymbolTable.h
Commit f9a4d3bdb024a918fd5eab7d59176dbc2ab08e80 by gardener
LinalgDependenceGraph: add const modifiers to accessors
MLIR const-correctness policy is to avoid having `const` on IR objects.
LinalgDependenceGraph is not an IR object but an auxiliary data
structure. Furthermore, it is not updated once constructed unlike IR
objects. Add const qualifiers to get* and find* methods of
LinalgDependenceGraph since they are not modifying the graph. This
allows transformation functions that require the dependence graph to
take it by const-reference, clearly indicating that they are not
modifying it (and that the graph may have to be recomputed after the
transformation).
PiperOrigin-RevId: 277731608
The file was modifiedmlir/include/mlir/Dialect/Linalg/Utils/Utils.h
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Analysis/DependenceAnalysis.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/Analysis/DependenceAnalysis.h
Commit 07b4ce7409c12d35c1d707c07c942dd977026d71 by gardener
Add a test.symbol_scope operation that has the SymbolTable Traits to the
Test dialect
PiperOrigin-RevId: 277741687
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/test/lib/TestDialect/TestDialect.h
The file was modifiedmlir/test/IR/traits.mlir
The file was modifiedmlir/test/lib/TestDialect/TestOps.td
Commit ce9477934a5a7a266dda989f76c25b7a4cf60b09 by gardener
Add a test for lowering GPU ops that cover cases where the symbol table
isn't held by a ModuleOp (NFC)
PiperOrigin-RevId: 277752004
The file was modifiedmlir/test/Conversion/GPUToROCDL/gpu-to-rocdl.mlir
The file was modifiedmlir/test/Conversion/GPUToNVVM/gpu-to-nvvm.mlir
Commit 7432234f3c5ca2da83f152f9f0508244a3b01a18 by gardener
NFC: Use #ifndef in various .td files instead of #ifdef and #else
Upstream LLVM ga