{"data":{"slug":"onnx-onnx-mlir","name":"onnx-mlir","tagline":"Representation and Reference Lowering of ONNX Models in MLIR Compiler Infrastructure","github_url":"https://github.com/onnx/onnx-mlir","owner":"onnx","repo":"onnx-mlir","owner_avatar_url":"https://avatars.githubusercontent.com/u/31675368?v=4","primary_language":"C++","stars":1036,"forks":443,"topics":[],"archived":false,"github_pushed_at":"2026-07-10T07:14:29+00:00","maintenance_label":"Very active","url":"https://www.graphcanon.com/tools/onnx-onnx-mlir","markdown_url":"https://www.graphcanon.com/tools/onnx-onnx-mlir.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/onnx-onnx-mlir","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=onnx-onnx-mlir","description":"Representation and Reference Lowering of ONNX Models in MLIR Compiler Infrastructure","homepage_url":null,"license":"Apache-2.0","open_issues":352,"watchers":35,"ai_summary":null,"readme_excerpt":"<p align=\"center\"><img width=\"50%\" src=\"docs/logo/onnx-mlir-1280x640.png\" /></p>\n\n# ONNX-MLIR\n\nThis project (https://onnx.ai/onnx-mlir/) provides compiler technology to transform a valid Open Neural Network Exchange (ONNX) graph into code that implements the graph with minimum runtime support.\nIt implements the [ONNX standard](https://github.com/onnx/onnx#readme) and is based on the underlying [LLVM/MLIR](https://mlir.llvm.org) compiler technology.\n\n| System        | Build Status | Model Zoo Status |\n|---------------|--------------|------------------|\n| s390x-Linux   |  |  |\n| amd64-Linux   |  |  |\n| amd64-Windows |  | |\n| amd64-macOS   |  |\n| |  |\n\nThis project contributes:\n* an ONNX Dialect that can be integrated in other projects,\n* a compiler interfaces that lower ONNX graphs into MLIR files/LLVM bytecodes/C & Java libraries,\n* an `onnx-mlir` driver to perform these lowering,\n* and a python/C/C++/Java runtime environment.\n\nCurrent levels of support for the code generation of ONNX operations are listed here for\n[a generic CPU](docs/SupportedONNXOps-cpu.md) and\n[IBM's Telum integrated AI accelerator](docs/SupportedONNXOps-NNPA.md).\n\n## Interacting with the community.\n\nFor ongoing discussions, we use an [`#onnx-mlir-discussion`](https://lfaifoundation.slack.com/archives/C01J4NAL4A2) slack channel established under the Linux Foundation AI and Data Workspace.\nJoin this workspace using this [link](https://join.slack.com/t/lfaifoundation/shared_invite/zt-o65errpw-gMTbwNr7FnNbVXNVFkmyNA).\n\nWe use GitHub Issues for request for comments, questions, or bug reports.\nSecurity-related issues are reported using the channels listed in the [SECURITY](SECURITY.md) page.\n\nWe hold informal weekly meetings on Tuesdays where we discuss  current issues and progress. Meeting agenda, notes, and links (to participate) are found [here](https://github.com/onnx/onnx-mlir/wiki/Informal-meeting-agenda-and-notes). Please email alexe@us.ibm.com to request a 15-30 min time slot to discuss a specific topic of interest.\n\n## Setting up ONNX-MLIR using Prebuilt Containers\n\nThe preferred approach to using and developing ONNX-MLIR is to use Docker Images and Containers, as getting the proper code dependences may be tricky on some systems. Our instructions on using ONNX-MLIR with Dockers are [here](docs/Docker.md).\n\nIf you intend to develop code, you should look at our [workflow](docs/Workflow.md) document which help you setup your Docker environment in a way that let you contribute code easily.\n\n## Setting up ONNX-MLIR directly\n\nONNX-MLIR runs natively on Linux, OSX, and Windows.\nDetailed instructions are provided below.\n\n### Prerequisites\n\n\n```\npython >= 3.11\nclang >= 18.1.3\nprotobuf >= 33.5\ncmake >= 3.26.0\nmake >= 4.3 or ninja >= 1.10.2\njava >= 21 (optional)\n```\n\nAll the `PyPi` package dependencies and their appropriate versions are captured in [requirements.txt](requirements.txt).\n\nLook [here](docs/Prerequisite.md) for help to set up the prerequisite software.\n\nAt any point in time, ONNX-MLIR depends on a specific commit of the LLVM project that has been shown to work with the project.\nPeriodically the maintainers need to move to a more recent LLVM level.\nAmong other things, this requires to update the LLVM commit string in [clone-mlir.sh](utils/clone-mlir.sh).\nWhen updating ONNX-MLIR, it is good practice to check that the commit string of the MLIR/LLVM is the same as the one listed in that file. See instructions [here](docs/BuildONNX.md) when third-party ONNX also need to be updated.\n\n### Build\n\nDirections to install MLIR and ONNX-MLIR are dependent on your OS.\n* [Linux or OSX](docs/BuildOnLinuxOSX.md).\n* [Windows](docs/BuildOnWindows.md).\n\nAfter installation, an `onnx-mlir` executable should appear in the `build/Debug/bin` or `build/Release/bin` directory.\n\nIf you have difficulties building, rebuilding, or testing `onnx-mlir`, check this [page](docs/TestingHighLevel.md) for helpful hints.\n\n\n## Using ONNX-MLIR\n\nThe usage of `onnx-mlir` is as such:\n\n```\nOVERV","github_created_at":"2020-02-18T15:43:43+00:00","created_at":"2026-07-11T23:31:53.149118+00:00","updated_at":"2026-07-11T23:31:59.863717+00:00","categories":[{"slug":"vector-databases","name":"Vector Databases","url":"https://www.graphcanon.com/categories/vector-databases","markdown_url":"https://www.graphcanon.com/categories/vector-databases.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/vector-databases"},{"slug":"computer-vision","name":"Computer Vision","url":"https://www.graphcanon.com/categories/computer-vision","markdown_url":"https://www.graphcanon.com/categories/computer-vision.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/computer-vision"},{"slug":"inference-serving","name":"Inference & Serving","url":"https://www.graphcanon.com/categories/inference-serving","markdown_url":"https://www.graphcanon.com/categories/inference-serving.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/inference-serving"}],"tags":[{"slug":"c","name":"c++"}],"trust":{"provenance":{"is_fork":false,"github_id":241400276,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T23:31:57.134Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":2,"days_since_push":1,"last_release_at":"2026-06-07T19:31:11Z"},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":3,"high_count":0,"last_scan_at":"2026-07-11T23:31:57.597Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-11T23:31:56.859Z"},"languages":{"value":["c++","python"],"source":"github.language+pyproject.toml","observed_at":"2026-07-11T23:31:56.859Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-07-11T23:31:56.859Z"}}}}