From fd76507e9a6b57a6de7ad832deb4a15dc4d60195 Mon Sep 17 00:00:00 2001 From: Ekow Wellington <34079588+ekwhoa@users.noreply.github.com> Date: Tue, 31 Mar 2026 14:27:33 -0500 Subject: [PATCH] Install default plans under MSCCLPP_CACHE_DIR/default (#769) ### Summary Update the installer to place bundled default execution plans under `/default`, which is where the runtime already looks for bundled plans. ### Background The C++ runtime treats `MSCCLPP_CACHE_DIR` as the cache *root* and loads bundled default plans from `/default`. When `MSCCLPP_CACHE_DIR` was set, the installer instead wrote bundled plans directly into the cache root, causing the runtime to miss them. This surfaced while running benchmarking tests with a non-default `MSCCLPP_CACHE_DIR`, where the bundled plans were not being discovered. ### Change This PR updates the installer to always install bundled default plans into `/default`, preserving the existing runtime contract. ### Scope - Installer-only change - No runtime behavior changes ### Validation Manual inspection of the updated install path. Successful build --------- Co-authored-by: Ekow Wellington --- docs/dsl/quick_start.md | 4 ++++ docs/dsl/results.md | 3 +++ python/mscclpp/__main__.py | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/dsl/quick_start.md b/docs/dsl/quick_start.md index 6c32ec32..afccd48e 100644 --- a/docs/dsl/quick_start.md +++ b/docs/dsl/quick_start.md @@ -12,6 +12,10 @@ After finishing the installation in the quick start section, you can add the fol python3 -m mscclpp --install ``` +This installs bundled default execution plans into `~/.cache/mscclpp/default` by default. +If `MSCCLPP_CACHE_DIR` is set, bundled default plans are installed into `MSCCLPP_CACHE_DIR/default`. +`MSCCLPP_CACHE_DIR` specifies the cache root directory, so it should be set without `default` in the path. + ## Your First Algorithm: AllGather Let's walk through a simple AllGather algorithm to understand the DSL basics. This example demonstrates the key concepts without diving into all the advanced features. diff --git a/docs/dsl/results.md b/docs/dsl/results.md index 99f19476..a1adad2a 100644 --- a/docs/dsl/results.md +++ b/docs/dsl/results.md @@ -59,6 +59,9 @@ After installation, the generated JSON execution plan can be found at: ~/.cache/mscclpp/default/ ``` +If `MSCCLPP_CACHE_DIR` is set, bundled default plans are installed under `MSCCLPP_CACHE_DIR/default/`. +`MSCCLPP_CACHE_DIR` specifies the cache root directory, so it should be set without `default` in the path. + **Performance Results:** The figure below shows the performance characteristics for small message sizes in a two-node configuration: diff --git a/python/mscclpp/__main__.py b/python/mscclpp/__main__.py index d57cb362..6a6f5f28 100644 --- a/python/mscclpp/__main__.py +++ b/python/mscclpp/__main__.py @@ -57,7 +57,7 @@ default_algo_configs = [ def create_default_plans(): - plan_dir = os.environ.get("MSCCLPP_CACHE_DIR", Path.home() / ".cache/mscclpp/default") + plan_dir = os.path.join(os.environ.get("MSCCLPP_CACHE_DIR", Path.home() / ".cache/mscclpp"), "default") plan_path = Path(plan_dir) if plan_path.exists(): shutil.rmtree(plan_path)