Replies: 1 comment 2 replies
-
Hi there! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I am running
"https://raw.githubusercontent.com/mrdbourke/pytorch-deep-learning/main/04_pytorch_custom_datasets.ipynb"
locally in vscode using the juypter extension on an m1 mac.
Once I get to "7.7 Train and Evaluate Model 0" the code runs extraordinarily slow
In google colab under cuda i can get around 7s
But when I run using 'cpu' or 'mps' (m1 max 32 gpu) the code runs really slow taking around 4 mins or so
When I look at the mac's activity monitor its around 2% cpu/gpu utilization
Conversely, if I run the code here locally in a juypter notebook in vscode
https://github.com/rasbt/machine-learning-notes/tree/main/benchmark/pytorch-m1-gpu (just paste the code in a notebook and remove the need for arguments and main when you reach main)
The gpu/cpu runs at 100% utilization, so I know there's definitely some major bottleneck in the current code
I've been trying to debug the code but I don't know enough of pytorch to make a good guess on why the code is not utlilizing the cpu/gpu fully. Maybe someone could help?
Beta Was this translation helpful? Give feedback.
All reactions