3

Is there a way to run RAPIDS without a GPU? I usually develop on a small local machine without a GPU, then push my code to a powerful remote server for real use. Things like TensorFlow allow switching between the CPU and GPU depending on if they're available. Can an equivalent thing be done with RAPIDS? Even if it's slow, being able to test things on a machine without a GPU would be extremely helpful.

golmschenk
  • 11,736
  • 20
  • 78
  • 137

1 Answers1

2

There isn't a way to use RAPIDS without a GPU, and part of the reason for that is we're following the APIs the community has adopted in CPU packages across Pandas, Numpy, SKLearn, NetworkX, etc. This way it should be as easy as swapping an import statement to get something working on the CPU vs the GPU.

Keith Kraus
  • 231
  • 1
  • 4
  • 1
    In this case, it might be useful to release an additional wrapper package which will just automatically switch based on GPU availability. I suspect such a package would drastically improve adoption of RAPIDS. – golmschenk Oct 11 '19 at 13:41
  • @golmschenk We've made the decision to make using cuDF vs Pandas explicit so that there isn't confusion as far as what's being used and where there's performance issues. If you want to control it implicitly you could easily use a `try`, `except` block to conditionally use cuDF if possible and fall back on Pandas otherwise. – Keith Kraus Oct 21 '19 at 23:33
  • I do appreciate that the `cuDF` APIs were kept relatively close to pandas, but it's not 100%, which makes it hard to use them interchangeably. Perhaps some of the other packages conform even better to their counterparts (e.g., `cupy` seems like it might stick closer to the `numpy` API than `cudf` does to `pandas`). – Scott H Aug 25 '23 at 18:39