Speeding up SVMs with Thundersvm on GPUs + Azure

Srishti Mishra
2 min readApr 2, 2021

--

Azure Data Science Virtual Machine

  • Pre-installed with a ton of useful Analytics/Deep learning libraries
  • Provisioned an Azure Ubuntu DSVM — N series (with a GPU), specifically the Standard NC6_Promo (6 vcpus, 56 GiB memory)

ThunderSVM

  • Currently, the pip install thundersvm is compatible with Cuda 9.
  • Our Azure DSVM runs Cuda 10, hence we need to build and install our own Python wheel (.whl)
$ git clone https://github.com/Xtra-Computing/thundersvm.git
(Navigate to thundersvm --> $ cd thundersvm)
$ mkdir build && cd build && cmake .. && make -j
(Navigate to thundersvm again)
$ cd python
Tag the wheel build using a BUILD_TAG environment var
$ BUILD_TAG=cuda10
$ export BUILD_TAG
$ python3 setup.py bdist_wheel
$ cd dist
Note: The wheel file name may vary, you can run the `ls` command to check yours.
$ pip install thundersvmcuda10-0.3.4-cp35-cp35m-linux_x86_64.whl

Import SVMs in your python notebook and run!

# SVM-with-GPU.ipynb
from thundersvm import SVC, OneClassSVM

This helped debug why pip install thundervsm wasn’t working:

And to build the wheel file:

Hope this helps someone else too! :)

Sign up to discover human stories that deepen your understanding of the world.

--

--

No responses yet

Write a response