Skip to content

Commit

Permalink
Fix API tests on ROCm (#256)
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyasMoutawwakil authored Sep 4, 2024
1 parent 712b269 commit 1cf5bfa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ def test_api_launch(device, scenario, library, task, model):
if device == "cuda":
device_isolation = True
if is_rocm_system():
device_isolation_action = "warn"
device_ids = os.environ.get("ROCR_VISIBLE_DEVICES", "0")
elif is_nvidia_system():
device_isolation_action = "error"
device_ids = os.environ.get("CUDA_VISIBLE_DEVICES", "0")
else:
device_isolation_action = None
device_isolation = False
device_ids = None

launcher_config = ProcessConfig(device_isolation=device_isolation, device_isolation_action="error")
launcher_config = ProcessConfig(device_isolation=device_isolation, device_isolation_action=device_isolation_action)

if scenario == "training":
if library == "transformers":
Expand Down

0 comments on commit 1cf5bfa

Please sign in to comment.