---
id: pr-sglang-24197
repo: sgl-project/sglang
pr: 24197
title: Refactor device timer, clean up metrics collector, and add fwd occupancy metric
author: merrymercy
date: '2026-05-01'
url: https://github.com/sgl-project/sglang/pull/24197
source_category: upstream-code
architectures:
- sm100
tags:
- benchmark_test
- cutlass
- gemm_quant
- scheduler_autotune
techniques:
- autotuning
- fine-grained-quantization
- tile-scheduling
hardware_features:
- fp8
kernel_types:
- gemm
- scheduler
languages:
- cuda-cpp
- cute-dsl
captured_at: '2026-05-16'
status: merged
merge_sha: ece8a1a78813f6f0bd8394b03589d144125d08fb
inclusion_reason: Mine shape sets, tolerance rules, warmup logic, and profile commands before mutating code.
changed_paths:
- docs/references/environment_variables.md
- python/sglang/srt/environ.py
- python/sglang/srt/layers/quantization/fp8_utils.py
- python/sglang/srt/managers/scheduler.py
- python/sglang/srt/managers/scheduler_runtime_checker_mixin.py
- python/sglang/srt/managers/tokenizer_manager.py
- python/sglang/srt/model_executor/cuda_graph_runner.py
- python/sglang/srt/model_executor/model_runner.py
- python/sglang/srt/observability/metrics_collector.py
- python/sglang/srt/observability/scheduler_metrics_mixin.py
- python/sglang/srt/speculative/eagle_draft_cuda_graph_runner.py
- python/sglang/srt/speculative/eagle_draft_extend_cuda_graph_runner.py
- python/sglang/srt/utils/device_timer.py
- python/sglang/srt/utils/request_logger.py
- test/registered/observability/test_metrics.py
- test/registered/perf/test_bench_one_batch_1gpu.py
artifact_dir: evidence/pull-bundles/sglang/gh-24197
head_ref_oid: c512a8c876adb54dd47c94757d1833a8ec71d045
---
# Refactor device timer, clean up metrics collector, and add fwd occupancy metric

- Repository: `sgl-project/sglang`
- PR: [24197](https://github.com/sgl-project/sglang/pull/24197)
- Decision: `Mine shape sets, tolerance rules, warmup logic, and profile commands before mutating code.`
- Reason: Mine shape sets, tolerance rules, warmup logic, and profile commands before mutating code.

## Changed Paths

- `docs/references/environment_variables.md`
- `python/sglang/srt/environ.py`
- `python/sglang/srt/layers/quantization/fp8_utils.py`
- `python/sglang/srt/managers/scheduler.py`
- `python/sglang/srt/managers/scheduler_runtime_checker_mixin.py`
- `python/sglang/srt/managers/tokenizer_manager.py`
- `python/sglang/srt/model_executor/cuda_graph_runner.py`
- `python/sglang/srt/model_executor/model_runner.py`
- `python/sglang/srt/observability/metrics_collector.py`
- `python/sglang/srt/observability/scheduler_metrics_mixin.py`
- `python/sglang/srt/speculative/eagle_draft_cuda_graph_runner.py`
- `python/sglang/srt/speculative/eagle_draft_extend_cuda_graph_runner.py`
- `python/sglang/srt/utils/device_timer.py`
- `python/sglang/srt/utils/request_logger.py`
- `test/registered/observability/test_metrics.py`
- `test/registered/perf/test_bench_one_batch_1gpu.py`

## Evidence Bundle

`evidence/pull-bundles/sglang/gh-24197`
