Skip to content

[HIP] [Bugfix] sample: Map exponential's top uniform bucket to a positive sample - #7576

Merged
junhaha666 merged 1 commit into
ROCm:mainfrom
syang-genai:fix/exponential-top-bucket-sign
Nov 20, 2026
Merged

junhaha666 merged 1 commit into
ROCm:mainfrom
syang-genai:fix/exponential-top-bucket-sign

Conversation

@syang-genai

@syang-genai syang-genai commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

exponential_func_impl maps the uniform's top float32 bucket to a negative sample instead of a tiny positive one. As a result, mixed_sample and random_sample can never draw the affected token, and they under-sample the low-probability tail. This is a one-character fix, plus an op test.

Motivation

For rand >= 1 - eps/2, the function returns c * b with c = -1/lambd. With b = +eps/2, that sample is negative. at::transformation::exponential uses -eps/2 for this bucket, so the sample is +eps/(2*lambd): a near-zero exponential, which in the race argmax p / E almost always wins, as it should. A negative sample makes p / E negative, so that token can never win.

About 8.7e-8 of hiprand's uniforms land in the bucket, so with a 129,280-token vocab about 1.1% of rows have one such element. Those are exactly the draws through which most of the low-probability tail gets picked. This came up while checking whether ATOM could switch its temperature path from mixed_sample_outer_exponential (fed by torch's exponential_) to mixed_sample: ROCm/ATOM#2928.

Changes

  • csrc/kernels/sample_kernels.cu: b = -epsilon/2, matching torch. This affects mixed_sample, random_sample and exponential; the *_outer_exponential kernels are unchanged.
  • op_tests/test_sample.py: check_exponential_is_positive, run after the existing edge checks.

Performance (if applicable)

Not applicable. The fix changes a constant, and the code path is the same.

Testing

  • Unit tests added or updated
  • Performance benchmarks run
  • Tested on MI250X
  • Tested on MI300X (tested on MI355X by @yelkhamra, see comments)

Documentation

  • No documentation change is needed, with the reason stated below

It's a correctness fix with no API change.

Dependencies

  • No new third-party dependencies added

Breaking Changes

None in the API. Sampled tokens for a given seed change in the rare rows that hit the bucket, since those tokens can now be drawn.

PR Self-Review

Reviewed revision

4beb983

Behavior and intent

An exponential sample is never negative. Before this change, about 8.7e-8 of samples were, which took one candidate out of about 1.1% of rows in mixed_sample and random_sample at a 129k vocab.

Validation and unverified scope

On gfx1151 (Strix Halo, ROCm 7.2.4, torch 2.9.1), I applied the same one-line change to the AITER build in my container, rebuilt module_sample through the JIT, and compared it with the stock build. The setup was 64 rows with identical heavy-tailed bf16 logits, a 129,280-token vocab, and 128,000 draws per temperature.

negative samples in 2^27 aiter.exponential draws mixed_sample share of p < 1e-6 tokens at T = 0.7 (target 1.42%) at T = 1.0 (target 2.19%)
before 18 1.00% 1.75%
after 0 1.31% 2.15%

For reference, mixed_sample_outer_exponential fed torch.exponential_ gives 1.24% / 2.15% on the same inputs. To pin the cause, I fed mixed_sample_outer_exponential noise built from the same uniforms with each sign for this bucket. The +eps/2 version reproduces the stock mixed_sample deficit (0.96% / 1.74%), and the -eps/2 version matches torch. The small remaining gap at T = 0.7 also shows up with exact float64 noise, so it's unrelated.

@yelkhamra also ran it on an MI355X (gfx950, ROCm 7.2.4): no non-positive samples after the change, and the same tail recovery at T = 1.0 and 1.5 with hot_tail.py (2,048,000 draws per cell). See the comments on this PR.

Not verified:

  • MI250X / MI300X. The change is arch-independent, and so is the bucket rate, which comes from hiprand's Philox output.
  • Running the full op_tests/test_sample.py against this branch's tree. My machine's AITER build is older, so I ran the new check's logic standalone against both builds.

