question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Suggestion: Support CPU-only environments/remove CUDA requirement

See original GitHub issue

Hi,

I’m training neural networks on a small CPU-only workstation, and I wanted to use the DeepSpeedCPUAdam optimizer to accelerate the training, but noticed that CUDA is required:

 File "...python3.9/site-packages/deepspeed/ops/op_builder/builder.py", line 37, in installed_cuda_version
    assert cuda_home is not None, "CUDA_HOME does not exist, unable to compile CUDA op(s)"

Making CUDA optional would be a great feature. In my own field (climate modeling and weather forecasting), machine learning is an increasingly popular topic but GPU’s and deep learning are often overkill. (Right now, I’m training neural nets with 1-2 hidden layers and 10-20 neurons, which is quite efficient on CPU’s). Furthermore, support for non-NVIDIA GPU’s should be relevant in the longer term.

I realize this is presented as a deep learning library, but dropping the CUDA requirement for features which do not really require it might still be useful. Thanks!

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
Yeqishencommented, Oct 8, 2022

hello, I have the same problem now. Is there a solution?

4reactions
pme0commented, Feb 27, 2022

Is there any update on this ? I am getting the same error when using FusedAdam !

I’m also having this issue on deepspeed==0.5.10. My model trains fine with an optimizer from torch.optim but when using deepspeed.ops.adam.FusedAdam I get:

File "[...]/lib/python3.8/site-packages/deepspeed/ops/op_builder/builder.py", line 38, in installed_cuda_version
    assert cuda_home is not None, "CUDA_HOME does not exist, unable to compile CUDA op(s)"
AssertionError: CUDA_HOME does not exist, unable to compile CUDA op(s)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does Anaconda install pytorch cpuonly when I install cuda?
I ran into a similar problem when I tried to install Pytorch with CUDA 11.1. Although the anaconda site explicitly lists a pre-built...
Read more >
CUDA C++ Best Practices Guide
This Best Practices Guide is a manual to help developers obtain the best performance from NVIDIA ® CUDA® GPUs. It presents established parallelization...
Read more >
Getting started with PyTorch - IBM
The CPU-only variant is built without CUDA and GPU support. It has a smaller installation size, and omits features that would require a...
Read more >
Deep Learning graphic card requirement - Esri Community
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 ......
Read more >
建议:支持仅限CPU的环境/删除CUDA要求:Suggestion
Suggestion : Support CPU-only environments/remove CUDA requirement嗨, 我正在train 一个small CPU工作站上的神经网络,我想使用DeepSpeedcpuadam ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found