Skip to content

Commit

Permalink
Decode nvidia gpu names for python versions < 3.9 instead of < 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
PedramBakh committed Nov 20, 2023
1 parent e240453 commit dcae5f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions carbontracker/components/gpu/nvidia.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def devices(self):
"""
names = [pynvml.nvmlDeviceGetName(handle) for handle in self._handles]

# Decode names if Python version is less than 3.10
if sys.version_info < (3, 10):
# Decode names if Python version is less than 3.9
if sys.version_info < (3, 9):
names = [name.decode("utf-8") for name in names]

return names
Expand Down

2 comments on commit dcae5f3

@mithushank
Copy link

Choose a reason for hiding this comment

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

I encounter a issue in measuring the cabondioxide emission when I try with GPU CUDA enabled. How to overcome this issue. My GPU is NVIDIA GeForce MX330

@PedramBakh
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I encounter a issue in measuring the cabondioxide emission when I try with GPU CUDA enabled. How to overcome this issue. My GPU is NVIDIA GeForce MX330

Did the issue start with this commit? If not, please consider opening an issue. It would also help if you could share the error message and the versions of Python and Carbontracker you're using.

Please sign in to comment.