Skip to content

[FEATURE] Add profiling support for continuous batching #8459

Description

@nathon-lee

Context

HybridEngineRollout supports optional profiling through
HybridEngineRolloutConfig.enable_profiling.

When continuous batching is enabled through
SamplingConfig.continuous_batch_size, the continuous path currently bypasses
the profiling logic. As a result, generate() completes without recording a
profiling snapshot, and get_last_profile() does not provide useful timing
information for continuous-batching workloads.

Proposed work

Define and implement profiling support for continuous batching.

The profiling contract should clarify how to measure and report:

  • total rollout time;
  • prompt prefill time;
  • decode time;
  • scheduler and cache-management overhead;
  • number of decode forwards;
  • generated tokens and throughput;
  • active batch size and continuous-batching capacity.

Acceptance criteria

  • enable_profiling=True produces a profiling snapshot for continuous
    batching.
  • The reported fields have documented meanings for variable active batch sizes
    and independently retired rows.
  • Profiling remains disabled by default.
  • Enabling profiling does not change generated outputs or scheduling behavior.
  • Tests cover the profiling output for a deterministic continuous-batching
    workload.

Follow-up from DeepSpeed PR #8368. cc @delock

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions