After much effort, I managed to build and install pytorch on my macbook such that I was able to make use of my GPU, using version 0.5.0a0+ba634c1. I also have an older version 0.4.0 with no GPU support in a different conda environment.
I started running my model with the new install and felt it was significantly slower, both using the CPU and the GPU. After timing it, I found that a single backwards pass took 28 seconds using 0.5.0 while the same code took 0.6 seconds with 0.4.0.
What could be slowing it down to such an extent? I’m not sure how to go about debugging the backwards pass…
GPU Supported Info
PyTorch version: 0.5.0a0+ba634c1
Is debug build: No
CUDA used to build PyTorch: 9.2
OS: Mac OSX 10.13.6
GCC version: Could not collect
CMake version: version 3.9.1
Python version: 3.5
Is CUDA available: Yes
CUDA runtime version: 9.2.148
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/local/cuda/lib/libcudnn.5.dylib
/usr/local/cuda/lib/libcudnn.6.dylib
/usr/local/cuda/lib/libcudnn.7.dylib
/usr/local/cuda/lib/libcudnn.dylib
/usr/local/cuda/lib/libcudnn_static.a
/usr/local/cuda8.0/lib/libcudnn.6.dylib
/usr/local/cuda8.0/lib/libcudnn_static.a
Versions of relevant libraries:
[pip3] numpy (1.14.4)
[pip3] torch (0.4.0)
[conda] torch 0.5.0a0+ba634c1
Note that my GPU is a GeForce 750M, and the output of nvcc --version
is:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Tue_Jun_12_23:08:12_CDT_2018
Cuda compilation tools, release 9.2, V9.2.148
Non-GPU Supported Info (the older, faster one)
PyTorch version: 0.4.0
Is debug build: No
CUDA used to build PyTorch: Could not collect
OS: Mac OSX 10.13.6
GCC version: Could not collect
CMake version: version 3.12.0
Python version: 3.6
Is CUDA available: No
CUDA runtime version: 9.2.148
GPU models and configuration: Could not collect
Nvidia driver version: Could not collect
cuDNN version: Probably one of the following:
/usr/local/cuda/lib/libcudnn.5.dylib
/usr/local/cuda/lib/libcudnn.6.dylib
/usr/local/cuda/lib/libcudnn.7.dylib
/usr/local/cuda/lib/libcudnn.dylib
/usr/local/cuda/lib/libcudnn_static.a
/usr/local/cuda8.0/lib/libcudnn.6.dylib
/usr/local/cuda8.0/lib/libcudnn_static.a
Versions of relevant libraries:
[pip3] numpy (1.14.4)
[pip3] torch (0.4.0)
[conda] torch 0.4.0
[conda] torchvision 0.1.9 py36_1 soumith