Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil committed Mar 12, 2024
1 parent 0089a7c commit 7f01c41
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@
LAUNCHER_CONFIGS = [
InlineConfig(device_isolation=False),
ProcessConfig(device_isolation=False),
TorchrunConfig(device_isolation=False, nproc_per_node=4),
TorchrunConfig(device_isolation=False, nproc_per_node=2),
]
BACKENDS = ["pytorch", "none"]
DEVICES = ["cpu", "cuda"]

CUDA_VISIBLE_DEVICES = "".join([str(i) for i in range(torch.cuda.device_count())])


@pytest.mark.parametrize("device", DEVICES)
@pytest.mark.parametrize("backend", BACKENDS)
Expand Down Expand Up @@ -113,8 +115,7 @@ def test_api_memory_tracker(device, backend):
@pytest.mark.parametrize("device", DEVICES)
@pytest.mark.parametrize("launcher_config", LAUNCHER_CONFIGS)
def test_api_launch(device, launcher_config):
device_ids = "0,1,2,3" if device == "cuda" else None

device_ids = CUDA_VISIBLE_DEVICES if device == "cuda" else None
benchmark_config = InferenceConfig(latency=True, memory=True)
backend_config = PyTorchConfig(
model="bert-base-uncased",
Expand Down

0 comments on commit 7f01c41

Please sign in to comment.