repowisenvidia/nccl

Architecture of nvidia/nccl

nvidia/nccl is 834 source files holding 13,104 symbols across 8 modules, written mainly in C++, Python, Makefile. The largest module is src, with 404 files, and 13 files are entry points into the dependency graph.

How nccl fits together

The library source lives in src, the largest module with 404 files, and the Makefile target src.build compiles it into build/. Other Makefile targets such as pkg.debian.build, pkg.redhat.build, pkg.txz.build and pkg.python_wheel.build package the built library under build/pkg. The contrib directory holds 153 files of additional components, including contrib/nccl_ep/nccl_ep.cc, which is one of the listed entry points. The bindings directory has 46 files, including the nccl4py Python package with examples under bindings/nccl4py/examples. The docs directory has 95 files, including the C example docs/examples/01_communicators/01_multiple_devices_single_process/c/main.cc, and src/dev_runtime.cc and src/graph/topo.cc are listed among the hotspot files.

Largest modules

  • src: 404 files and 101,847 lines of code
  • contrib: 153 files and 38,801 lines of code
  • plugins: 117 files and 16,303 lines of code
  • docs: 95 files and 8,719 lines of code
  • bindings: 46 files and 6,163 lines of code
  • pkg: 9 files and 300 lines of code
  • .github: 5 files and 110 lines of code
  • root: 3 files and 260 lines of code

Languages

By file count: C++ 539 files, Python 121 files, Makefile 55 files, Shell 8 files, C 7 files, Dockerfile 1 file.

More on nccl: summary and FAQ, codebase overview, code health.

Related guide: Best dependency graph tools for monorepos