mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[ROCm][CI] skip TestCudaPrimaryCtx.test_set_device_0 (#163693)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/163693 Approved by: https://github.com/jeffdaily Co-authored-by: Jeff Daily <jeff.daily@amd.com>
This commit is contained in:
committed by
PyTorch MergeBot
parent
c63e417c79
commit
b879ef7c0d
@ -5,7 +5,7 @@ import unittest
|
||||
|
||||
import torch
|
||||
from torch.testing._internal.common_cuda import TEST_CUDA, TEST_MULTIGPU
|
||||
from torch.testing._internal.common_utils import NoTest, run_tests, TestCase
|
||||
from torch.testing._internal.common_utils import NoTest, run_tests, skipIfRocm, TestCase
|
||||
|
||||
|
||||
# NOTE: this needs to be run in a brand new process
|
||||
@ -31,6 +31,9 @@ class TestCudaPrimaryCtx(TestCase):
|
||||
TestCudaPrimaryCtx.CTX_ALREADY_CREATED_ERR_MSG,
|
||||
)
|
||||
|
||||
@skipIfRocm(
|
||||
msg="last checked in ROCm 7, HIP runtime doesn't create context for hipSetDevice()"
|
||||
)
|
||||
def test_set_device_0(self):
|
||||
# In CUDA 12 the behavior of cudaSetDevice has changed. It eagerly creates context on target.
|
||||
# The behavior of `torch.cuda.set_device(0)` should also create context on the device 0.
|
||||
|
Reference in New Issue
Block a user