Skip to content

Conversation

@AudranBert
Copy link
Member

No description provided.

@AudranBert AudranBert requested a review from Jeronymous June 10, 2025 11:46
Comment on lines 412 to 417
self.device = self.device if self.device else 0
if self.device == "cuda" or self.device == "gpu":
self.device = 0
if self.device != "cpu":
get_num_gpus()
self.device = ALL_GPU_INDICES[self.device]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is weird.
You don't check that self.device is an index, in the correct range (from the output of get_num_gpus)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will throw an error if it is not in the correct range since it will be out of range for ALL_GPU_INDICES which is set by calling get_num_gpus()

@AudranBert AudranBert requested a review from Jeronymous June 17, 2025 12:11
@AudranBert AudranBert merged commit 0c592a3 into main Jun 17, 2025
1 check passed
@AudranBert AudranBert deleted the monitoring branch September 9, 2025 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants