| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][docs] Migrate code examples to nanobind, make Python spelling … (#163933) …consistent Since the bindings now use nanobind, I changed the code examples and mentions in the documentation prose to mention nanobind concepts and symbols wherever applicable. I also made the spelling of "Python" consistent by choosing the uppercase name everywhere that's not an executable name, part of a URL, or directory name. ---------------- Note that I left mentions of PybindAdaptors.h in because of https://github.com/llvm/llvm-project/pull/162309. Are there any thoughts about adding a virtual environment setup guide using [uv](https://docs.astral.sh/uv/)? It has gotten pretty popular, and is much faster than a "vanilla" Python pip install. It can also bootstrap an interpreter not present on the user's machine, for example a free-threaded Python build, with the -p flag to the uv venv virtual environment creation command. | 9 个月前 | |
[MLIR][TBLGen] Added compound assignment operator for any BitEnum (#160840) ## Details: - Added missing compound assignment operators |=, &=, ^= to mlir-tblgen - Replaced the arithmetic operators with added assignment operators for BitEnum in the transformations - Updated related documentation ## Tickets: - Closes https://github.com/llvm/llvm-project/issues/158098 | 9 个月前 | |
[mlir][spirv] Add support for SwitchOp (#168713) The dialect implementation mostly copies the one of cf.switch, but aligns naming to the SPIR-V spec. | 8 个月前 | |
[MLIR][Linalg][Docs] Add forms to Linalg rationale docs (#156859) As discussed in: * https://discourse.llvm.org/t/rfc-linalg-forms/87994/ * https://discourse.llvm.org/t/rfc-extend-linalg-elemwise-named-ops-semantics/83927 * https://discourse.llvm.org/t/rfc-op-explosion-in-linalg/82863/1 * https://discourse.llvm.org/t/rfc-mlir-linalg-operation-tree/83586 * #148424 Co-designed by Javed Absar --------- Co-authored-by: Andrzej Warzyński <andrzej.warzynski@gmail.com> | 9 个月前 | |
[mlir] Start rewrite tool (#77668) Initial commit of a tool to help in textual rewrites of .mlir files. This tool builds of of AsmParserState and is rather simple. Took some inspiration from when I used clang's AST rewrites where I'd often treat it as a "localizing" regex applicator in fallback cases, and started with that as functionality. There though, one does have access to the lower level info than here, but still a step up over sed over entire file. This aims to be helpful (e.g., rewrite syntax including best effort inside comments) rather than bulletproof tool. It may even be better suited under utils than tools. And most of the rewrites would be rather short lived and might never make it upstream (while the helpers of those rewrites may for future rewrites). The layering at the moment is not ideal as it is reusing the RewriteBuffer class from clang's rewrite engine. So only optionally enabling where clang is also enable. There doesn't seem to be anything clang specific there (the dep does pull in more dependencies than ideal, but leaving both refactorings). Additionally started it as a single file to prototype more easily, planning to refactor later to include and libs for out of file usage. | 1 年前 | |
[MLIR] Documentation updates and typo fixes (#125273) | 1 年前 | |
[mlir][docs] Fix typo: 'DDR' → 'DRR' in Creating a Dialect tutorial (#161967) Fixes a small typo in the Creating a Dialect tutorial. The rewrite rules format should be DRR (Declarative Rewrite Rules), not DDR. | 9 个月前 | |
[mlir][bufferization] Remove buffer-deallocation pass (#126366) The -buffer-deallocation pass is not compatible with One-Shot Bufferize and has been replaced with the Ownership-based Buffer Deallocation pass about 1.5 years ago. To clean up the code base, this commit removes the deprecated buffer-deallocation pass. All uses of this deprecated pass within MLIR have already been migrated. Note for LLVM integration: If you depend on this pass, migrate to the Ownership-based Buffer Deallocation pass or copy the pass to your codebase. For details, see https://discourse.llvm.org/t/psa-bufferization-new-buffer-deallocation-pipeline/73375. | 1 年前 | |
[mlir] Add fast walk-based pattern rewrite driver (#113825) This is intended as a fast pattern rewrite driver for the cases when a simple walk gets the job done but we would still want to implement it in terms of rewrite patterns (that can be used with the greedy pattern rewrite driver downstream). The new driver is inspired by the discussion in https://github.com/llvm/llvm-project/pull/112454 and the LLVM Dev presentation from @matthias-springer earlier this week. This limitation comes with some limitations: * It does not repeat until a fixpoint or revisit ops modified in place or newly created ops. In general, it only walks forward (in the post-order). * matchAndRewrite can only erase the matched op or its descendants. This is verified under expensive checks. * It does not perform folding / DCE. We could probably relax some of these in the future without sacrificing too much performance. | 1 年前 | |
[mlir][bufferization][NFC] Rename to_memref to to_buffer (#137180) As part of the work on transitioning bufferization dialect, ops, and associated logic to operate on newly added type interfaces (see 00eaff3e9c897c263a879416d0f151d7ca7eeaff), rename the bufferization.to_memref to highlight the generic nature of the op. Bufferization process produces buffers while memref is a builtin type rather than a generic term. Preserve the current API (to_buffer still produces a memref), however, as the new type interfaces are not used yet. | 1 年前 | |
[MLIR][Bytecode] Followup 8106c81 (#157136) Addressed code review feedback: - Fixed some issues in the unit test - Adjusted line wrapping in the docs - Clarified comments in the bytecode reader | 10 个月前 | |
[mlir] add TOC to top-level documents Multiple top-level MLIR documents did not have a table of contents tag, making them harder to nagivate. | 3 年前 | |
[Documentation] Always use SVG for dot-generated doxygen images. (#136843) Despite our attempt (build-docs.sh) to build the documentation with SVG, it still uses PNG https://llvm.org/doxygen/classllvm_1_1StringRef.html, and that renders terribly on any high dpi display. SVG leads to smasller installation and works fine on all browser (that has been true for _a while_ https://caniuse.com/svg), so this patch just unconditionally build all dot graphs as SVG in all subprojects and remove the option. | 1 年前 | |
[MLIR] Fix typo of the word "pattern" in CAPI and docs (#163780) This includes the rename from mlirOpRewritePattenCreate to mlirOpRewritePatternCreate in CAPI, and other typo fixes in docs and code comments. | 9 个月前 | |
[documentation] [mlir] DataLayout.md: fix broken link to DLTI dialect (#86524) The link to DLTI dialect was broken. | 2 年前 | |
[mlir] Allow using non-attribute properties in declarative rewrite patterns (#143071) This commit adds support for non-attribute properties (such as StringProp and I64Prop) in declarative rewrite patterns. The handling for properties follows the handling for attributes in most cases, including in the generation of static matchers. Constraints that are shared between multiple types are supported by making the constraint matcher a templated function, which is the equivalent to passing ::mlir::Attribute for an arbitrary C++ type. | 1 年前 | |
[mlir] Remove deprecated cast member functions (#135556) These have been deprecated for over two years now in favor of free functions. See the relevant discourse thread: https://discourse.llvm.org/t/preferred-casting-style-going-forward/68443 and the deprecation notice: https://mlir.llvm.org/deprecation/. | 1 年前 | |
[mlir][docs] Add documentation for No-rollback Conversion Driver (#164071) Add documentation for the no-rollback conversion driver. Also improve the documentation of the old rollback driver. In particular: which modifications are performed immediately and which are delayed. | 9 个月前 | |
[mlir][NFC] update mlir/examples create APIs (31/n) (#150652) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
Fix typo in LangRef.md regarding regions (#167242) | 8 个月前 | |
[mlir][bufferization] Remove buffer-deallocation pass (#126366) The -buffer-deallocation pass is not compatible with One-Shot Bufferize and has been replaced with the Ownership-based Buffer Deallocation pass about 1.5 years ago. To clean up the code base, this commit removes the deprecated buffer-deallocation pass. All uses of this deprecated pass within MLIR have already been migrated. Note for LLVM integration: If you depend on this pass, migrate to the Ownership-based Buffer Deallocation pass or copy the pass to your codebase. For details, see https://discourse.llvm.org/t/psa-bufferization-new-buffer-deallocation-pipeline/73375. | 1 年前 | |
[mlir][NFC] update mlir/examples create APIs (31/n) (#150652) See https://github.com/llvm/llvm-project/pull/147168 for more info. | 1 年前 | |
[mlir][ods] Enable granular pass registration. (#166532) Same as with pass def & decl. This doesn't change anything with registry and the big flag kept (e.g., GEN_PASS_REGISTRATION behaves like GEN_PASS_DECL and so too for sub ones). | 8 个月前 | |
[NFC][mlir][mesh,shard] Fixing misnomers in mesh dialect, renaming 'mesh' dialect to 'shard' (#150177) Dialect to 'shard' (discourse 87053) - dialect name mesh -> shard - (device) mesh -> (device) grid - spmdize -> partition A lot of diffs, but simple renames only. @tkarna @yaochengji | 1 年前 | |
[mlir][IR] Deprecate match and rewrite functions (#130031) Deprecate the match and rewrite functions. They mainly exist for historic reasons. This PR also updates all remaining uses of in the MLIR codebase. This is addressing a [comment](https://github.com/llvm/llvm-project/pull/129861#pullrequestreview-2662696084) on an earlier PR. Note for LLVM integration: SplitMatchAndRewrite will be deleted soon, update your patterns to use matchAndRewrite instead of separate match / rewrite. --------- Co-authored-by: Jakub Kuderski <jakub@nod-labs.com> | 1 年前 | |
[MLIR][Quant] Fix equations in Quantization.md This patch fixes the equations on the Quantization page (https://mlir.llvm.org/docs/Quantization/). I don't know what caused the equations to be broken, it might be https://github.com/llvm/mlir-www/pull/152, but I'm not sure. Irregardless, let's just fix it and be done with it. I've fixed the equations by moving some subscripts to the text. For some reason, the large number of subscripts caused Mathjax to fail. I've also tried KaTeX, which failed at exactly the same number of subscripts. The workflow to inspect the fix is as follows: $ git clone --depth=1 https://github.com/llvm/mlir-www.git /some/path/mlir-www $ git clone --depth=1 https://github.com/llvm/llvm-project.git /some/path/llvm-project $ cp /some/path/llvm-project/mlir/docs/Quantization.md \ /some/path/mlir-www/website/content/Quantization.md $ cd /some/path/mlir-www/website $ hugo serve [...] Web Server is available at http://localhost:1313/ (bind address 127.0.0.1) Press Ctrl+C to stop and view the page at http://localhost:1313/Quantization/. Reviewed By: stellaraccident Differential Revision: https://reviews.llvm.org/D152651 | 3 年前 | |
[mlir] Add short readme.txt to docs directory Summary: Refer folks to the main website and make it explicit that the rendered output is what is of interest and that the GitHub viewing experience may not match (even though we are trying to keep it as close as possible, the renderers do differ). Differential Revision: https://reviews.llvm.org/D74739 | 6 年前 | |
[mlir] Rename mlir-cpu-runner to mlir-runner (#123776) With the removal of mlir-vulkan-runner (as part of #73457) in e7e3c45bc70904e24e2b3221ac8521e67eb84668, mlir-cpu-runner is now the only runner for all CPU and GPU targets, and the "cpu" name has been misleading for some time already. This commit renames it to mlir-runner. | 1 年前 | |
[MLIR] Introduce RemarkEngine + pluggable remark streaming (YAML/Bitstream) (#152474) This PR implements structured, tooling-friendly optimization remarks with zero cost unless enabled. It implements: - RemarkEngine collects finalized remarks within MLIRContext. - MLIRRemarkStreamerBase abstract class streams them to a backend. - Backends: MLIRLLVMRemarkStreamer (bridges to llvm::remarks → YAML/Bitstream) or your own custom streamer. - Optional mirroring to DiagnosticEngine (printAsEmitRemarks + categories). - Off by default; no behavior change unless enabled. Thread-safe; ordering best-effort. ## Overview Passes (reportOptimization*) │ ▼ +-------------------+ | RemarkEngine | collects +-------------------+ │ │ │ mirror │ stream ▼ ▼ emitRemark MLIRRemarkStreamerBase (abstract) │ ├── MLIRLLVMRemarkStreamer → llvm::remarks → YAML | Bitstream └── CustomStreamer → your sink ## Enable Remark engine and Plug LLVM's Remark streamer `` // Enable once per MLIRContext. This uses MLIRLLVMRemarkStreamer mlir::remark::enableOptimizationRemarksToFile( ctx, path, llvm::remarks::Format::YAML, cats); ## API to emit remark // Emit from a pass remark::passed(loc, categoryVectorizer, myPassname1) << "vectorized loop"; remark::missed(loc, categoryUnroll, "MyPass") << remark::reason("not profitable at this size") // Creates structured reason arg << remark::suggest("increase unroll factor to >=4"); // Creates structured suggestion arg remark::passed(loc, categoryVectorizer, myPassname1) << "vectorized loop" << remark::metric("tripCount", 128); // Create structured metric on-the-fly `` | 11 个月前 | |
[mlir] Rename mlir-cpu-runner to mlir-runner (#123776) With the removal of mlir-vulkan-runner (as part of #73457) in e7e3c45bc70904e24e2b3221ac8521e67eb84668, mlir-cpu-runner is now the only runner for all CPU and GPU targets, and the "cpu" name has been misleading for some time already. This commit renames it to mlir-runner. | 1 年前 | |
[mlir] add TOC to top-level documents Multiple top-level MLIR documents did not have a table of contents tag, making them harder to nagivate. | 3 年前 | |
[mlir] [doc] fix typos in documentation (#120179) This PR fixes typos within documentation in various files. Most changes are trivial. The one interesting change is the documentation for custom<X> in assemblyFormat that used the wrong return type. The return type from the parseX function should be ParseResult rather than LogicalResult. The ParseResult type is necessary due to tablegen generating code like the following within an Op parse() function: auto odsResult = parseInferredArrayType(parser, elementsTypes, elementsOperands, resultRawTypes[0]); if (odsResult) return ::mlir::failure(); This will fail to compile if parseInferredArrayType() returns LogicalResult. See also parsePrettyLLVMType() in LLVMTypes.h, parseSingleBlockRegion() in IRDL.cpp, parseDynamicIndexList() in ViewLikeInterface.cpp, etc. | 1 年前 | |
[mlir][docs] Add C example for C-compatible wrapper for LLVM IR (#120955) TargetLLVMIR documentation introduced the C-compatible wrapper function for a MLIR function and ways to generate it, but did not demonstrate the corresponding C function signature for them. The C function signature is not obvious, in that * MemrefDescriptor should be passed as _pointer_. + For example, MLIR function could return a new Descriptor, so pointer is a must. + Surprisingly, directly pass the struct, by C convention, is also a pointer so some function will work, but that is implicit and error-prone. * for @foo() -> memref<>, the return type becomes the first argument in _mlir_ciface_foo(%arg0: !llvm.ptr). + This is described in https://github.com/llvm/llvm-project/blob/f70ab7d909d6861c7eec5ab40679bde16ab826c6/mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp#L110-L167 Especially by code size_t argOffset = resultStructType ? 1 : 0; saying the actual argument starts at 1 when result is a struct (memref) Users using the wrong signature will get incorrect results. LLVM discourse has some example of it * https://discourse.llvm.org/t/how-to-compile-and-link-with-other-c-c-programs/4835/10 * https://discourse.llvm.org/t/segmentation-fault-on-memref-store/80286/3 * https://discourse.llvm.org/t/memref-store-storing-a-memref-load/80307 Cc @ftynse for relevent commit history. Cc @charitha22 and @Wheest from discourse post. | 1 年前 | |
[mlir] Bootstrap doxygen config Add basic doxygen config following clang and llvm example with minimal changes. | 6 年前 | |
[Documentation] Always use SVG for dot-generated doxygen images. (#136843) Despite our attempt (build-docs.sh) to build the documentation with SVG, it still uses PNG https://llvm.org/doxygen/classllvm_1_1StringRef.html, and that renders terribly on any high dpi display. SVG leads to smasller installation and works fine on all browser (that has been true for _a while_ https://caniuse.com/svg), so this patch just unconditionally build all dot graphs as SVG in all subprojects and remove the option. | 1 年前 |
MLIR documentation
Please note mlir.llvm.org is where MLIR's rendered documentation is displayed. The viewing experience on GitHub or elsewhere may not match those of the website. For any changes please verify instead that they work on the main website first.
See https://github.com/llvm/mlir-www for the website generation information.