Add minimal ONNX dialect build option#3263
Open
anuragsingh-tt wants to merge 4 commits intoonnx:mainfrom
Open
Conversation
Collaborator
|
Can one of the admins verify this patch? |
Author
|
Resolves #1597. |
Member
|
@jenkins-droid test this please |
77a8c7a to
2450d55
Compare
- Add ONNX_MLIR_ENABLE_ONLY_ONNX_DIALECT CMake flag for minimal builds - Decouple src/Dialect/Mlir from Compiler and Krnl dependencies - Add test-onnx-to-mlir utility for ONNX model import testing - Include documentation and CI workflow for minimal build - Exclude non-essential interfaces and third-party dependencies This enables building only the ONNX dialect and essential utilities without the full onnx-mlir compiler stack, useful for projects that only need ONNX dialect IR generation. Signed-off-by: Anurag <anuragsingh@tenstorrent.com>
2450d55 to
452ec52
Compare
Collaborator
|
The error in building is related to decomposeOpsInONNX. Do you want to exclude src/ONNX/Transform? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This enables building only the ONNX dialect and essential utilities without the full onnx-mlir compiler stack, useful for projects that only need ONNX dialect IR generation.
Testing:
cmake -S . -B build -G Ninja -DMLIR_DIR=llvm-project/build/lib/cmake/mlir -DONNX_MLIR_ENABLE_ONLY_ONNX_DIALECT=ON -DCMAKE_BUILD_TYPE=Releaseand run:
build/Release/bin/test-onnx-to-mlir <your_onnx.onnx>Full build: 1862 targets
"Minimal" build: 620 targets