Skip to content

Commit

Permalink
Restrict GPU access from worker to deviceIds
Browse files Browse the repository at this point in the history
  • Loading branch information
namannandan committed Jul 2, 2024
1 parent e979f41 commit 4f184ce
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ private void startWorkerPython(int port, String deviceIds)
argl.add(EnvironmentUtils.getPythonRunTime(model));
}
} else if (model.getParallelLevel() == 0) {
if (deviceIds != null) {
envp.add("CUDA_VISIBLE_DEVICES=" + deviceIds);
}
argl.add(EnvironmentUtils.getPythonRunTime(model));
}

Expand Down

0 comments on commit 4f184ce

Please sign in to comment.