Skip to content

CUDA 9.0 compilation issues #2814

Closed
Closed

Description

I don't know whether some one has encountered any problems when using CUDA 9 with VS2017, but I actually haven't successfully built packages with cuda feature onec. Many packages which contain CUDA support haven't completely finished CUDA 9 support.

Here are messages of four major kinds of errors:

  1. Error generating XXXXX.cu.obj: This might occurred when the package source haven't implemented VS2017 support, since the compiler path is changed from VS2015 to VS2017.
  2. Host compiler targets unsupported OS: MSVC compiler is (so new that) no supported by CUDA, as CUDA: Host compiler targets unsupported OS. #2791 stated.
  3. unsupported Microsoft Visual Studio version! Only the versions 2012, 2013, 2015 and 2017 are supported: MSVC compiler is not in proper range given by CUDA. Edit <CUDA-Path>/include/crt/host_config.h can temporarily fix this.
  4. expression must have a constant value: If you have the these issues above fixed, you will meet this problem when using CUDA 9 with VS2017. This seems to be an API corruption. Rolling back to VS version older than 2017 15.4 or using toolset v140 may be able to fix this. Two ways to use v140 in VS2017:
    • Define -T v140 in vcpkg_configure_cmake
    • Use vsvarall.bat to set shell environment to use v140, and then use vcpkg to build. (For ports using ninja)

Related issues in other repositories are collected here:

  1. Windows 10 with CUDA 9 compile errors fireice-uk/xmr-stak#91
  2. Can't compile with CUDA 9.1 fireice-uk/xmr-stak#606
  3. CUDA 9.0 does not work with the latest VS 2017 update
  4. CUDA 9 failed to support the latest Visual Studio 2017 version 15.5

I open this issue here to track the avaliability of CUDA support, and provide solution for ones who has faced similar problems.

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

Metadata

Assignees

No one assigned

    Labels

    category:port-bugThe issue is with a library, which is something the port should already support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions