pytorch/pytorch SLOC report

As of 2026-09-07 (commit c0b76369a313), pytorch/pytorch contains 3,212,571 total lines: 2,513,028 code, 333,203 comments, 366,340 blank, across 8,675 files in 33 languages (top: Python 46.2%). Counted with tokei via OctoCounts.

As of 2026-09-07 (commit c0b76369a313), pytorch/pytorch contains 3,212,571 total lines: 2,513,028 code, 333,203 comments, 366,340 blank, across 8,675 files in 33 languages (top: Python 46.2%). Counted with tokei via OctoCounts.

OctoCounts produced this report by resolving pytorch/pytorch to commit c0b76369a313, 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 78.2% of all lines, comments represent 10.4%, and the repository averages 290 code lines per file. Python accounts for 46.2% of counted code.

LanguageFilesLinesCodeCommentsBlanks
Python311114409851161582106805172598
C++17458185676601337847879956
C Header22485918154355258082275468
CUDA324874937217663528965
C193424753556927294177
Objective-C++117382803160223054373
Metal Shading Language51251802138417072089
YAML13212691667311643432
CMake111222631593440222307
C++ Header85182481254630372665
Bazel481304811933469646
GNU Style Assembly421120791093131785

Top language (Python 46.2%). Generated at 2026-09-07T08:24:49.458399685+00:00.

Report FAQ

How many lines of code does pytorch/pytorch have?

pytorch/pytorch has 3,212,571 total lines, including 2,513,028 code lines, 333,203 comment lines, and 366,340 blank lines.

How was the pytorch/pytorch line count measured?

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

What commit was counted for pytorch/pytorch?

This OctoCounts report was generated from main at commit c0b76369a313 on 2026-09-07T08:24:49.458399685+00:00.

Similar repository reports

Other public repositories with an OctoCounts report, ranked by top language and code size similarity: