Skip to content

Commit

Permalink
Use correct device ordinal when GPU is detected (#31951)
Browse files Browse the repository at this point in the history
  • Loading branch information
damccorm authored Jul 23, 2024
1 parent aa3cfe5 commit 9b6c805
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ def _deduplicate_device_value(self, device: Optional[str]):
self._load_pipeline_args['device'] = 'cpu'
else:
if is_gpu_available_torch():
self._load_pipeline_args['device'] = 'cuda:1'
self._load_pipeline_args['device'] = 'cuda:0'
else:
_LOGGER.warning(
"HuggingFaceModelHandler specified a 'GPU' device, "
Expand Down

0 comments on commit 9b6c805

Please sign in to comment.