# microsoft/onnxruntime SLOC report

> microsoft/onnxruntime: 2,502,446 code lines at commit 973f680e7042, counted with tokei-14.0.0 on 2026-10-21. Saved result 1b3047fadcdbc2a85d27c9735611a8ead4b219cfd1429fd65ec77d75b891539b.

microsoft/onnxruntime has 2,502,446 source lines of code out of 2,937,334 total lines across 7,508 files, counted from the main ref at commit 973f680e7042 by the OctoCounts tokei engine on 2026-10-21. The report is cached by commit, tokei version, and analysis options, so recounting the same revision returns exactly these numbers.

OctoCounts produced this report by resolving microsoft/onnxruntime to commit 973f680e7042, downloading the repository source archive, and counting every source file with tokei, the open-source line counter written in Rust. The table below breaks the count down by programming language into files, total lines, code lines, comment lines, and blank lines, so the figures can be compared across languages and projects. Results are cached by commit, tokei version, and analysis options, so counting the same revision again reproduces exactly these numbers.

## Repository size insights

This is a very large codebase by counted code lines. Code represents 85.2% of all lines, comments represent 7.6%, and the repository averages 333 code lines per file. C++ accounts for 67.6% of counted code.

| Language | Files | Lines | Code | Comments | Blanks |
| --- | ---: | ---: | ---: | ---: | ---: |
| C++ | 2,103 | 1,839,533 | 1,691,010 | 63,618 | 84,905 |
| C Header | 2,492 | 492,414 | 355,230 | 78,284 | 58,900 |
| Python | 636 | 160,995 | 126,732 | 10,703 | 23,560 |
| CUDA | 715 | 89,473 | 68,754 | 9,727 | 10,992 |
| GNU Style Assembly | 87 | 62,635 | 49,353 | 8,986 | 4,296 |
| TypeScript | 257 | 53,411 | 40,352 | 7,860 | 5,199 |
| JSON | 79 | 36,824 | 36,815 | 0 | 9 |
| C# | 75 | 32,041 | 21,906 | 6,894 | 3,241 |
| YAML | 212 | 24,078 | 20,592 | 962 | 2,524 |
| Assembly | 59 | 25,619 | 18,327 | 4,435 | 2,857 |
| CMake | 112 | 21,854 | 16,790 | 2,556 | 2,508 |
| JavaScript | 49 | 15,354 | 9,575 | 4,494 | 1,285 |
| Java | 48 | 12,205 | 6,469 | 4,631 | 1,105 |
| Go | 25 | 6,585 | 5,521 | 283 | 781 |
| C++ Header | 20 | 7,135 | 5,006 | 1,154 | 975 |
| C | 22 | 7,125 | 4,954 | 1,421 | 750 |
| Rust | 25 | 5,360 | 4,495 | 193 | 672 |
| Bitbake | 22 | 4,834 | 4,216 | 4 | 614 |
| Shell | 72 | 4,280 | 2,891 | 784 | 605 |
| CSS | 3 | 2,549 | 2,429 | 38 | 82 |
| Objective-C++ | 17 | 2,695 | 2,118 | 128 | 449 |
| TSX | 5 | 1,298 | 1,143 | 47 | 108 |
| XAML | 12 | 1,029 | 944 | 1 | 84 |
| Jupyter Notebooks | 7 | 1,599 | 927 | 394 | 278 |
| MSBuild | 19 | 1,027 | 766 | 124 | 137 |
| Batch | 18 | 852 | 645 | 42 | 165 |
| Visual Studio Solution | 6 | 642 | 638 | 0 | 4 |
| HLSL | 6 | 780 | 612 | 64 | 104 |
| PowerShell | 10 | 837 | 564 | 155 | 118 |
| SVG | 5 | 416 | 415 | 1 | 0 |
| XML | 21 | 430 | 381 | 16 | 33 |
| Dockerfile | 12 | 529 | 367 | 82 | 80 |
| FlatBuffers Schema | 3 | 436 | 316 | 43 | 77 |
| Forge Config | 3 | 2,692 | 298 | 1,805 | 589 |
| TOML | 5 | 170 | 142 | 10 | 18 |
| Autoconf | 10 | 188 | 132 | 38 | 18 |
| Liquid | 8 | 122 | 122 | 0 | 0 |
| LD Script | 12 | 118 | 107 | 0 | 11 |
| Templ | 6 | 109 | 105 | 1 | 3 |
| NuGet Config | 6 | 62 | 59 | 3 | 0 |
| Kotlin | 2 | 75 | 53 | 11 | 11 |
| Objective-C | 3 | 78 | 53 | 13 | 12 |
| Module-Definition | 14 | 48 | 47 | 1 | 0 |
| HTML | 1 | 23 | 23 | 0 | 0 |
| Jinja2 | 1 | 20 | 18 | 0 | 2 |
| Prolog | 2 | 15 | 14 | 0 | 1 |
| Just | 1 | 13 | 11 | 0 | 2 |
| INI | 1 | 9 | 8 | 0 | 1 |
| Swift | 1 | 4 | 1 | 2 | 1 |
| Markdown | 106 | 9,577 | 0 | 7,239 | 2,338 |
| Plain Text | 72 | 7,137 | 0 | 5,789 | 1,348 |

