Skip to content

[NVIDIA] Added gpt-oss for H200 TRT. - #10

Merged
kimbochen merged 2 commits into
mainfrom
nv-gptoss-h200-trt
Sep 15, 2025
Merged

[NVIDIA] Added gpt-oss for H200 TRT.#10
kimbochen merged 2 commits into
mainfrom
nv-gptoss-h200-trt

Conversation

@kimbochen

Copy link
Copy Markdown
Collaborator

This PR with conflicts resolved

@kimbochen

Copy link
Copy Markdown
Collaborator Author

Verified the script works Run link
Thank you @kedarpotdar-nv

@kimbochen
kimbochen merged commit e631e3f into main Sep 15, 2025
@kimbochen
kimbochen deleted the nv-gptoss-h200-trt branch September 15, 2025 18:56
@cquil11 cquil11 added the NVIDIA label Apr 8, 2026
@cquil11 cquil11 changed the title Added gpt-oss for H200 TRT. [NVIDIA] Added gpt-oss for H200 TRT. Apr 8, 2026
Oseltamivir added a commit that referenced this pull request Aug 7, 2026
…alidation hook

queries.md #10. _encode_dispatch returned (dispatch_payload, oracle_semantic) and existed to let an
FP8 adapter send a prequantized payload with a matching oracle. Neither half of that is true any
more: every one of the four overrides returns x unchanged, because each adapter quantizes inside
dispatch() where production pays it, and each one's oracle half recomputes what semantic_payload
already returns. Two code paths that must agree, kept in sync by hand.

Verified equivalence per adapter before collapsing, since a mismatch here silently loosens the
combine gate rather than failing:
- deepep-v2 / uccl-ep normal: literally the same expression as semantic_payload.
- deepep-v2 / uccl-ep low-latency: the LL branch called the EAGER helper (_to_fp8,
  per_token_cast_to_fp8) while semantic_payload calls self._quant -- equal because
  fused_quantize returns its argument unchanged in low-latency mode, so _quant IS the eager
  helper there. Same callable, not merely same values.
- flashinfer-ep: normal only; same expression.
- mori: same expression.

So make_problem now sets dispatch_x = x and oracle_x = semantic_payload(x) unconditionally. Under
BF16 semantic_payload is identity, so oracle_x is x and the oracle compares exactly what it
compared before -- the sole consumer is getattr(problem, "oracle_x", problem.x) and nothing
branches on hasattr, which is what makes always-setting it safe.

The one behaviour _encode_dispatch had that semantic_payload lacks is the per-shape
assert_quantize_identity in normal-mode FP8: the guard that the COMPILED quantizer is bit-identical
to the eager one. That is preserved as _validate_quantizer, an explicit untimed hook, which is what
it always was underneath. The "computes the oracle once, untimed, compiling this rung's shape"
side effect survives too, because semantic_payload calls self._quant.

Left alone deliberately: the "caller-prequantized" wording in the module docstrings, README and
methodology. It was flagged as stale, but it describes the KERNEL contract -- MoRI and normal-mode
deepep/uccl kernels do receive an already-quantized tensor -- which remains accurate now that the
quantize sits in dispatch(). Rewriting only the adapter docstrings would have desynchronized them
from the docs that say the same true thing.

Tests: the base-identity test drops the tuple assertion, and a new one pins the contract that
replaced it -- dispatch_x IS x, oracle_x comes from semantic_payload, and semantic_payload is
called exactly once with x. 164 tests green.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants