[doc] fix some typos and add xpu to the testing documentation (#29894)
fix typo
This commit is contained in:
@@ -792,13 +792,13 @@ def require_torch_xpu(test_case):
|
||||
|
||||
def require_torch_multi_xpu(test_case):
|
||||
"""
|
||||
Decorator marking a test that requires a multi-XPU setup with IPEX and atleast one XPU device. These tests are
|
||||
Decorator marking a test that requires a multi-XPU setup with IPEX and at least one XPU device. These tests are
|
||||
skipped on a machine without IPEX or multiple XPUs.
|
||||
|
||||
To run *only* the multi_xpu tests, assuming all test names contain multi_xpu: $ pytest -sv ./tests -k "multi_xpu"
|
||||
"""
|
||||
if not is_torch_xpu_available():
|
||||
return unittest.skip("test requires IPEX and atleast one XPU device")(test_case)
|
||||
return unittest.skip("test requires IPEX and at least one XPU device")(test_case)
|
||||
|
||||
return unittest.skipUnless(torch.xpu.device_count() > 1, "test requires multiple XPUs")(test_case)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user