{"id":15175877,"url":"https://github.com/ise-uiuc/nnsmith","last_synced_at":"2025-04-12T21:28:28.169Z","repository":{"id":60115253,"uuid":"422747069","full_name":"ise-uiuc/nnsmith","owner":"ise-uiuc","description":"Automatic DNN generation for fuzzing and more","archived":false,"fork":false,"pushed_at":"2025-01-14T04:16:54.000Z","size":1065,"stargazers_count":129,"open_issues_count":7,"forks_count":29,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-04T00:53:13.948Z","etag":null,"topics":["compiler","deep-learning","fuzzing","machine-learning","pytorch","tensorflow"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/nnsmith/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ise-uiuc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-30T00:33:45.000Z","updated_at":"2025-03-18T16:49:30.000Z","dependencies_parsed_at":"2023-12-22T05:22:45.551Z","dependency_job_id":"150d0254-2ae7-44a7-8d97-80b70c8b55f5","html_url":"https://github.com/ise-uiuc/nnsmith","commit_stats":{"total_commits":729,"total_committers":5,"mean_commits":145.8,"dds":0.3744855967078189,"last_synced_commit":"27200ee0abda1812d57a806a9bbc09d8917bc549"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ise-uiuc%2Fnnsmith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ise-uiuc%2Fnnsmith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ise-uiuc%2Fnnsmith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ise-uiuc%2Fnnsmith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ise-uiuc","download_url":"https://codeload.github.com/ise-uiuc/nnsmith/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248633961,"owners_count":21136955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","deep-learning","fuzzing","machine-learning","pytorch","tensorflow"],"created_at":"2024-09-27T12:43:29.065Z","updated_at":"2025-04-12T21:28:28.144Z","avatar_url":"https://github.com/ise-uiuc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://github.com/ganler/nnsmith-logo/raw/master/nnsmith-logo.png\" align=\"right\" alt=\"logo\" width=\"200px\"/\u003e\n\u003c/div\u003e\n\n# NNSmith\n\n[![](https://github.com/ise-uiuc/nnsmith/actions/workflows/ci.yaml/badge.svg)](https://github.com/ise-uiuc/nnsmith/actions/workflows/ci.yaml)\n[![](https://img.shields.io/pypi/v/nnsmith?color=g)](https://pypi.org/project/nnsmith/)\n[![](https://static.pepy.tech/badge/nnsmith)](https://pepy.tech/project/nnsmith)\n[![](https://img.shields.io/pypi/l/nnsmith)](https://github.com/ise-uiuc/nnsmith/blob/main/LICENSE)\n\n🌟NNSmith🌟 is a random DNN generator and a fuzzing infrastructure, primarily designed for automatically validating deep-learning frameworks and compilers.\n\n## Support Table\n\n\u003cdiv align=\"center\"\u003e\n\n| Models | [`tvm`](https://github.com/apache/tvm) | [`pt2`](https://pytorch.org/get-started/pytorch-2.0/) | [`torchjit`](https://pytorch.org/docs/stable/jit.html) | [`tensorrt`](https://github.com/NVIDIA/TensorRT) | [`onnxruntime`](https://github.com/microsoft/onnxruntime) | [`xla`](https://www.tensorflow.org/xla) | [`tflite`](https://www.tensorflow.org/lite) |\n| ------------ | ------------------------------------ | ----------------------------------------------- | ---------------------------------------------- | ----------------------------------------- | ------------------------------------- | ----------------------------------------------------- | ------------ |\n| ONNX         | ✅                                    |                                                |                                               | ✅ | ✅ |                                                       |  |\n| PyTorch |                                      | ✅📈 | ✅📈 |                                          |                                      |                                         |                                             |\n| TensorFlow |                                      |                                                       |                                                        |                                           |                                       | ✅                                                    | ✅ |\n\n✅: Supported; 📈: Supports gradient check;\n\n\u003c/div\u003e\n\n## Quick Start\n\n**Install latest code (GitHub HEAD):**\n\n```shell\npip install pip --upgrade\npip install \"nnsmith[torch,onnx] @ git+https://github.com/ise-uiuc/nnsmith@main\" --upgrade\n# [optional] add more front- and back-ends such as [tensorflow] and [tvm,onnxruntime,...] in \"[...]\"\n```\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eInstall latest stable release \u003c/b\u003e \u003ci\u003e[click]\u003c/i\u003e\u003c/summary\u003e\n\u003cdiv\u003e\n\n```shell\npip install \"nnsmith[torch,onnx]\" --upgrade\n```\n\n\u003c/div\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eInstall latest pre-release \u003c/b\u003e \u003ci\u003e[click]\u003c/i\u003e\u003c/summary\u003e\n\u003cdiv\u003e\n\n```shell\npip install \"nnsmith[torch,onnx]\" --upgrade --pre\n```\n\n\u003c/div\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003eSetting up graphviz for debugging\u003c/b\u003e \u003ci\u003e[click]\u003c/i\u003e\u003c/summary\u003e\n\u003cdiv\u003e\n\nGraphviz provides `dot` for visualizing graphs in nice pictures. But it needs to be installed via the following methods:\n\n```shell\nsudo apt-get install graphviz graphviz-dev      # Linux\nbrew install graphviz                           # MacOS\nconda install --channel conda-forge pygraphviz  # Conda\nchoco install graphviz                          # Windows\n\npip install pygraphviz  # Final step.\n```\n\nAlso see [pygraphviz install guidance](https://pygraphviz.github.io/documentation/stable/install.html).\n\n\u003c/div\u003e\n\u003c/details\u003e\n\n```shell\n# Generate a random model in \"nnsmith_outputs/*\"\nnnsmith.model_gen model.type=onnx debug.viz=true\n```\n\n## Learning More\n\n- 🐛 [**Uncovered bugs**](doc/bugs.md).\n- 📚 [**Documentation**](doc/): [CLI](doc/cli.md), [concept](doc/concept.md), [logging](doc/log-and-err.md), and [known issues](doc/known-issues.md).\n- 🤗 [**Contributing to NNSmith**](doc/CONTRIBUTING.md)\n- 📝 We use [hydra](https://hydra.cc/) to manage configurations. See `nnsmith/config/main.yaml`.\n\n## Papers\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003e 📜 NeuRI: Diversifying DNN Generation via Inductive Rule Inference \u003c/b\u003e \u003ci\u003e[click :: citation]\u003c/i\u003e\u003c/summary\u003e\n\u003cdiv\u003e\n\n```bibtex\n@article{liu2023neuri,\n  title = {NeuRI: Diversifying DNN Generation via Inductive Rule Inference},\n  author = {Liu, Jiawei and Peng, Jinjun and Wang, Yuyao and Zhang, Lingming},\n  journal = {arXiv preprint arXiv:2302.02261},\n  year = {2023},\n}\n```\n\n\u003c/div\u003e\n\u003c/details\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://arxiv.org/abs/2302.02261\"\u003e\u003cimg src=\"https://img.shields.io/badge/Paper-FSE'23-a55fed.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://arxiv.org/abs/2302.02261\"\u003e\u003cimg src=\"https://img.shields.io/badge/arXiv-2302.02261-b31b1b.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ise-uiuc/neuri-artifact\"\u003e\u003cimg src=\"https://img.shields.io/badge/artifact-git-black.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://doi.org/10.5281/zenodo.8319975\"\u003e\u003cimg src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.8319975.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cb\u003e 📜 NNSmith: Generating Diverse and Valid Test Cases for Deep Learning Compilers \u003c/b\u003e \u003ci\u003e[click :: citation]\u003c/i\u003e\u003c/summary\u003e\n\u003cdiv\u003e\n\n```bibtex\n@inproceedings{liu2023nnsmith,\n  title={Nnsmith: Generating diverse and valid test cases for deep learning compilers},\n  author={Liu, Jiawei and Lin, Jinkun and Ruffy, Fabian and Tan, Cheng and Li, Jinyang and Panda, Aurojit and Zhang, Lingming},\n  booktitle={Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 2},\n  pages={530--543},\n  year={2023}\n}\n```\n\n\u003c/div\u003e\n\u003c/details\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://dl.acm.org/doi/10.1145/3575693.3575707\"\u003e\u003cimg src=\"https://img.shields.io/badge/Paper-ASPLOS'23-a55fed.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://arxiv.org/abs/2207.13066\"\u003e\u003cimg src=\"https://img.shields.io/badge/arXiv-2207.13066-b31b1b.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"http://nnsmith-asplos.rtfd.io/\"\u003e\u003cimg src=\"https://img.shields.io/badge/artifact-doc-black.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/ganler/nnsmith-asplos-artifact\"\u003e\u003cimg src=\"https://img.shields.io/badge/artifact-git-black.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://doi.org/10.5281/zenodo.7222132\"\u003e\u003cimg src=\"https://zenodo.org/badge/DOI/10.5281/zenodo.7222132.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fise-uiuc%2Fnnsmith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fise-uiuc%2Fnnsmith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fise-uiuc%2Fnnsmith/lists"}