[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:
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user