发布

  • [Refactor] Group prefetch params into PrefetchRequestSpec (#4121)

    frostbyte_neo 发布于 2026-07-22 19:55:48 +00:00

    • [Refactor] Group prefetch params into PrefetchRequestSpec

    Introduce a frozen PrefetchRequestSpec dataclass in distributed/api.py
    (alongside PrefetchHandle) bundling the six L2-fetch inputs: keys,
    layout_desc, extra_count, policy, attn_desc, mode.

    • PrefetchController.submit_prefetch_request(spec): replaces the six
      flat params and removes the fragile positional submission tuple; the
      field list now lives in one place.
    • StorageManager.submit_prefetch_task(spec, external_request_id='',
      skip_l2=False): takes the shared spec plus the two StorageManager-only
      orchestration knobs as explicit args (kept out of the spec so the
      controller's contract has no settable-but-ignored fields).
    • Update the six MP-module callers and all affected tests.

    No behavior change. mypy + non-CUDA mock tests pass; CUDA-gated prefetch
    tests require GPU CI.

    Signed-off-by: aeon-x talexcao@gmail.com

    下载附件