{
  "schemaVersion": 1,
  "lessonId": "distributed-03",
  "contentHash": "8513af7c9ad7fd790134999a25b276112f6429a15cdbb2fd3f2528075d7372fa",
  "rendererHash": "a1bd5b648f4731ae5d5f0a24811c2540d1a0a132149ce589d17c4113509cbedf",
  "kind": "executed",
  "generatedAt": "2026-10-20T10:46:04.411433+00:00",
  "provenance": "recorded_cpu_computation",
  "environment": {
    "backend": "cpu",
    "deviceCount": 4,
    "jax": "0.9.2",
    "numpy": "2.4.4",
    "matplotlib": "3.10.8"
  },
  "stdout": "Gradient reference: [0.0029296851716935635, 0.00219726306386292, 0.0014648411888629198, 0.0007324193138629198, -2.6193447411060333e-09, -0.000732424552552402, -0.001464846427552402, -0.002197268418967724]\nLocal result shapes: replicated (8,), reduce-scatter (2,), gathered (8,)\nIdealized ring bytes per rank: 48.0 24.0\nCompleted CPU median microseconds: {'all_reduce': 90.74993431568146, 'reduce_scatter': 83.24999362230301, 'all_gather_only': 73.20800796151161}\n",
  "data": {
    "panels": [
      {
        "kind": "bar",
        "labels": [
          "all-reduce",
          "reduce-scatter",
          "after gather"
        ],
        "ylabel": "values stored per device",
        "series": [
          {
            "label": "observed local shape",
            "y": [
              8,
              2,
              8
            ]
          }
        ]
      },
      {
        "kind": "bar",
        "labels": [
          "all-reduce",
          "reduce-scatter",
          "scatter + gather"
        ],
        "ylabel": "modeled bytes per rank",
        "series": [
          {
            "label": "idealized ring payload",
            "y": [
              48.0,
              24.0,
              48.0
            ]
          }
        ]
      }
    ]
  },
  "diagram": {
    "title": "Reduce-scatter followed by all-gather",
    "prediction": "Does every participant hold the complete reduced array after reduce-scatter?",
    "reading": "Contributions \\([1,2]\\) and \\([3,4]\\) are summed into portions \\([4]\\) and \\([6]\\). After reduce-scatter neither participant holds the full result. All-gather then gives each \\([4,6]\\). This analytic example shows ownership, not a physical schedule or measured traffic.",
    "alt": "Contributions \\([1,2]\\) and \\([3,4]\\) are summed into portions \\([4]\\) and \\([6]\\). After reduce-scatter neither participant holds the full result. All-gather then gives each \\([4,6]\\). This analytic example shows ownership, not a physical schedule or measured traffic.",
    "scope": "Architecture and dataflow mechanism diagram.",
    "height": 3.8,
    "panel": {
      "kind": "table",
      "headers": [
        "Stage",
        "Participant 0",
        "Participant 1"
      ],
      "rows": [
        [
          "Contribution",
          "[1, 2]",
          "[3, 4]"
        ],
        [
          "Reduce-scatter",
          "[4]",
          "[6]"
        ],
        [
          "All-gather",
          "[4, 6]",
          "[4, 6]"
        ]
      ]
    }
  }
}
