Setup C++ Infra in GiGL#558
Conversation
GiGL Automation@ 23:19:08UTC : Starting to build base images for CUDA and CPU. |
GiGL Automation@ 23:22:33UTC : Starting to build base images for CUDA and CPU. |
GiGL Automation@ 23:32:11UTC : Built and pushed new images:
Updated |
svij-sc
left a comment
There was a problem hiding this comment.
Thanks!
Once the subsequent PR is in, lets do a formal release and test everything
…/GiGL into mkolodner-sc/cpp-infrastructure
|
/unit_test |
GiGL Automation@ 24:29:04UTC : 🔄 @ 01:40:23UTC : ✅ Workflow completed successfully. |
GiGL Automation@ 24:29:04UTC : 🔄 @ 24:36:25UTC : ✅ Workflow completed successfully. |
Scope of work done
C++ Infrastructure for GiGL
This PR adds the foundational C++ infrastructure to GiGL — everything needed to write, build, lint, and test C++ extensions alongside the existing Python codebase, and the release pipeline to ship them.
Two-wheel model
GiGL is now distributed as two wheels installed together:
Both wheels are versioned and released together.
gigl-coreis a dependency ofgigland is resolved automatically from the same GCP registry — no separate install step for users.Build system
gigl-core/is a standalone scikit-build-core + CMake package.CMakeLists.txtauto-discovers allcsrc/python_*.cpp(andpython_*.cu) files as pybind11 extension modules — adding a new extension requires only dropping source files, no CMake edits. pybind11 is fetched viaFetchContentso it does not need to be pre-installed. Torch is located by asking the target Python directly (torch.utils.cmake_prefix_path).no-build-isolation-package = ["gigl-core"]inpyproject.tomldisables build isolation forgigl-coreso cmake can find torch (not on PyPI) from the ambient venv when real extensions are added. Thebuild-backenddependency group provides scikit-build-core as the PEP 517 build backend in both dev and Docker environments.Release pipeline
release.ymlbuilds and publishes both wheels via a matrix build — one CPU runner, one GPU runner — to two GCP Artifact Registry repos (giglfor CPU,gigl-cu128for CUDA 12.8).RELEASING.mddocuments the two-workflow release process: Create Release (version bump, branch, tag, PR) followed by Release GiGL (wheel build and publish).C++ tooling
.clang-formatestablishes style conventions.make format_cppformats in-place..clang-tidyconfig.make check_lint_cpprunsclangd --checkin parallel (faster thanclang-tidydue to preamble caching).make fix_lint_cppapplies auto-fixable violations viaclang-tidy --fix(intentionally separate frommake formatsince it rewrites logic, not just style).requirements/install_cpp_deps.shinstallsclang-format-15,clang-tidy-15,clangd-15,clang++-15, andlibstdc++-12-devon Linux. (clang++-15requireslibstdc++-12-devon Ubuntu 22.04 to find standard headers.)docs/cpp_style_guide.mddocuments formatting rules, linting rationale, and disabled checks.C++ unit tests
gigl-core/tests/with GoogleTest (viaFetchContent). Any*_test.cppor*_test.cufile is automatically discovered and registered — no CMake edits needed to add a test. Run viamake unit_test_cpp; included inmake unit_test. A stamp file (.cache/cpp_tests/.configured) avoids re-running cmake configure when nothing changed;CONFIGURE_DEPENDSauto-invalidates when source files are added or removed.Where is the documentation for this feature?: N/A
Did you add automated tests or write a test plan?
Updated Changelog.md? NO
Ready for code review?: NO