Top language (C++ 67.6%). Generated at 2026-10-21T03:13:03.036631910Z. Canonical report: https://octocounts.com/github/microsoft/onnxruntime/commit/973f680e7042057bb88245347dc52ce4e19f8f40?reportId=1b3047fadcdbc2a85d27c9735611a8ead4b219cfd1429fd65ec77d75b891539b&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D

## Reproduce this report

[Reproduce this exact report and configuration](https://octocounts.com/github/microsoft/onnxruntime/commit/973f680e7042057bb88245347dc52ce4e19f8f40?reportId=1b3047fadcdbc2a85d27c9735611a8ead4b219cfd1429fd65ec77d75b891539b&analysis=%7B%22profile%22%3A%22default%22%2C%22ignoredDirs%22%3A%5B%5D%2C%22includeDocs%22%3Afalse%2C%22includeTests%22%3Afalse%2C%22ignoredLanguages%22%3A%5B%5D%2C%22includeGenerated%22%3Afalse%7D).

## Report FAQ

### How many lines of code does microsoft/onnxruntime have?

microsoft/onnxruntime has 2,937,334 total lines, including 2,502,446 code lines, 223,036 comment lines, and 211,852 blank lines.

### How was the microsoft/onnxruntime line count measured?

OctoCounts resolved the public GitHub repository to commit 973f680e7042, downloaded the source archive, counted it with tokei, and cached the report by commit, tokei version, and analysis options.

### What commit was counted for microsoft/onnxruntime?

This OctoCounts report was generated from main at commit 973f680e7042 on 2026-10-21T03:13:03.036631910Z.

## Similar repository reports

- [ClickHouse/ClickHouse](https://octocounts.com/github/ClickHouse/ClickHouse) — C++, 2,532,335 code lines
- [swiftlang/swift](https://octocounts.com/github/swiftlang/swift) — C++, 2,277,258 code lines
- [Open-Cascade-SAS/OCCT](https://octocounts.com/github/Open-Cascade-SAS/OCCT) — C++, 2,086,221 code lines
- [RosettaCommons/rosetta](https://octocounts.com/github/RosettaCommons/rosetta) — C++, 3,115,217 code lines
- [ceph/ceph](https://octocounts.com/github/ceph/ceph) — C++, 1,942,925 code lines
- [Snowy-Fluffy/freshGram](https://octocounts.com/github/Snowy-Fluffy/freshGram) — C++, 1,703,149 code lines

## Related OctoCounts pages

- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [TensorFlow vs PyTorch](https://octocounts.com/compare/tensorflow-vs-pytorch)
- [Electron vs Tauri](https://octocounts.com/compare/electron-vs-tauri)
- [Godot vs Bevy](https://octocounts.com/compare/godot-vs-bevy)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [OctoCounts API docs](https://octocounts.com/docs/api)