PR-specific question

  • Which paths use it. exponential_func_impl is the transform for the three kernels that draw their own noise:

    • random_sample;
    • mixed_sample, for rows with T != 0 (T == 0 rows still go to argmax_impl);
    • exponential.

    The *_outer_exponential kernels and greedy_sample don't call it.

  • Architecture, dtype and shape.

    • It's plain HIP compiled into module_sample for every target arch, with no arch-specific branch.
    • The noise is computed in fp32 whatever the logits dtype (VLLM_DISPATCH_FLOATING_TYPES). exponential casts it to its output dtype afterwards; the new value, about 6e-8 / lambd, is representable and positive in fp32, bf16 and fp16.
    • It works per element, with no shape-dependent path.
  • Invariant. hiprand_uniform4 returns rand in (0, 1]. Below the bucket, -logf(rand) / lambd > 0; in the bucket, the sample is now +eps / (2 * lambd) > 0. So every sample is positive for lambd > 0. lambd <= 0 was never validated, and this PR doesn't change that.

Changed op tests

op_tests/test_sample.py: check_exponential_is_positive draws 2^27 samples from aiter.exponential and asserts none is <= 0. With the old sign it fails with about 11 negatives on average (P(pass) ≈ 2e-5). It isn't redundant: the existing checks cover row bounds, vocab edges and T = 0 argmax, not the values the transform produces.

@syang-genai
syang-genai requested a review from a team November 6, 2026 13:25
@github-actions github-actions Bot added the HIP label Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 7576 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

@aiter-bot

aiter-bot commented Nov 6, 2026 •

Copy link
Copy Markdown

READY FOR HUMAN REVIEW

PR Self-Review

Revision 4beb9833aecf · mode shadow

Author self-review accepted. Readiness report:

Author answers

  • PASS — current-SHA answers are present and structurally specific
Show the author's self-review answers

Behavior and intent

An exponential sample is never negative. Before this change, about 8.7e-8 of samples were, which took one candidate out of about 1.1% of rows in `mixed_sample` and `random_sample` at a 129k vocab.

Validation and unverified scope

On gfx1151 (Strix Halo, ROCm 7.2.4, torch 2.9.1), I applied the same one-line change to the AITER build in my container, rebuilt `module_sample` through the JIT, and compared it with the stock build. The setup was 64 rows with identical heavy-tailed bf16 logits, a 129,280-token vocab, and 128,000 draws per temperature.

| | negative samples in 2^27 `aiter.exponential` draws | `mixed_sample` share of p < 1e-6 tokens at T = 0.7 (target 1.42%) | at T = 1.0 (target 2.19%) |
|---|---|---|---|
| before | 18 | 1.00% | 1.75% |
| after | 0 | 1.31% | 2.15% |

For reference, `mixed_sample_outer_exponential` fed `torch.exponential_` gives 1.24% / 2.15% on the same inputs. To pin the cause, I fed `mixed_sample_outer_exponential` noise built from the same uniforms with each sign for this bucket. The `+eps/2` version reproduces the stock `mixed_sample` deficit (0.96% / 1.74%), and the `-eps/2` version matches torch. The small remaining gap at T = 0.7 also shows up with exact float64 noise, so it's unrelated.

@yelkhamra also ran it on an MI355X (gfx950, ROCm 7.2.4): no non-positive samples after the change, and the same tail recovery at T = 1.0 and 1.5 with `hot_tail.py` (2,048,000 draws per cell). See the comments on this PR.

Not verified:
- MI250X / MI300X. The change is arch-independent, and so is the bucket rate, which comes from hiprand's Philox output.
- Running the full `op_tests/test_sample.py` against this branch's tree. My machine's AITER build is older, so I ran the new check's logic standalone against both builds.

PR-specific question

- **Which paths use it.** `exponential_func_impl` is the transform for the three kernels that draw their own noise:
  - `random_sample`;
  - `mixed_sample`, for rows with T != 0 (T == 0 rows still go to `argmax_impl`);
  - `exponential`.

  The `*_outer_exponential` kernels and `greedy_sample` don't call it.
- **Architecture, dtype and shape.**
  - It's plain HIP compiled into `module_sample` for every target arch, with no arch-specific branch.
  - The noise is computed in fp32 whatever the logits dtype (`VLLM_DISPATCH_FLOATING_TYPES`). `exponential` casts it to its output dtype afterwards; the new value, about 6e-8 / `lambd`, is representable and positive in fp32, bf16 and fp16.
  - It works per element, with no shape-dependent path.
- **Invariant.** `hiprand_uniform4` returns `rand` in (0, 1]. Below the bucket, `-logf(rand) / lambd > 0`; in the bucket, the sample is now `+eps / (2 * lambd) > 0`. So every sample is positive for `lambd > 0`. `lambd <= 0` was never validated, and this PR doesn't change that.

Changed op tests

`op_tests/test_sample.py`: `check_exponential_is_positive` draws 2^27 samples from `aiter.exponential` and asserts none is `<= 0`. With the old sign it fails with about 11 negatives on average (P(pass) ≈ 2e-5). It isn't redundant: the existing checks cover row bounds, vocab edges and T = 0 argmax, not the values the transform produces.

PR state

  • PASS — pull request is marked ready for review

Copilot findings

  • PASS — no active Copilot finding lacks a substantive author reply
  • ADVISORY — Copilot did not review the current head SHA

Code and op-test hygiene

  • PASS — no committed artifact or conflict marker detected

Required CI

  • PASS — Black: passed
  • PASS — Ruff: passed
  • PASS — Repository dependency: passed
  • PASS — Aiter Test Gate: passed

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

@yelkhamra

Copy link
Copy Markdown
Contributor

@syang-genai thanks for the fix. Here is the MI3xx run you asked for, on an MI355X (gfx950, ROCm 7.2.4).

Setup. The image's aiter tree is an older public main commit (7be01d1c7) than this PR's base. Before changing anything, the run checked that the line this PR changes appears exactly once in exponential_func_impl, and that the fixed form is absent from that function. The "before" arm rebuilt the sample JIT module from the unmodified source. The "after" arm applied only your one-line sign change and rebuilt it again; the recorded source and module hashes differ between the arms. Each arm ran on one GPU, repeated with two different seeds.

Results

  • Exponential positivity. aiter.exponential produced non-positive samples before the change, at about the rate the size of the top uniform bucket predicts. It produced none after. A verbatim copy of your check_exponential_is_positive passes on the patched build.
  • Tail. I re-ran your tail experiment: identical rows over a vocab the size of yours, heavy-tailed bf16 logits, and the same three temperatures, compared with the exact float64 target.
    • Before the change, mixed_sample clearly under-samples the low-probability tail at every temperature, far beyond sampling noise. That matches what you saw on gfx1151.
    • After the change, its tail rate moves up to roughly where the materialized-noise path (exponential_(1) + mixed_sample_outer_exponential) sits.
    • The materialized path behaves the same before and after, as expected.
  • Residual gaps.
    • The small gap at the coolest temperature that you saw with exact noise shows up here too: in both paths after the fix, and in the materialized path before it. It looks common to both kernels, not sign-related.
    • At the hottest temperature, the fixed mixed_sample sat a little below the target in both reps, while the materialized path did not. It's small and may be noise, but I'm flagging it in case your equivalence script has more resolution there.
  • Other checks. No masked or out-of-range token ids in any run, and near-zero temperature still returns the argmax on both paths.

Not covered. The older tree predates the stock check_vocab_edges / check_exponential_row_bounds, so those were skipped. Your positivity check ran as a verbatim copy of the one your PR adds, on the patched build only.

On the ATOM side, the opt-in from ROCm/ATOM#2928 is ROCm/ATOM#3083. It uses the materialized-noise path for now, so it doesn't depend on this PR.

@syang-genai

Copy link
Copy Markdown
Contributor Author

@yelkhamra thank you, that's the MI3xx confirmation I was missing. The before/after arms with differing hashes and the check that the changed line appears exactly once make it easy to trust.

On the two residual gaps:

  • Coolest temperature: agreed, since it shows up in the materialized path before the fix as well, it isn't caused by the sign.
  • Hottest temperature, where the fixed mixed_sample sat a bit below the target: I'll re-run that case on gfx1151 with more draws to see whether it holds up outside noise, and post the numbers here either way. If it is real, it would be a separate issue from this sign fix, so I don't plan to hold this PR for it.

Nothing else to change on my side. Could a maintainer take a look when there's a chance? The change is one character in exponential_func_impl plus a regression test.

@syang-genai

Copy link
Copy Markdown
Contributor Author

@yelkhamra here is the higher-draw re-run of the hottest temperature I promised. On gfx1151, the fixed mixed_sample matches the target at T = 1.5 within noise, so I don't see the gap there.

Setup. gfx1151, ROCm 7.2.4, torch 2.9.1. 1,024 identical rows of the same heavy-tailed bf16 logits as before (129,280-token vocab), 2,000 calls, so 2,048,000 draws per path, per temperature, per seed, with seeds 1 and 2. The target is the float64 softmax of the bf16 logits. Tokens are grouped by target probability, and z is the deviation from the target in binomial standard errors. "Stock" and "fixed" are the same AITER tree with and without the one-line change, each JIT-rebuilt.

Share of draws on p < 1e-6 tokens (z in parentheses):

T target materialized stock mixed_sample fixed mixed_sample
1.0 2.195% 2.157% / 2.139% (−3.6 / −5.5) 1.770% / 1.776% (−41.5 / −40.9) 2.151% / 2.155% (−4.3 / −3.9)
1.5 1.411% 1.396% / 1.415% (−1.9 / +0.4) 1.226% / 1.226% (−22.5 / −22.4) 1.408% / 1.407% (−0.4 / −0.5)

The other bands (1e-6 to 1e-4, 1e-4 to 1e-2, and ≥ 1e-2) are within |z| ≤ 1.9 for the fixed mixed_sample and the materialized path in every cell. In the stock build, the mass missing from the tail shows up in the 1e-4 to 1e-2 band (z ≈ +5 to +11).

So:

  • At T = 1.5, the fixed kernel and the materialized path both match the target. Whatever you saw on MI355X doesn't reproduce here with about 16× the draws of my first run.
  • At T = 1.0, both paths sit about 0.04 points under the float64 target in the tail, by the same amount. That looks like the same effect common to both kernels you saw at the coolest temperature (fp32 arithmetic against a float64 reference), not something left over from the sign.

If the T = 1.5 gap on MI355X held up at a similar number of draws, it would point to something arch-specific. I'm happy to share the script (hot_tail.py, about 70 lines) if you want to run it there.

@yelkhamra

Copy link
Copy Markdown
Contributor

@syang-genai thanks for the higher-draw re-run and for following up on this.

Agreed on the gap we flagged at the hottest temperature: with our smaller draw count, it is consistent with noise, so your higher-draw result is the more reliable reading. The common offset at the coolest temperature also matches what we saw in both paths, so we agree it is not sign-related.

Yes, we would like to run hot_tail.py on MI355X at your scale and report back in this thread. Could you share it — a gist or an attachment is fine?

@syang-genai

Copy link
Copy Markdown
Contributor Author

@yelkhamra sure, here it is. It's a single file with no other imports from my setup; llm_like_logits is the same generator as in my earlier runs, so the logits match.

Run it once per build, with the label as the only argument, e.g. python3 hot_tail.py stock and then PYTHONPATH=<patched tree> python3 hot_tail.py fixed. It prints one line per (T, seed, path) and writes hot_tail_<label>.json. Each line shows, per probability band (p < 1e-6, 1e-6 to 1e-4, 1e-4 to 1e-2, ≥ 1e-2), the observed share, the target and z. On gfx1151 each build took about a minute, and the materialized path needs about 0.5 GiB for the noise tensor.

hot_tail.py
"""High-draw re-check of the hottest temperature for ROCm/aiter#7576.

Compares mixed_sample (in-kernel noise) and the materialized path
(exponential_ + mixed_sample_outer_exponential) against the float64 target,
with ~2M draws per path, temperature and seed, split into probability bands.
z is the deviation from the target in binomial standard errors.

Usage: python3 hot_tail.py <label>   (run once per AITER build; writes hot_tail_<label>.json)
"""

import json
import math
import sys

import torch
from aiter import mixed_sample, mixed_sample_outer_exponential

EPS = 1e-10  # SAMPLER_EPS in ATOM's sampler


def llm_like_logits(vocab, seed):
    """Heavy-tailed logits: a few strong candidates over a long low tail."""
    g = torch.Generator().manual_seed(seed)
    base = torch.randn(vocab, generator=g) * 2.0
    head = torch.randperm(vocab, generator=g)[:32]
    base[head] += torch.linspace(9.0, 4.0, 32)
    return base


label = sys.argv[1]
DEV = "cuda"
VOCAB, ROWS, CALLS = 129280, 1024, 2000
BANDS = [(0.0, 1e-6), (1e-6, 1e-4), (1e-4, 1e-2), (1e-2, 1.01)]


def materialized(logits, temps):
    out = torch.empty(logits.shape[0], dtype=torch.int, device=DEV)
    e = torch.empty(logits.shape, dtype=torch.float, device=DEV).exponential_(1)
    mixed_sample_outer_exponential(out, logits, e, temps, eps=EPS)
    return out


def in_kernel(logits, temps):
    out = torch.empty(logits.shape[0], dtype=torch.int, device=DEV)
    mixed_sample(out, logits, temps, lambd=1.0, eps=EPS)
    return out


logits = llm_like_logits(VOCAB, seed=0).to(DEV, torch.bfloat16)
logits = logits.expand(ROWS, -1).contiguous()
res = {"label": label, "vocab": VOCAB, "draws_per_cell": ROWS * CALLS, "cells": []}
for t in (1.0, 1.5):
    p = torch.softmax(logits[0].double() / t, dim=-1)
    band_id = torch.zeros(VOCAB, dtype=torch.long, device=DEV)
    for i, (lo, hi) in enumerate(BANDS):
        band_id[(p >= lo) & (p < hi)] = i
    target = [float(p[band_id == i].sum()) for i in range(len(BANDS))]
    temps = torch.full((ROWS,), t, device=DEV)
    for seed in (1, 2):
        for name, fn in (("materialized", materialized), ("mixed_sample", in_kernel)):
            torch.manual_seed(seed)
            counts = torch.zeros(len(BANDS), dtype=torch.long, device=DEV)
            for _ in range(CALLS):
                counts += torch.bincount(band_id[fn(logits, temps).long()], minlength=len(BANDS))
            n = ROWS * CALLS
            obs = [int(c) for c in counts.cpu()]
            z = [(o / n - q) / math.sqrt(q * (1 - q) / n) if 0 < q < 1 else float("nan")
                 for o, q in zip(obs, target)]
            cell = {"T": t, "seed": seed, "path": name, "target": target,
                    "observed": [o / n for o in obs], "z": z}
            res["cells"].append(cell)
            print(label, t, seed, name,
                  " ".join(f"{o / n:.5f}({q:.5f},z={zz:+.1f})" for o, q, zz in zip(obs, target, z)),
                  flush=True)
with open(f"hot_tail_{label}.json", "w") as f:
    json.dump(res, f, indent=1)

@yelkhamra

Copy link
Copy Markdown
Contributor

@syang-genai thanks for sharing it. We ran hot_tail.py unmodified on an MI355X (gfx950, ROCm 7.2.4). It ran once against the stock build and once after applying only your one-line change, with the sample JIT module rebuilt from source before each run.

The MI355X results line up with your gfx1151 ones on every point we re-ran (T = 1.0 and 1.5):

  • Stock build. mixed_sample under-samples the low-probability tail by a wide margin at both temperatures, and the missing mass shows up in the bands above it, mostly in the 1e-4 to 1e-2 band, as you saw. The materialized path is unaffected.
  • Fixed build, hottest temperature. mixed_sample matches the target in both seeds. The small gap we flagged earlier doesn't reproduce at this draw count, so it was noise from our smaller sample.
  • Fixed build, T = 1.0. In the p < 1e-6 band, both paths sit slightly under the float64 target by about the same small amount, and the other bands sit on the target. That matches the shortfall common to both kernels that you attributed to fp32 arithmetic against a float64 reference, rather than anything sign-related.
  • Materialized path. It is identical between the two builds, as expected.

So on MI355X the fix does what it says, with nothing left over from the sign. Thanks again for the careful follow-up.

@syang-genai

Copy link
Copy Markdown
Contributor Author

@yelkhamra thanks for running it on MI355X, and for writing up each point. Good to have both architectures agree.

@junhaha666 @yitingw1, could one of you take a look when you have a moment? You wrote and fixed the sample kernels (#7373). This is a one-character sign fix in exponential_func_impl plus a regression test in op_tests/test_sample.py, now checked on gfx950 and gfx1151.

@yitingw1

yitingw1 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Please fix CI first.

…tive sample

exponential_func_impl maps a uniform at or above 1 - eps/2 to a fixed tiny
sample instead of -log(u). It used +eps/2 for the log there, so the sample
came out as -eps/(2*lambd), a negative value. at::transformation::exponential
uses -eps/2, which gives the intended tiny positive sample.

mixed_sample and random_sample share this function. A negative sample makes
that token's p / E negative, so it can never be drawn. About 8.7e-8 of
hiprand's uniforms fall in the bucket, so on a 129,280-token vocab about 1.1%
of rows lose a candidate. Those are the draws through which most of the
low-probability tail gets picked: at T = 1, mixed_sample picked tokens with
p < 1e-6 at 1.75% against a target of 2.19%. With the fix it picks 2.15%,
the same as mixed_sample_outer_exponential fed torch's exponential_.

op_tests/test_sample.py gains check_exponential_is_positive: over 2**27
draws the old sign gives about 11 negatives (18 in my run), and the fix gives
none.

Signed-off-by: syang-genai <[email protected]>
@syang-genai
syang-genai force-pushed the fix/exponential-top-bucket-sign branch from d601964 to 4beb983 Compare November 9, 2026 12:34
@syang-genai

Copy link
Copy Markdown
Contributor Author

@yitingw1 thanks, will do. The failure wasn't in the change itself: the Ruff job stopped while installing reviewdog (reviewdog/action-setup exited 1 before ruff ran), so check-signal failed and the GPU test jobs were skipped, which is what failed the test gate. Ruff 0.16.0 (the pinned version) and Black both pass on the changed file locally.

I don't have permission to re-run jobs here, so I rebased onto current main to trigger a fresh run. The diff is unchanged.

@syang-genai

Copy link
Copy Markdown
Contributor Author

@yitingw1 thanks for approving the run. Ruff, Black and the other pre-checks pass on the rebased head now. The one failure is again outside the change: build_aiter_wheels couldn't pull its base image, rocm/pytorch:rocm7.2.4_ubuntu24.04_py3.12_pytorch_release_2.10.0, because Docker Hub answered 429 Too Many Requests on all 5 attempts (job log). The GPU tests were skipped and the test gate failed as a result.

I can't re-run jobs on this repo. Could you use "Re-run failed jobs" on run 42618160340 when you have a moment? Thanks!

@syang-genai

Copy link
Copy Markdown
Contributor Author

@yitingw1 thanks for the re-run: CI is green now, including the 8 MI35X standard-test shards and the test gate.

@junhaha666, it's ready for your review whenever you have a moment. It's the one-character sign fix in exponential_func_impl plus check_exponential_is_positive in op_tests/test_sample.py, and @yelkhamra's MI355X run above confirms it.

@syang-genai

Copy link
Copy Markdown
Contributor Author

@junhaha666 @yitingw1 a gentle follow-up: this has been green since 11-10 and is waiting on a review. It's 2 files: the one-character sign fix in exponential_func_impl (b = -epsilon/2, matching at::transformation::exponential) and check_exponential_is_positive in op_tests/test_sample.py. @yelkhamra confirmed it before and after on MI355X above.

It's also the AITER half of ROCm/ATOM#2928: until it lands, mixed_sample can't replace mixed_sample_outer_exponential on ATOM's temperature path without under-sampling the low-probability tail.

If someone else should review changes to sample_kernels.cu, I'm happy to re-request. Thanks!

@junhaha666
junhaha666 merged commit a485545 into ROCm:main Nov 20, 2026
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.

5 participants