serizba / cppflow

Run TensorFlow models in C++ without installation and without Bazel
https://serizba.github.io/cppflow/
MIT License
787 stars 179 forks source link

How to specify GPU index? #194

Open xfchangwei opened 2 years ago

xfchangwei commented 2 years ago

How to specify GPU index? For example, I have multiple GPU devices

serizba commented 2 years ago

Hi @xfchangwei

I guess this can be easily done with an environment variable:

export CUDA_VISIBLE_DEVICES=0
zainali-AT commented 1 month ago

Hi @serizba I've tried this, but cppflow still doesn't seem to recognize my NVIDIA GPU. Is there cppflow example for using a specific GPU in multi GPU environments? For context, the C API of Tensorflow cannot find CUDA drivers, whereas the conda installed tensorflow package can use the GPU. Is this an issue with cppflow itself? Thanks!