SciSharp / TensorFlow.NET

.NET Standard bindings for Google's TensorFlow for developing, training and deploying Machine Learning models in C# and F#.
https://scisharp.github.io/tensorflow-net-docs
Apache License 2.0
3.2k stars 514 forks source link

[Question]: CUDA and cuDNN version #1073

Open GadgetNutt opened 1 year ago

GadgetNutt commented 1 year ago

Description

Please confirm that it is still version 10 of CUDA that is expected for TensorFlow.NET. It's quite outdated now...is there intent to move to a newer version?

Per this link: https://github.com/SciSharp/TensorFlow.NET/wiki/Using-GPU-with-Tensorflow.NET

Alternatives

No response

AsakusaRinne commented 1 year ago

You are right. This wiki has been outdated. The latest version requires CUDA 11 and further information could be found here. I'll update this wiki, thank you for your reminder.

AsakusaRinne commented 1 year ago

The page has been updated. :)

GadgetNutt commented 1 year ago

Do you have more information on this?

Caution: TensorFlow 2.10 was the last TensorFlow release that supported GPU on native-Windows. Starting with TensorFlow 2.11, you will need to install TensorFlow in WSL2, or install tensorflow or tensorflow-cpu and, optionally, try the TensorFlow-DirectML-Plugin.

How does this affect the SciSharp project and GPU?

https://www.tensorflow.org/install/pip#windows-native

AsakusaRinne commented 1 year ago

Tensorflow has dropped the support for cuda on native windows since v2.11, which is so frustrating.

Currently there hasn't been any effect on tf.net. The native library 2.10 is enough to support all the main features. To use GPU with native windows, just install the latest tf.net and SciSharp.Tensorflow.Redist-Windows-GPU 2.10.

In the future there may be some problems if a new feature requires a new op for example. However, I think it will appear after at least 3-5 extra versions.

Since C#/.NET is more popular on windows than on linux, we'll delay some new features to make windows GPU work and wait for a turning point. Maybe in the future, tensorflow will bring back native windows support, or SIG build community will support building from source on windows with cuda.

Overall, SciSharp will NOT drop the cuda support for native windows at least till about tf2.16. However it's encouraged to transfer the app to WSL2 since no one knows if there will be a work around in the future to support native windows cuda with latest tensorflow.

GadgetNutt commented 1 year ago

I'm wondering if a certain manufacturer is trying to push out NVidia.

I was just looking at this discussion: https://discuss.tensorflow.org/t/2-10-last-version-to-support-native-windows-gpu/12404/6

and according to [chunduriv], it can be built from source for Windows. Can this be included in the .NET packages going forward? Or is there licensing issues in doing that? https://www.tensorflow.org/install/source_windows#setup_for_windows

AsakusaRinne commented 1 year ago

Thanks for your reminder. There's no license issue for building from source. However, it's only "possible" to build from source for native windows gpu support. I've tried it but encountered some errors. If tensorflow team cannot maintain the windows gpu build, I don't think a single developer could. The most possible ways are 1. waiting for tensorflow to bring back windows gpu support 2. waiting for SIG build community to publish a windows gpu build approach. I'll also try to join SIG and find a way to build windows gpu support.