From d585cec4bdab4990379430c0e7cb1a3329cc1811 Mon Sep 17 00:00:00 2001 From: "Po-Han Huang (NVIDIA)" <53919306+nvpohanh@users.noreply.github.com> Date: Wed, 2 Sep 2026 14:46:58 +0800 Subject: [PATCH] Fix nondeterministic FlashInfer GDN alignment test (#37343) --- .../unit/layers/attention/test_gdn_flashinfer_alignment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/registered/unit/layers/attention/test_gdn_flashinfer_alignment.py b/test/registered/unit/layers/attention/test_gdn_flashinfer_alignment.py index cf537d4a8..6f0a44437 100644 --- a/test/registered/unit/layers/attention/test_gdn_flashinfer_alignment.py +++ b/test/registered/unit/layers/attention/test_gdn_flashinfer_alignment.py @@ -151,6 +151,8 @@ class TestFlashInferGDNAlignment(unittest.TestCase): v = torch.empty(1, 1, 8, 128, dtype=torch.bfloat16) a = _view_with_pointer_mod((1, 1, 8), torch.bfloat16, 16) b = _view_with_pointer_mod((1, 1, 8), torch.bfloat16, 16) + a.copy_(torch.arange(a.numel(), dtype=a.dtype).view_as(a)) + b.copy_(torch.arange(b.numel(), dtype=b.dtype).add_(8).view_as(b)) A_log = _view_with_pointer_mod((8,), torch.float32, 4) dt_bias = _view_with_pointer_mod((8,), torch.bfloat16, 2) state = torch.zeros(2, 8, 128, 128, dtype=torch.bfloat16)