Deep Learning graphic card requirement

5937
18
Jump to solution
10-18-2019 10:12 AM
Labels (2)
VHolubec
Esri Regular Contributor

Hello,

I would like to ask, what is the minimal requirement to graphic card for deep learning in Esri (Python API learn module / ArcGIS PRO - Deep learning tools). 

I have installed as documented - fastai=1.0.39 pytorch=1.0.0 torchvision, and it seems that everything works well. The probelm begins with data.show_batch() where I get error - Found GPU0 Quadro K4000 which is of cuda capability 3.0

It seems, that this GPU is no longer supported by underlying PyTorch.

I have 2 questions: 

1) would it be possible to document it somewhere - which cards are supported and which does not

2) Is there any workaround how to run Deep learning on machine with Quadro K4000?

Thank you.

Vladimir

Vladimir
0 Kudos
1 Solution

Accepted Solutions
ShaunWalbridge
Esri Regular Contributor

Vladimir,

For the machine with the K4000, does data.show_batch() still show results or nothing happens after that step? I saw some reports that it would still work (falling back to CPU), but just show this warning.  Dan's suggestion of installing the pytorch-cpu package is probably the simplest way to avoid PyTorch using CUDA that is older, another option if you have some time is to build the package from source, with support for the older CUDA version. That said, both PyTorch and TensorFlow have settled on CC 3.5 being the minimum version they support, and I would recommend a more recent card where possible.

Cheers, Shaun

View solution in original post

18 Replies
RobertBorchert
Honored Contributor

Pytorch  support is not supported on Windows

Platforms that support PyTorch

PyTorch requires a 64-bit processor, operating system, and Python distribution to work correctly. To access a supported GPU, PyTorch depends on other software such as CUDA. At the time of publication, the latest PyTorch version was 0.2.0_4. Table 1 shows the availability of prebuilt PyTorch binaries and GPU support for this version.

Operating systems that support PyTorch

Operating systemPython 2.7Python 3.5Python 3.6
64-bit Linux ®YesYesYes
CPU and GPU support?BothBothBoth
Mac OS XYesYesYes
CPU and GPU support?CPU onlyCPU onlyCPU only
64-bit Windows ®NoNoNo
CPU and GPU support?NoNoNo
0 Kudos
VHolubec
Esri Regular Contributor

Dear Robert,

 

 

 

I don´t use PyTorch directly - but via Python API (learn module) or ArcGIS PRO. For both, when using tools for deep learning you are need Pytorch installed.

 

 

 

The problem is, that these tools does not run on older graphic cards - for example as is Quadro K4000. Which support CUDA, but just only some older version. I cannot find what version of CUDA the supported graphic card must support and if there any workaround for Python API and ArcGIS PRO to use deep learning tools in machine with this older GPU.

 

 

Thank you for any idea.

Vladimir
0 Kudos
DanPatterson_Retired
MVP Emeritus

Vladimir

Haven't tested, but this stackoverflow looks interesting

python - How to check if pytorch is using the GPU? - Stack Overflow 

particularly the option to run cpu if gpu can't be used

0 Kudos
VHolubec
Esri Regular Contributor

Dear Dan,

cannot find the switch from GPU to CPU libs for esri Python deep learning module. 

Vladimir
0 Kudos
DanPatterson_Retired
MVP Emeritus

Vladimir, it seems that it isn't a full version of pytorch since it is located in the

   folder

I did a conda --dry-run to see what is in a full install

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda install pytorch --dry-run
Fetching package metadata .............
Solving package specifications: .

Package plan for installation in environment C:\arc_pro\bin\Python\envs\arcgispro-py3:

The following NEW packages will be INSTALLED:

    _pytorch_select:   1.1.0-cpu
    ninja:             1.9.0-py36h74a9793_0
    pytorch:           1.0.1-cpu_py36h39a92a0_0

The following packages will be UPDATED:

    asn1crypto:        0.24.0-py36_0                 --> 1.0.1-py36_0
    attrs:             19.1.0-py36_1                 --> 19.2.0-py_0
    ca-certificates:   2019.5.15-1                   --> 2019.8.28-0
........... snip .......................

Perhaps you will have to wait from someone else to find out what version number you need or if the cpu version is available in the Pro distribution from their distribution site

https://anaconda.org/esri/pytorch 

(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda install -c esri pytorch  --dry-run
Fetching package metadata .............
Solving package specifications: .

Package plan for installation in environment C:\arc_pro\bin\Python\envs\arcgispro-py3:

The following NEW packages will be INSTALLED:

    cudatoolkit:       10.0.130-0
    ninja:             1.9.0-py36h74a9793_0
    pytorch:           1.1.0-py3.6_cuda100_cudnn7_1 esri

The following packages will be UPDATED:

    asn1crypto:        0.24.0-py36_0                     --> 1.0.1-py36_0
    ............. snip .......................
0 Kudos
VHolubec
Esri Regular Contributor

Dear Dan,

 

 

 

I tried to reinstall pytorch from pytorch channel - -c pytorch pytorch=1.0.0, but it does not install further packages. I am installing this version since I am using the workflow from Rohit Singh here - https://medium.com/geoai/how-we-did-it-end-to-end-deep-learning-in-arcgis-dd5b10d87b8, so I don´t know If I can use the older package of pytorch.

 

Also I tried to install manually pytorch-cpu packages, but it did not help and I was not able to use - data.show_batch() function from deep learning module.

 

  It seems that for using esri deep learning module, you need a newer GPU - on another machine with Quadro M2000 - which running on newer core that K4000, it works fine.

Vladimir
0 Kudos
DanPatterson_Retired
MVP Emeritus

Vladimir

At least you have it running on one machine.    Good luck

0 Kudos
ShaunWalbridge
Esri Regular Contributor

Vladimir,

For the machine with the K4000, does data.show_batch() still show results or nothing happens after that step? I saw some reports that it would still work (falling back to CPU), but just show this warning.  Dan's suggestion of installing the pytorch-cpu package is probably the simplest way to avoid PyTorch using CUDA that is older, another option if you have some time is to build the package from source, with support for the older CUDA version. That said, both PyTorch and TensorFlow have settled on CC 3.5 being the minimum version they support, and I would recommend a more recent card where possible.

Cheers, Shaun

VHolubec
Esri Regular Contributor

Dear Shaun,

  

I am sorry for my late answer. I am testing it on 2.5 Beta - but there I am having another issues in jupyter where learn module is unable to load required fastai and other packages  (even if these packages are installed) - another story.

  

data.show_batch() shows just the warning and nothing more. The same error was raised for ssd = SingleShotDetector(). I tried to install CPU based packages, but it ended up with another error - so I have to left this way.

 

 If CUDA Compute capability 3.5 support is needed - it should be documented somewhere in Esri documentation. I cannot find it there. It could mislead some users.

Have a great day.

Regards,

Vladimir

Vladimir
0 Kudos