nvcc fatal : Unsupported gpu architecture 'compute_90'

940MX, cuda9.0

There is no compute_90

Run the deviceQuery sample code on your 940MX to determine its compute capability. Then use that to choose compiler flag.

For example it should be something like compute capability 5.0

then you would choose compute_50

you don’t choose compute_90 with cuda 9.0, those are not the same thing.

  Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/Release/cuda_compile_1_generated_absval_
  nvcc fatal   : Unsupported gpu architecture 'compute_90'
  CMake Error at cuda_compile_1_generated_absval_layer.cu.obj.Release.cmake:219 (message):
    Error generating

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: “cmd.exe”已退
代码为 1。 [D:\Caffe\caffe\build\src\caffe\caffe.vcxproj]
已完成生成项目“D:\Caffe\caffe\build\src\caffe\caffe.vcxproj”(默认目标)的操作 - 失败。

已完成生成项目“D:\Caffe\caffe\build\ALL_BUILD.vcxproj”(默认目标)的操作 - 失败。


“D:\Caffe\caffe\build\ALL_BUILD.vcxproj”(默认目标) (1) ->
“D:\Caffe\caffe\build\src\caffe\caffe.vcxproj”(默认目标) (3) ->
(CustomBuild 目标) ->
  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: “cmd.exe”已
出,代码为 1。 [D:\Caffe\caffe\build\src\caffe\caffe.vcxproj]

    0 个警告
    1 个错误

so how can i make it?

As txbob already clearly stated: Use the architecture version that fits your GPUs compute capability. So if your GPU has compute capability 5.0, compile with compute_50. compute_90 is not a valid architecture value at this time.

If your question is: “Where do I need to replace compute_90 with the correct architecture in my build?”, we cannot know that. You will have to search where in your build system this is (incorrectly) specified, and change it to the appropriate architecture.