Skip to content

Run GPU and CPU by falling back to CPU if no GPU #333

Closed

Description

@mjbedford2017

Hello,

I am following this instruction on the getting started:

For CPU version

PM> Install-Package SciSharp.TensorFlow.Redist

For GPU version (CUDA and cuDNN are required)

PM> Install-Package SciSharp.TensorFlow.Redist-Windows-GPU

I want my project to run on GPU if it can but also, to be universal, fall back to CPU if no GPU. The way things are worded above and throughout the site makes it sound like I can do one or the other. For example, I want to install the package above for GPU version but it says CUDA and cuDNN are required.

Do I install both packages to handle both types of machines?

I saw the code to use session options to specify GPU. Do I do this still and it will still run or fallback on CPU if no GPU?

Thanks!

Activity

  1. added a commit that references this issue on Aug 1, 2019
    e9f5898
  2. added
    enhancement
    on Aug 1, 2019
  3. Oceania2018 commented on Aug 1, 2019

    @Oceania2018
    Member

    @mjbedford2017 @Jiuyong PRed a quick/ simple solution.

  4. added a commit that references this issue on Aug 1, 2019
    8a4f8f6
  5. captainst commented on Aug 3, 2019

    @captainst
    Contributor

    for some unknown reason, inside visual studio 2017 community edition, I can not have both TensorFlowNET.Examples and TensorFlowNET.Examples.GPU included simutanously in the solution. To be able to properly rebuild the solution, you need to exclude one of the above 2 projects.

    Another thing to mention is that the solution uses tensorflow 1.14.0, so you might need CUDA 10.0 and cudnn 7.4.2 to work properly.

  6. Jiuyong commented on Aug 4, 2019

    @Jiuyong
    Member

    Yes, you say the situation is present and correct. But there's no way. Separating the two directories means repeatedly downloading the data. If put together, the NetCore project has this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions