[CI][ROCm] Fix order-dependent test_rocm_aiter_sampler_defers_import (CPU tensors hit Triton) (#62213)

Signed-off-by: khluu <khluu000@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
Kevin H. Luu
2026-10-18 01:10:08 +00:00
committed by GitHub
co-authored by Claude Opus 5.5 Andreas Karatzas
parent 9c778e9ff8
commit 03ee2e134d
+2 -2
View File
@@ -110,8 +110,8 @@ def test_rocm_aiter_sampler_defers_import_when_generators_force_native(
monkeypatch.setattr("builtins.__import__", guard_aiter_sampling_import)
sampler = topk_topp_sampler.TopKTopPSampler()
logits = torch.randn(2, 8)
k = torch.full((2,), 2, dtype=torch.int32)
logits = torch.randn(2, 8, device=DEVICE_TYPE)
k = torch.full((2,), 2, dtype=torch.int32, device=DEVICE_TYPE)
generators = {0: torch.Generator(device=logits.device).manual_seed(0)}
token_ids, logits_to_return = sampler(logits, generators, k, None)