[CI][AMD][BugFix] Add torch.cuda.set_device to test_punica_ops so punica kernels execute on same device as tensor (#34985)

Signed-off-by: Randall Smith <Randall.Smith@amd.com>
This commit is contained in:
rasmith
2026-02-25 13:18:00 -06:00
committed by GitHub
parent 15d76f74e2
commit b188bab441

View File

@@ -395,6 +395,7 @@ def test_kernels(
Tests LoRA kernels.
"""
torch.set_default_device(device)
torch.cuda.set_device(device)
set_random_seed(seed)
if op_type == "shrink":
@@ -447,6 +448,7 @@ def test_kernels_hidden_size(
Tests SGMV and LoRA kernels.
"""
torch.set_default_device(device)
torch.cuda.set_device(device)
set_random_seed(seed)
if op_type == "shrink":