mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-21 06:40:35 +08:00
test fixes
Summary: Some random seed changes. Skip multigpu tests when there's only one gpu. This is a better fix for what AI is doing in D80600882. Reviewed By: MichaelRamamonjisoa Differential Revision: D80625966 fbshipit-source-id: ac3952e7144125fd3a05ad6e4e6e5976ae10a8ef
This commit is contained in:
committed by
Facebook GitHub Bot
parent
50f8efa1cb
commit
dd068703d1
@@ -31,6 +31,13 @@ def skip_opengl_requested() -> bool:
|
||||
usesOpengl = unittest.skipIf(skip_opengl_requested(), "uses opengl")
|
||||
|
||||
|
||||
def have_multiple_gpus() -> bool:
|
||||
return torch.cuda.device_count() > 1
|
||||
|
||||
|
||||
needs_multigpu = unittest.skipIf(not have_multiple_gpus(), "needs multiple GPUs")
|
||||
|
||||
|
||||
def get_tests_dir() -> Path:
|
||||
"""
|
||||
Returns Path for the directory containing this file.
|
||||
|
||||
Reference in New Issue
Block a user