-
-
Notifications
You must be signed in to change notification settings - Fork 229
[Version 3] AMD GPUs support #490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
running this on an MI250, rocm 5.6.1, with from codecarbon import EmissionsTracker
import torch
import time
def workload():
matrix1 = torch.randn(1000, 1000, device="cuda")
matrix2 = torch.randn(1000, 1000, device="cuda")
return matrix1 @ matrix2
with EmissionsTracker(tracking_mode="process") as tracker:
start = time.time()
while time.time() - start < 10:
workload()
print("total_energy:", tracker._total_energy.kWh)
print("total_co2:", tracker.final_emissions)I get a coherent output: |
|
Thanks, it's really great! Do you think it's possible to have a machine with both AMD and Nvidia GPU ? Before merging, this PR needs unit tests and documentation. |
|
Apparently it's possible to have both (though very rare), |
|
For the test, we do 'mock' to check the function call. |
| return [] | ||
|
|
||
|
|
||
| def is_gpu_details_available(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good! Just one comment, maybe instead of removing this you can do
def is_gpu_details_available():
return PYNVML_AVAILABLE or AMDSMI_AVAILABLE
|
@IlyasMoutawwakil any update? |
|
ROCm is not packaged for Python, but I think it is not blocking for this PR, we already have the issue for MacOSX and Windows. To merge this PRR, we need tests and documentation. |
This PR adds support for amd gpus through
amdsmi.#445