CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2

Can someone explain to me the meaning of the statement at:

https://cmake.org/cmake/help/latest/release/3.8.html?highlight=cuda


Make learned to support CUDA as a first-class language that can be enabled via the project() and enable_language() commands.
CUDA is currently supported by the Makefile Generators and the Ninja generator on Linux, macOS, and Windows. *Support for the Visual Studio IDE is under development but not included in this release.*
The NVIDIA CUDA Toolkit compiler (nvcc) is supported.

Specifically:

*Support for the Visual Studio IDE is under development but not included in this release.*

Is CUDA as a first class language not supported for seemingly second class citizens such as Visual Studio?

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Christian Mazakas
Probably means no more hacky MSBuild custom tasks which can't be parallelized.


On Jul 27, 2017 6:07 PM, "Brian Davis" <[hidden email]> wrote:

Can someone explain to me the meaning of the statement at:

https://cmake.org/cmake/help/latest/release/3.8.html?highlight=cuda


Make learned to support CUDA as a first-class language that can be enabled via the project() and enable_language() commands.
CUDA is currently supported by the Makefile Generators and the Ninja generator on Linux, macOS, and Windows. *Support for the Visual Studio IDE is under development but not included in this release.*
The NVIDIA CUDA Toolkit compiler (nvcc) is supported.

Specifically:

*Support for the Visual Studio IDE is under development but not included in this release.*

Is CUDA as a first class language not supported for seemingly second class citizens such as Visual Studio?

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

J. Caleb Wherry
In reply to this post by Brian Davis-2
Not sure I understand your question but Visual Studio support just lagged a version for that feature. It is available in CMake 3.9:


Or are you asking before this version how was CUDA supported?

-Caleb

On Thu, Jul 27, 2017 at 9:07 PM Brian Davis <[hidden email]> wrote:

Can someone explain to me the meaning of the statement at:

https://cmake.org/cmake/help/latest/release/3.8.html?highlight=cuda


Make learned to support CUDA as a first-class language that can be enabled via the project() and enable_language() commands.
CUDA is currently supported by the Makefile Generators and the Ninja generator on Linux, macOS, and Windows. *Support for the Visual Studio IDE is under development but not included in this release.*
The NVIDIA CUDA Toolkit compiler (nvcc) is supported.

Specifically:

*Support for the Visual Studio IDE is under development but not included in this release.*

Is CUDA as a first class language not supported for seemingly second class citizens such as Visual Studio?
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
--
Sent from my iPhone 4s

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Robert Maynard
Just to clarify the CUDA and CMake situation.

CMake 3.8 added the initial first class support of CUDA to CMake (
instead of using FindCUDA ). This work only supports the makefile and
ninja generators, which means that the visual studio IDE generator is
not supported. This doesn't mean that the Visual Studio compiler isn't
supported, as you still could use ninja or makefile with the VS
compiler.

CMake 3.9 added the support for the visual studio generator for CUDA.
The approach that was used was to call out to the existing MSBuild
CUDA extensions that NVIDIA provides. With 3.9 all generators are
considered to be 'first class' in regards to CUDA.


On Thu, Jul 27, 2017 at 9:28 PM, J. Caleb Wherry <[hidden email]> wrote:

> Not sure I understand your question but Visual Studio support just lagged a
> version for that feature. It is available in CMake 3.9:
>
> https://cmake.org/cmake/help/v3.9/release/3.9.html
>
> Or are you asking before this version how was CUDA supported?
>
> -Caleb
>
> On Thu, Jul 27, 2017 at 9:07 PM Brian Davis <[hidden email]> wrote:
>>
>>
>> Can someone explain to me the meaning of the statement at:
>>
>> https://cmake.org/cmake/help/latest/release/3.8.html?highlight=cuda
>>
>>
>> Make learned to support CUDA as a first-class language that can be enabled
>> via the project() and enable_language() commands.
>> CUDA is currently supported by the Makefile Generators and the Ninja
>> generator on Linux, macOS, and Windows. *Support for the Visual Studio IDE
>> is under development but not included in this release.*
>> The NVIDIA CUDA Toolkit compiler (nvcc) is supported.
>>
>> Specifically:
>>
>> *Support for the Visual Studio IDE is under development but not included
>> in this release.*
>>
>> Is CUDA as a first class language not supported for seemingly second class
>> citizens such as Visual Studio?
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>
> --
> Sent from my iPhone 4s
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Christian Mazakas
I tried using VS solutions and MSBuild but building was still serialized. Ninja is just better for Windows. 

On Jul 28, 2017 9:06 AM, "Robert Maynard" <[hidden email]> wrote:
Just to clarify the CUDA and CMake situation.

CMake 3.8 added the initial first class support of CUDA to CMake (
instead of using FindCUDA ). This work only supports the makefile and
ninja generators, which means that the visual studio IDE generator is
not supported. This doesn't mean that the Visual Studio compiler isn't
supported, as you still could use ninja or makefile with the VS
compiler.

CMake 3.9 added the support for the visual studio generator for CUDA.
The approach that was used was to call out to the existing MSBuild
CUDA extensions that NVIDIA provides. With 3.9 all generators are
considered to be 'first class' in regards to CUDA.


On Thu, Jul 27, 2017 at 9:28 PM, J. Caleb Wherry <[hidden email]> wrote:
> Not sure I understand your question but Visual Studio support just lagged a
> version for that feature. It is available in CMake 3.9:
>
> https://cmake.org/cmake/help/v3.9/release/3.9.html
>
> Or are you asking before this version how was CUDA supported?
>
> -Caleb
>
> On Thu, Jul 27, 2017 at 9:07 PM Brian Davis <[hidden email]> wrote:
>>
>>
>> Can someone explain to me the meaning of the statement at:
>>
>> https://cmake.org/cmake/help/latest/release/3.8.html?highlight=cuda
>>
>>
>> Make learned to support CUDA as a first-class language that can be enabled
>> via the project() and enable_language() commands.
>> CUDA is currently supported by the Makefile Generators and the Ninja
>> generator on Linux, macOS, and Windows. *Support for the Visual Studio IDE
>> is under development but not included in this release.*
>> The NVIDIA CUDA Toolkit compiler (nvcc) is supported.
>>
>> Specifically:
>>
>> *Support for the Visual Studio IDE is under development but not included
>> in this release.*
>>
>> Is CUDA as a first class language not supported for seemingly second class
>> citizens such as Visual Studio?
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/cmake
>
> --
> Sent from my iPhone 4s
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2

@Robert

So how do I go about using it in 3.9?  And more importantly does it
work?  Does it generate hybrid CPP/CU projects that can be compiled in
visual studio the way FindCUDA (did/does?).

Currently using FindCUDA, but I have had some CUDA 7.5 / 8.0 and VS
13/15 cats in a bag trouble.  Finally uninstalled CUDA 8.0  and had to
reinstall/repair VS13 due to .NET goop removal with 8.0 somehow. Then
reinstalled 7.5, but still no luck with SampleProjects from NVIDIA.  
Then removed 7.5 and reinstalled 8.0 and sample projects then built the
8.0 projects and ran successfully with VS13.  NVIDIA states that cross
mojonation with runtimes and drivers would work just swimmingly... and
well I got news for them on that one. FindCUDA during 7.5 yeiled
confusing warning saying that I was specifying 7.5, but it found 8.0
even though 7.5 was installed as though FindCUDA did not seem to listen
to the version I was specifying.

I upgraded CMake from 3.2 to 3.9 so I could set env{var} and use CMake's
Open Project to set env build vars for VS to be used in project settings
with outthe need for my run_vs.bat script CMake used to have to generate
with configure_file. So with CMake, CUDA and Visual Studio it's like
three cats in a bag and one is a like bobcat (CUDA) so it's kinda messy.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2
In reply to this post by J. Caleb Wherry
@Caleb

I am asking how do I get it to work in post 3.8 or 3.9.  Does it work.  
I know how it worked before CMake 3.2 and prior both on Linux and
windows... ie ... it did not without considerable manual futzing due to
NVIDIA's inability to put their goop in a standard location that they
would be internally consistent with... as though they always picked the
"new person" to do the release and that person never spoke with the
person who released the previous version. Believe me I know how it
?worked? in prior versions... a term used loosely here.

: resend to do T-Bird picking wrong send from addr apologies if you get
2 of these.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Robert Maynard
In reply to this post by Brian Davis-2
> So how do I go about using it in 3.9?  And more importantly does it work?  Does it generate hybrid CPP/CU projects that can be compiled in visual studio the way FindCUDA (did/does?).

It works and will generate hybrid C++ and CUDA projects. A very simple
example of making a library and an executable that uses both languages
can be seen at:
https://gitlab.kitware.com/cmake/cmake/blob/v3.9.0/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt

On Fri, Jul 28, 2017 at 12:45 PM, Brian J. Davis <[hidden email]> wrote:

>
> @Robert
>
> So how do I go about using it in 3.9?  And more importantly does it work?
> Does it generate hybrid CPP/CU projects that can be compiled in visual
> studio the way FindCUDA (did/does?).
>
> Currently using FindCUDA, but I have had some CUDA 7.5 / 8.0 and VS 13/15
> cats in a bag trouble.  Finally uninstalled CUDA 8.0  and had to
> reinstall/repair VS13 due to .NET goop removal with 8.0 somehow. Then
> reinstalled 7.5, but still no luck with SampleProjects from NVIDIA.  Then
> removed 7.5 and reinstalled 8.0 and sample projects then built the 8.0
> projects and ran successfully with VS13.  NVIDIA states that cross
> mojonation with runtimes and drivers would work just swimmingly... and well
> I got news for them on that one. FindCUDA during 7.5 yeiled confusing
> warning saying that I was specifying 7.5, but it found 8.0 even though 7.5
> was installed as though FindCUDA did not seem to listen to the version I was
> specifying.
>
> I upgraded CMake from 3.2 to 3.9 so I could set env{var} and use CMake's
> Open Project to set env build vars for VS to be used in project settings
> with outthe need for my run_vs.bat script CMake used to have to generate
> with configure_file. So with CMake, CUDA and Visual Studio it's like three
> cats in a bag and one is a like bobcat (CUDA) so it's kinda messy.
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2

@Robert

Adding CUDA to my PROJECT(4DRTProto CXX CUDA)

Yields:


CMake Error at
C:/projects/4DRTProto/4DRTProto_3rdParty/platform/tools/cmake-3.9.0-rc6-win64-x64/share/cmake-3.9/Modules/CMakeTestCUDACompiler.cmake:45
(message):
   The CUDA compiler "C:/Program Files/NVIDIA GPU Computing
   Toolkit/CUDA/v8.0/bin/nvcc.exe" is not able to compile a simple test
   program.

   It fails with the following output:

    Change Dir: C:/projects/4DRTProto/4DRTProto/build/CMakeFiles/CMakeTmp



   Run Build Command:"C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe"
   "cmTC_20a4f.vcxproj" "/p:Configuration=Debug"
"/p:VisualStudioVersion=12.0"

   Microsoft (R) Build Engine version 12.0.31101.0


   [Microsoft .NET Framework, version 4.0.30319.42000]


   Copyright (C) Microsoft Corporation.  All rights reserved.





   Build started 7/28/2017 7:33:34 PM.


   Project
"C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj"
   on node 1 (default targets).


   PrepareForBuild:


     Creating directory "cmTC_20a4f.dir\Debug\".

     Creating directory
"C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\Debug\".

     Creating directory "cmTC_20a4f.dir\Debug\cmTC_20a4f.tlog\".


   InitializeBuildStatus:


     Creating "cmTC_20a4f.dir\Debug\cmTC_20a4f.tlog\unsuccessfulbuild"
because "AlwaysCreate" was specified.


   C:\Program Files
   (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA
   8.0.targets(216,9): error : Item 'main.cu' Code Generation value is
not in
   the expected format '[Arch],[Code]'.
[C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj]



   Done Building Project
"C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj"
   (default targets) -- FAILED.





   Build FAILED.






"C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj"
   (default target) (1) ->


   (AddCudaCompileMetadata target) ->


     C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA
8.0.targets(216,9): error : Item 'main.cu' Code Generation value is not
in the expected format '[Arch],[Code]'.
[C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj]





       0 Warning(s)

       1 Error(s)





   Time Elapsed 00:00:00.35






   CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
   CMakeLists.txt:14 (PROJECT)


And so it goes the CMake, CUDA, Visual Studio Experience.  Maybe time to
revert back to FindCUDA in CMAKE version 3.2.  Sure is awesome.




--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2

Saying I could get this to work, which it is not how, would one using
project:

Project( myproject CXX CUDA)

specify the version of CUDA to use if I have CUDA 7.5 and 8 installed
simultaneously.  FindCUDA could do it.  And say if version of cuda could
be specified why not c++ 0x or 11... Ya know cuz if we are going to be
able to specify the version of one "first class" language we should be
able to specify the version of each.... yeah I am guessing I know the
answer to this already.  I just had this burning desire to ask this
question.
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Robert Maynard
The way to control which CUDA version to use is by setting the CUDACXX
environment variable, or by setting the CMAKE_CUDA_COMPILER cache
variable.

To specify which CUDA compilation language you want 98/11/14 you can
use any of methods that are possible by compile features (
https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html
). That means you can do:

- set(CMAKE_CUDA_STANDARD 11)
- set_property(TARGET <tgt> PROPERTY CUDA_STANDARD 11)

or if you have C++ enabled at the project level
- target_compile_features(<tgt> PUBLIC cxx_std_11)




On Sat, Jul 29, 2017 at 2:44 AM, Brian J. Davis <[hidden email]> wrote:

>
> Saying I could get this to work, which it is not how, would one using
> project:
>
> Project( myproject CXX CUDA)
>
> specify the version of CUDA to use if I have CUDA 7.5 and 8 installed
> simultaneously.  FindCUDA could do it.  And say if version of cuda could be
> specified why not c++ 0x or 11... Ya know cuz if we are going to be able to
> specify the version of one "first class" language we should be able to
> specify the version of each.... yeah I am guessing I know the answer to this
> already.  I just had this burning desire to ask this question.
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Robert Maynard
In reply to this post by Brian Davis-2
Hi,

Can you please provide run from the build directory cmake
--system-information <file> and send the resulting file? That will
help me track down why CUDA is failing for you.

On Fri, Jul 28, 2017 at 8:40 PM, Brian J. Davis <[hidden email]> wrote:

>
> @Robert
>
> Adding CUDA to my PROJECT(4DRTProto CXX CUDA)
>
> Yields:
>
>
> CMake Error at
> C:/projects/4DRTProto/4DRTProto_3rdParty/platform/tools/cmake-3.9.0-rc6-win64-x64/share/cmake-3.9/Modules/CMakeTestCUDACompiler.cmake:45
> (message):
>   The CUDA compiler "C:/Program Files/NVIDIA GPU Computing
>   Toolkit/CUDA/v8.0/bin/nvcc.exe" is not able to compile a simple test
>   program.
>
>   It fails with the following output:
>
>    Change Dir: C:/projects/4DRTProto/4DRTProto/build/CMakeFiles/CMakeTmp
>
>
>
>   Run Build Command:"C:/Program Files (x86)/MSBuild/12.0/bin/MSBuild.exe"
>   "cmTC_20a4f.vcxproj" "/p:Configuration=Debug"
> "/p:VisualStudioVersion=12.0"
>
>   Microsoft (R) Build Engine version 12.0.31101.0
>
>
>   [Microsoft .NET Framework, version 4.0.30319.42000]
>
>
>   Copyright (C) Microsoft Corporation.  All rights reserved.
>
>
>
>
>
>   Build started 7/28/2017 7:33:34 PM.
>
>
>   Project
> "C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj"
>   on node 1 (default targets).
>
>
>   PrepareForBuild:
>
>
>     Creating directory "cmTC_20a4f.dir\Debug\".
>
>     Creating directory
> "C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\Debug\".
>
>     Creating directory "cmTC_20a4f.dir\Debug\cmTC_20a4f.tlog\".
>
>
>   InitializeBuildStatus:
>
>
>     Creating "cmTC_20a4f.dir\Debug\cmTC_20a4f.tlog\unsuccessfulbuild"
> because "AlwaysCreate" was specified.
>
>
>   C:\Program Files
>   (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA
>   8.0.targets(216,9): error : Item 'main.cu' Code Generation value is not in
>   the expected format '[Arch],[Code]'.
> [C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj]
>
>
>
>   Done Building Project
> "C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj"
>   (default targets) -- FAILED.
>
>
>
>
>
>   Build FAILED.
>
>
>
>
>
>
> "C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj"
>   (default target) (1) ->
>
>
>   (AddCudaCompileMetadata target) ->
>
>
>     C:\Program Files
> (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\CUDA
> 8.0.targets(216,9): error : Item 'main.cu' Code Generation value is not in
> the expected format '[Arch],[Code]'.
> [C:\projects\4DRTProto\4DRTProto\build\CMakeFiles\CMakeTmp\cmTC_20a4f.vcxproj]
>
>
>
>
>
>       0 Warning(s)
>
>       1 Error(s)
>
>
>
>
>
>   Time Elapsed 00:00:00.35
>
>
>
>
>
>
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:14 (PROJECT)
>
>
> And so it goes the CMake, CUDA, Visual Studio Experience.  Maybe time to
> revert back to FindCUDA in CMAKE version 3.2.  Sure is awesome.
>
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2
In reply to this post by Robert Maynard
@Robert

I created a fresh simple cmake project in 3.9.  This appeared to find
CUDA 8.0 successfully so it may have something do with my other project
settings that I am trying to get to work with 3.9, VS13, CUDA 7.5/8.0.

Using:

message( CUDACXX = ${CUDACXX})
message( CMAKE_CUDA_COMPILER = ${CMAKE_CUDA_COMPILER})


Reports

CUDACXX=
CMAKE_CUDA_COMPILER=C:/Program Files/NVIDIA GPU Computing
Toolkit/CUDA/v8.0/bin/nvcc.exe
Configuring done
Generating done

The question was at setting the CUDA version say 7.5 or 8.0.

I search doc for CUDACXX and CMAKE_CUDA_COMPILER with no hits.  Is this
stuff documented anywhere.

Do I really need to say set:

CMAKE_CUDA_COMPILER=C:/Program Files/NVIDIA GPU Computing
Toolkit/CUDA/v7.5/bin/nvcc.exe

To get CMake to compile for 7.5?  I mean:

find_package(CUDA 7.5)

you could agree is/was much simpler.  I am becoming frustrated and
confused by these changes.

I can't even get a simple CUDA app to run using FindCUDA (will compile)
or compile using v3.9 and new project( CXX CUDA).

Your example at:

https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html


Used:

add_executable(CudaConsumeCompileFeatures main.cu)

Is is required now that main.cpp be a .cu file now?  I wouldn't think
so, but I am so lost in the woods on this that I am not sure of anything
anymore.

How do I get all the toolkit and sdk include and lib dir variables now
as FindCUDA provided?

I am so curfuffled by these changes.

Can I get the CMake doc in one (1) html page again... those were the
good old days when scanning back and forth I would stumble on some good
bits ... not that I can seemly find the doc for the new CUDA changes.  
This reminds me of the days when I could only get doc on things like
ExternalProject_Add at the command prompt.





--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2

With simple stand alone cmake 3.9 project using

cmake_minimum_required(VERSION 3.9)
project(cmake_testing CXX CUDA)

I can get a simple app to compile.  It however fails to run with:

GPU Device 0: "GeForce GTX 960M" with compute capability 5.0

Current device is [0]
Current device is [0]
CUDA error at
C:\projects\cmake\cmaketesting\v3.9\cuda_basic\src\cuda_basic_test.cpp:67
code=46(cudaErrorDevicesUnavailable) "cudaMalloc((void **)&d_volume, size)"

When trying to call cudaMalloc.  When trying to actually use the device.

     checkCudaErrors(cudaMalloc((void **)&d_volume, size));

So I am right back I started in the new simple project.

I am able to complle and run SDK examples say nbody.

it can only be two things right???  compile args and runtime environment
(dll paths).  right?  err well or gremlins.

NBody compile important bits:

1>  C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v8.0\5_Simulations\nbody>"C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v8.0\bin\nvcc.exe"
-gencode=arch=compute_20,code=\"sm_20,compute_20\"
-gencode=arch=compute_30,code=\"sm_30,compute_30\"
-gencode=arch=compute_35,code=\"sm_35,compute_35\"
-gencode=arch=compute_37,code=\"sm_37,compute_37\"
-gencode=arch=compute_50,code=\"sm_50,compute_50\"
-gencode=arch=compute_52,code=\"sm_52,compute_52\"
-gencode=arch=compute_60,code=\"sm_60,compute_60\" --use-local-env
--cl-version 2013 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\bin\x86_amd64"  -I./ -I../../common/inc -I./ -I"C:\Program
Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\/include"
-I../../common/inc -I"C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v8.0\include"  -G --keep-dir x64\Debug -maxrregcount=0  
--machine 64 --compile -cudart static -Xcompiler "/wd 4819" -g   -DWIN32
-DWIN32 -D_MBCS -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS /Zi /RTC1
/MTd " -o x64/Debug/bodysystemcuda.cu.obj "C:\ProgramData\NVIDIA
Corporation\CUDA Samples\v8.0\5_Simulations\nbody\bodysystemcuda.cu"


My simple test app compile bits:

2> C:\projects\cmake\cmaketesting\v3.9\build\cuda_basic\src>"C:\Program
Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\nvcc.exe" -ccbin
"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64"  
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include"
-I"C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\common\inc"
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include"
-I"C:\ProgramData\NVIDIA Corporation\CUDA Samples\v8.0\common\inc"
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include"
-I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include"  
-G   --keep-dir x64\Debug -maxrregcount=0  --machine 64 --compile  
-Xcompiler="/EHsc -Zi -Ob0" -g   -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\""
-DWIN32 -D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -Xcompiler "/EHsc
/W3 /nologo /Od /FS /Zi /RTC1 /MDd /GR" -o
cuda_basic_test.dir\Debug\cuda_basic_test.cu.obj
"C:\projects\cmake\cmaketesting\v3.9\cuda_basic\src\cuda_basic_test.cu"
-clean
2>CUDACOMPILE : nvcc warning : The 'compute_20', 'sm_20', and 'sm_21'
architectures are deprecated, and may be removed in a future release
(Use -Wno-deprecated-gpu-targets to suppress warning).
2>  cuda_basic_test.cu
2>  Building Custom Rule
C:/projects/cmake/cmaketesting/v3.9/cuda_basic/src/CMakeLists.txt
2>  CMake does not need to re-run because
C:/projects/cmake/cmaketesting/v3.9/build/cuda_basic/src/CMakeFiles/generate.stamp
is up-to-date.
2>  Compiling CUDA source file ..\..\..\cuda_basic\src\cuda_basic_test.cu...
2>
2> C:\projects\cmake\cmaketesting\v3.9\build\cuda_basic\src>"C:\Program
Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\bin\nvcc.exe"
-gencode=arch=compute_20,code=\"sm_20,compute_20\" --use-local-env
--cl-version 2013 -ccbin "C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\bin\x86_amd64"  -I"C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v8.0\include" -I"C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v8.0\common\inc" -I"C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v8.0\include" -I"C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v8.0\common\inc" -I"C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v8.0\include" -I"C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v8.0\include"  -G   --keep-dir x64\Debug -maxrregcount=0  
--machine 64 --compile -cudart static -Xcompiler="/EHsc -Zi -Ob0" -g  
-D_WINDOWS -D"CMAKE_INTDIR=\"Debug\"" -DWIN32 -D_WINDOWS
-D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -Xcompiler "/EHsc /W3 /nologo /Od /FS
/Zi /RTC1 /MDd /GR" -o cuda_basic_test.dir\Debug\cuda_basic_test.cu.obj
"C:\projects\cmake\cmaketesting\v3.9\cuda_basic\src\cuda_basic_test.cu"








--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2

Things I have tried:

Install Visual Studio 15
Install CUDA 8.0 + patch
Install Visual Studio 13 <- Yes Nvidia / CMake'ers sometimes we have to
do back ports
Install CUDA 7.5
VS 13 will run CUDA 8.0 samples nbody/deviceQuery
VS 13 does not run CUDA 7.5  samples nbody or any example attempting to
actually use the GPU.  deviceQuery worked.
CMake v3.2/3.9 compiles with either FindCUDA approach v3.2 or new
"project" approach v3.9, but neither is able to access the deivce.
Devcie query code such as in deviceQuery works stating there is a CUDA
cable device ready and waiting but fails on device access like
cudaMalloc calls.
Reinstalled CUDA 7.5
Still only VS with 8.0 works with samples.
Used NVIDIA Control panel to assign every program to run on NVIDIA GPU
such as VS and CMake instead of Integrated graphics through Nvidia
Optimus Interface.
Used GeForce Experience to get latest driver.
VS, CUDA, CMake is at same state.
Removed all CUDA 8.0 goop
Forced to reinstall/repair VS 13 due to .NET not sure why this happened.
VS unable to run nbody in VS 13 CUDA 7.5
Reinstall CUDA 7.5
Same state
Reinstall CUDA 8.0
VS 13 works with CUDA 8.0 but still  will not run nbody with 7.5 will
run deviceQuery and report happily there a a CUDA device just beckoning
to be used.
Removed CUDA 8.0
Removed CUDA 7.5
Removed GeForce Experience to keep it from mucking about in the
background with what ever driver version shenanigans it may be performing.
Device Manager -> NVIDIA GeForce GTX 960M -> Uninstall device.
Device keeps cumming back across reboots as it appears, may be due to
NVIDIA Graphics Driver 353.90 in "Add remove programs"
Reinstalled CUDA 7.5
VS 13 runs successfully deviceQuery and nbody with 7.5.  Oddly
deviceQuery reports driver version at 9.0 ???  Not sure how that's
possible.  My understanding/experience has been Driver version / Runtime
match after install say like 7.5 / 7.5, but hey this has gone completely
off the rails.

C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v7.5\bin\win64\Debug>deviceQuery.exe
deviceQuery.exe Starting...

  CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 960M"
   CUDA Driver Version / Runtime Version          9.0 / 7.5
   CUDA Capability Major/Minor version number:    5.0
   Total amount of global memory:                 4096 MBytes
(4294967296 bytes)
   ( 5) Multiprocessors, (128) CUDA Cores/MP:     640 CUDA Cores
   GPU Max Clock rate:                            1176 MHz (1.18 GHz)
   Memory Clock rate:                             2505 Mhz
   Memory Bus Width:                              128-bit
   L2 Cache Size:                                 2097152 bytes
   Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536,
65536), 3D=(4096, 4096, 4096)
   Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
   Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384),
2048 layers
   Total amount of constant memory:               65536 bytes
   Total amount of shared memory per block:       49152 bytes
   Total number of registers available per block: 65536
   Warp size:                                     32
   Maximum number of threads per multiprocessor:  2048
   Maximum number of threads per block:           1024
   Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
   Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
   Maximum memory pitch:                          2147483647 bytes
   Texture alignment:                             512 bytes
   Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
   Run time limit on kernels:                     Yes
   Integrated GPU sharing Host Memory:            No
   Support host page-locked memory mapping:       Yes
   Alignment requirement for Surfaces:            Yes
   Device has ECC support:                        Disabled
   CUDA Device Driver Mode (TCC or WDDM):         WDDM (Windows Display
Driver Model)
   Device supports Unified Addressing (UVA):      Yes
   Device PCI Domain ID / Bus ID / location ID:   0 / 2 / 0
   Compute Mode:
      < Default (multiple host threads can use ::cudaSetDevice() with
device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.0, CUDA
Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GTX 960M


Device Manager -> NVIDIA GeForce GTX 960M -> Properties reports:
NVidia GeForce GTX 960M
Driver provider: NVIDIA
Driver Date:  7/18/2017
Driver Version: 22.21.13.8494
Digital Signer: Microsoft Windows Hardware Compatibility Publisher

Note: Driver Date:  7/18/2017

Could this mean there is a 9.0 driver in the wild that I cannot download
from NVIDIA or through GeForce Experience, but may be delivered via OS?  
Posted @ https://devtalk.nvidia.com/default/board/58/ to see if anyone
knows what is going on here.

CMake 3.2/3.9 still fail to run (again compiles fine)

What It appears I am experiencing is some CUDA 7.5 / 8.0 driver version
conflicts where 7.5 does not seem to play nice with 8.0 drivers, but
*might* be working with 9.0 driver... I say might as I am not sure what
is going on there.

I have some bad news for NVIDIA their driver "API Backward/Not Forward
Compatible" diagram may have been accurate from 1.0 to 2.0, but 7.5 8.0
is shaping up to need a whole new diagram of broken links and end around
curvy arrows.

file:///C:/Program%20Files/NVIDIA%20GPU%20Computing%20Toolkit/CUDA/v7.5/doc/html/common/graphics/compatibility-of-cuda-versions.png

CMake is still a dysfunctional hot mess.  It does not work in any
scenario.  That's not to say I can't get it to work as I have on a Dell
M4700 with a Quadro and 7.5 with CMake 3.2 and VS12/13. Thought I would
try upgrade to 3.9 on new laptop, but hey I can't seem to get any
version to work on the new laptop and I can only get Samples in 7.5 to
work if I seemingly uninstall all CUDA 8.0 related bits, most notable of
which appears/seems to be the driver.

Next I am going to remove all NVIDA drivers and try reinstall of CUDA
7.5  see if I can get deviceQuery to report 7.5/7.5.   Also looking into
a mooc course on weaving to make something useful out of this pile of
hair I have pulled out.

Thoughts on how to get CMake to work at all in any scenario.



--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Using caffe in my own project

Laurent Berger
Hi,

OS windows 10. Visual Studio 14 2015 win 64. CMake 3.7.1


I have got some problem to use Caffe in my own project. My
cmakelists.txt is

cmake_minimum_required(VERSION 2.8)
PROJECT (HelloWorld)
find_package(opencv  REQUIRED)
find_package(Caffe  REQUIRED)
file(GLOB HelloWorld_srcs
     "*.h"
     "*.cpp")
ADD_EXECUTABLE (HelloWorld ${HelloWorld_srcs})
if (OpenCV_FOUND)
     include_directories( ${OpenCV_INCLUDE_DIRS} )
     target_link_libraries( HelloWorld ${OpenCV_LIBS} )
else (OpenCV_FOUND)
message("PB->OPENCV not found= ${OpenCV_INCLUDE_DIRS}")
endif (OpenCV_FOUND)
if (Caffe_FOUND)
     include_directories( ${Caffe_INCLUDE_DIRS} )
     target_link_libraries( HelloWorld ${Caffe_LIBS} )
else (Caffe_FOUND)
message("PB->Caffe_ not found= ${Caffe_INCLUDE_DIRS} ${Caffe_LIBS} end
variable")
endif (Caffe_FOUND)

  When I open my solution in VS 8I can opencv include but nothing about
caffe (my first line in my c++ program is #include <caffe/caffe.hpp>)


In CaffeConfig.cmake I can read :

# Config file for the Caffe package.
#
# Note:
#   Caffe and this config file depends on opencv,
#   so put `find_package(OpenCV)` before searching Caffe
#   via `find_package(Caffe)`. All other lib/includes
#   dependencies are hard coded in the file
#
# After successful configuration the following variables
# will be defined:
#
#   Caffe_LIBRARIES    - IMPORTED targets to link against
#                        (There is no Caffe_INCLUDE_DIRS and
Caffe_DEFINITIONS
#                         because they are specified in the IMPORTED
target interface.)
#
#   Caffe_HAVE_CUDA    - signals about CUDA support
#   Caffe_HAVE_CUDNN   - signals about cuDNN support

What does it mean

There is no Caffe_INCLUDE_DIRS and Caffe_DEFINITIONS because they are
specified in the IMPORTED target interface.)


How can I insert caffe include and libs in my project using my
cmakelists.txt ?


Thanks in advance for your answer










--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2
In reply to this post by Brian Davis-2

Saga novella continues:

 >> Next I am going to remove all NVIDA drivers and try reinstall of
CUDA 7.5  see if I can get deviceQuery to report 7.5/7.5.

Nvidia 352.65 driver removal from Add/Remove Programs
Device Manager -> NVIDIA GeForce GTX 960M -> General reports "device has
been disabled"

Device Query:

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\bin\win64\Debug>rem
start "Device Query" deviceQuery.exe

C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v7.5\bin\win64\Debug>deviceQuery.exe
deviceQuery.exe Starting...

  CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

Ok so great no driver installed!

Reinstall of CUDA 7.5.18

Run of DeviceQuery:

C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\bin\win64\Debug>rem
start "Device Query" deviceQuery.exe

C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v7.5\bin\win64\Debug>deviceQuery.exe
deviceQuery.exe Starting...

  CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 960M"
   CUDA Driver Version / Runtime Version          7.5 / 7.5
   CUDA Capability Major/Minor version number:    5.0
   Total amount of global memory:                 4096 MBytes
(4294967296 bytes)
   ( 5) Multiprocessors, (128) CUDA Cores/MP:     640 CUDA Cores
   GPU Max Clock rate:                            1176 MHz (1.18 GHz)
   Memory Clock rate:                             2505 Mhz
   Memory Bus Width:                              128-bit
   L2 Cache Size:                                 2097152 bytes
   Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536,
65536), 3D=(4096, 4096, 4096)
   Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
   Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384),
2048 layers
   Total amount of constant memory:               65536 bytes
   Total amount of shared memory per block:       49152 bytes
   Total number of registers available per block: 65536
   Warp size:                                     32
   Maximum number of threads per multiprocessor:  2048
   Maximum number of threads per block:           1024
   Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
   Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
   Maximum memory pitch:                          2147483647 bytes
   Texture alignment:                             512 bytes
   Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
   Run time limit on kernels:                     Yes
   Integrated GPU sharing Host Memory:            No
   Support host page-locked memory mapping:       Yes
   Alignment requirement for Surfaces:            Yes
   Device has ECC support:                        Disabled
   CUDA Device Driver Mode (TCC or WDDM):         WDDM (Windows Display
Driver Model)
   Device supports Unified Addressing (UVA):      Yes
   Device PCI Domain ID / Bus ID / location ID:   0 / 2 / 0
   Compute Mode:
      < Default (multiple host threads can use ::cudaSetDevice() with
device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.5, CUDA
Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GTX 960M
Result = PASS

Ok return to sanity with 7.5/7.5

Return to insanity as NBody still does not work with:

Run "nbody -benchmark [-numbodies=<numBodies>]" to measure performance.
         -fullscreen       (run n-body simulation in fullscreen mode)
         -fp64             (use double precision floating point values
for simulation)
         -hostmem          (stores simulation data in host memory)
         -benchmark        (run benchmark to measure performance)
         -numbodies=<N>    (number of bodies (>= 1) to run in simulation)
         -device=<d>       (where d=0,1,2.... for the CUDA device to use)
         -numdevices=<i>   (where i=(number of CUDA devices > 0) to use
for simulation)
         -compare          (compares simulation results running once on
the default GPU and once on the CPU)
         -cpu              (run n-body simulation on the CPU)
         -tipsy=<file.bin> (load a tipsy model file for simulation)

NOTE: The CUDA Samples are not meant for performance measurements.
Results may vary when GPU Boost is enabled.

 > Windowed mode
 > Simulation data stored in video memory
 > Single precision floating point simulation
 > 1 Devices used for simulation
 > Compute 5.0 CUDA device: [GeForce GTX 960M]
CUDA error at c:\programdata\nvidia corporation\cuda
samples\v7.5\5_simulations\nbody\bodysystemcuda_impl.h:160
code=46(cudaErrorDevicesUnavailable)
"cudaEventCreate(&m_deviceData[0].event)"

There is at this point clearly some very odd behavior with CUDA 7.5 and
GeForce 960M.  CMake still can build a project, but will not run or
create memory with cudaMalloc etc.

Installed driver at this point is 353.90.

GeForce Experience reports 381.65 driver

but I have downloaded:

384.94-notebook-win10-64bit-international-whql.exe

So I try that and driver installed is now 384.94

CUDA 7.5 works with new driver, but not seemingly driver shipped with
7.5 or 8.0.  NBody Runs.

CMake 3.9 still fails to build a runable project with:

GPU Device 0: "GeForce GTX 960M" with compute capability 5.0

Current device is [0]
Current device is [0]
CUDA error at
C:\projects\cmake\cmaketesting\v3.9\cuda_basic\src\cuda_basic_test.cpp:66
code=46(cudaErrorDevicesUnavailable) "cudaMalloc((void **)&dev_mem_ptr,
size)"

DeviceQuery now reports:

C:\ProgramData\NVIDIA Corporation\CUDA
Samples\v7.5\bin\win64\Debug>deviceQuery.exe
deviceQuery.exe Starting...

  CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "GeForce GTX 960M"
   CUDA Driver Version / Runtime Version          9.0 / 7.5
   CUDA Capability Major/Minor version number:    5.0
   Total amount of global memory:                 4096 MBytes
(4294967296 bytes)
   ( 5) Multiprocessors, (128) CUDA Cores/MP:     640 CUDA Cores
   GPU Max Clock rate:                            1176 MHz (1.18 GHz)
   Memory Clock rate:                             2505 Mhz
   Memory Bus Width:                              128-bit
   L2 Cache Size:                                 2097152 bytes
   Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536,
65536), 3D=(4096, 4096, 4096)
   Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
   Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384),
2048 layers
   Total amount of constant memory:               65536 bytes
   Total amount of shared memory per block:       49152 bytes
   Total number of registers available per block: 65536
   Warp size:                                     32
   Maximum number of threads per multiprocessor:  2048
   Maximum number of threads per block:           1024
   Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
   Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
   Maximum memory pitch:                          2147483647 bytes
   Texture alignment:                             512 bytes
   Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
   Run time limit on kernels:                     Yes
   Integrated GPU sharing Host Memory:            No
   Support host page-locked memory mapping:       Yes
   Alignment requirement for Surfaces:            Yes
   Device has ECC support:                        Disabled
   CUDA Device Driver Mode (TCC or WDDM):         WDDM (Windows Display
Driver Model)
   Device supports Unified Addressing (UVA):      Yes
   Device PCI Domain ID / Bus ID / location ID:   0 / 2 / 0
   Compute Mode:
      < Default (multiple host threads can use ::cudaSetDevice() with
device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.0, CUDA
Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce GTX 960M
Result = PASS

Which is how seemingly CUDA 9 driver support was installed.

Tried CMake 3.2 with CUDA 7.5

GPU Device 0: "GeForce GTX 960M" with compute capability 5.0

Current device is [0]
Current device is [0]
CUDA error at
C:\projects\cmake\cmaketesting\v3.2\cuda_basic\src\cuda_basic_test.cpp:67
code=46(cudaErrorDevicesUnavailable) "cudaMalloc((void **)&d_volume, size)"

and sigh!

There is some bizarre behavior going on here.

So CMake/Kitware I can get CUDA 7.5 to run samples with 384.94 driver
and CUDA 8.0 uninstalled but I cannot get CMake 3.2 using FindCUDA or
CMake 3.9 using project calls to build a simple CUDA app to allocate
memory on the device.  What gives?

I have been using CMake since 2.8 and CUDA since 1.3 on C1060's and
mobile Quadros and never experienced this.

Clearly NVIDIA is to blame for the 7.5/8.0 cats in a bag fighting and
7.5 not working with itself and only working with 9.0 driver, but I
cannot get any 3.2 or 3.9 to generate a project I can run... this is
really strange... it's always just worked.  If I could compile and run a
CUDA sdk app then I knew CMake would and has worked.  What could
possibly be going on here?





--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2

Could this be a Win 10 Pro/Enterprise CMake combo issue.  I brought over
demo project to OS refreshed M4700.  Was Win7 Pro now Windows 10
Enterprise.

Dell M4700 combo is:

Device 0: "Quadro K1000M"
   CUDA Driver Version / Runtime Version          8.0 / 7.5

CMake 3.2 or 3.9 will build but not run which is the same as on the Dell
7559 w 960M.

I am rebuilding, due to OS change a rebuild in CMake is necessary, my
existing project that was working and will test that.  Though simple 3.2
project does not work so my hopes are not high that my existing project
will fair any better.

Samples such as NBody work on M4700.

All worked on M4700 Win7 before OS refresh with exception of 3.9
attempts as I started trying 3.9 on 7559 w/Win10Pro.

Why would it be that CMake can compile an executable but not run it when
the CUDA samples work?

CUDA SDK Samples run just fine from VS (well when driver run time is
9.0/7.5 on 7559 w 960M), but simple CMake generated app does not. Simple
in that it only finds device (0) and calls cudaMalloc... ya know... the
ultra basic.




--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Robert Maynard
In reply to this post by Brian Davis-2
My responses are inline.

On Sat, Jul 29, 2017 at 7:00 PM, Brian J. Davis <[hidden email]> wrote:

> @Robert
>
> I created a fresh simple cmake project in 3.9.  This appeared to find CUDA
> 8.0 successfully so it may have something do with my other project settings
> that I am trying to get to work with 3.9, VS13, CUDA 7.5/8.0.
>
> Using:
>
> message( CUDACXX = ${CUDACXX})
> message( CMAKE_CUDA_COMPILER = ${CMAKE_CUDA_COMPILER})
>
>
> Reports
>
> CUDACXX=
> CMAKE_CUDA_COMPILER=C:/Program Files/NVIDIA GPU Computing
> Toolkit/CUDA/v8.0/bin/nvcc.exe
> Configuring done
> Generating done
>
> The question was at setting the CUDA version say 7.5 or 8.0.
>
> I search doc for CUDACXX and CMAKE_CUDA_COMPILER with no hits.  Is this
> stuff documented anywhere.

Unfortunately the environment variables are not documented anywhere
and this is a known issue
that I hope to have fixed in CMake 3.10.

The CMAKE_CUDA_COMPILER falls under the the CMAKE_<LANG>_COMPILER documentation
now with the new CUDA support (
https://cmake.org/cmake/help/v3.8/variable/CMAKE_LANG_COMPILER.html ).


>
> Do I really need to say set:
>
> CMAKE_CUDA_COMPILER=C:/Program Files/NVIDIA GPU Computing
> Toolkit/CUDA/v7.5/bin/nvcc.exe
>
> To get CMake to compile for 7.5?  I mean:
>
> find_package(CUDA 7.5)
>
> you could agree is/was much simpler.  I am becoming frustrated and confused
> by these changes.

It might be possible in the future to provide other hint controls to
tell CMake which
version of CUDA you would like to use before the project /
enable_language call. This
would be something that is best addressed on the cmake developer list or as
a gitlab issue ( https://gitlab.kitware.com/cmake/cmake/issues )

>
> I can't even get a simple CUDA app to run using FindCUDA (will compile) or
> compile using v3.9 and new project( CXX CUDA).
>
> Your example at:
>
> https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html
>
>
> Used:
>
> add_executable(CudaConsumeCompileFeatures main.cu)
>
> Is is required now that main.cpp be a .cu file now?  I wouldn't think so,
> but I am so lost in the woods on this that I am not sure of anything
> anymore.

So with the new CUDA support you can mix C/C++/CUDA sources together
inside a single library or executable. This example was only using CUDA
in the executable to reduce the complexity of the test.




>
> How do I get all the toolkit and sdk include and lib dir variables now as
> FindCUDA provided?

The toolkit include directory can be found by querying
CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
As far as CUDA SDK libraries those can simply used with target_link_libraries
as the SDK library path is considered to be an implicit link directory, and will
always be on the link line. This is actually the same for the CUDA sdk include
directory ( it will be placed on the include line when building ).

>
> I am so curfuffled by these changes.

These changes are needed to allow targets using CUDA to properly work with
'Modern' CMake (https://cmake.org/cmake/help/v3.8/manual/cmake-buildsystem.7.html#build-specification-and-usage-requirements).
Without these changes usage requirements and CUDA would never work together.

>
> Can I get the CMake doc in one (1) html page again... those were the good
> old days when scanning back and forth I would stumble on some good bits ...
> not that I can seemly find the doc for the new CUDA changes.  This reminds
> me of the days when I could only get doc on things like ExternalProject_Add
> at the command prompt.
>
>
>
>
>
>
> --
>
> Powered by www.kitware.com
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: http://cmake.org/cmake/help/support.html
> CMake Consulting: http://cmake.org/cmake/help/consulting.html
> CMake Training Courses: http://cmake.org/cmake/help/training.html
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/cmake
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian Davis-2

My responses are inline.
As are mine.
On Sat, Jul 29, 2017 at 7:00 PM, Brian J. Davis <bitminer at gmail.com> wrote:
> @Robert
>
> I created a fresh simple cmake project in 3.9.  This appeared to find CUDA
> 8.0 successfully so it may have something do with my other project settings
> that I am trying to get to work with 3.9, VS13, CUDA 7.5/8.0.
>
> Using:
>
> message( CUDACXX = ${CUDACXX})
> message( CMAKE_CUDA_COMPILER = ${CMAKE_CUDA_COMPILER})
>
>
> Reports
>
> CUDACXX=
> CMAKE_CUDA_COMPILER=C:/Program Files/NVIDIA GPU Computing
> Toolkit/CUDA/v8.0/bin/nvcc.exe
> Configuring done
> Generating done
>
> The question was at setting the CUDA version say 7.5 or 8.0.
>
> I search doc for CUDACXX and CMAKE_CUDA_COMPILER with no hits.  Is this
> stuff documented anywhere.

Unfortunately the environment variables are not documented anywhere
and this is a known issue
that I hope to have fixed in CMake 3.10.

The CMAKE_CUDA_COMPILER falls under the the CMAKE_<LANG>_COMPILER documentation
now with the new CUDA support (
https://cmake.org/cmake/help/v3.8/variable/CMAKE_LANG_COMPILER.html ).


So let me get this straight.  Changes appear to begin in 3.7 / 3.8 with VS started to be supported in 3.9, but the only way us schleps on the internet know how to use it is to wait until 3.10.  Wow... seriously.  And well I am not holding out *hope*.

>
> Do I really need to say set:
>
> CMAKE_CUDA_COMPILER=C:/Program Files/NVIDIA GPU Computing
> Toolkit/CUDA/v7.5/bin/nvcc.exe
>
> To get CMake to compile for 7.5?  I mean:
>
> find_package(CUDA 7.5)
>
> you could agree is/was much simpler.  I am becoming frustrated and confused
> by these changes.

It might be possible in the future to provide other hint controls to
tell CMake which
version of CUDA you would like to use before the project /
enable_language call. This
would be something that is best addressed on the cmake developer list or as
a gitlab issue ( https://gitlab.kitware.com/cmake/cmake/issues )
In the future with the robots... anything is possible... provided they are not out to kill us.

Why would I bother to seemingly point out the obvious @developers list or issue tracker.  Hopefully anyone reading this can tell I am a bit frustrated at this point.  Huh here's how that would go:

Me: Hey Devs you forgot to document how to use the tool.  Do you expect anyone but you to know how to use it?

Devs: Huh yea we know...  Ugh ... errr... Huhhh were getting to that.

Me: sigh...
>
> I can't even get a simple CUDA app to run using FindCUDA (will compile) or
> compile using v3.9 and new project( CXX CUDA).
>
> Your example at:
>
> https://cmake.org/cmake/help/latest/manual/cmake-compile-features.7.html
>
>
> Used:
>
> add_executable(CudaConsumeCompileFeatures main.cu)
>
> Is is required now that main.cpp be a .cu file now?  I wouldn't think so,
> but I am so lost in the woods on this that I am not sure of anything
> anymore.

So with the new CUDA support you can mix C/C++/CUDA sources together
inside a single library or executable. This example was only using CUDA
in the executable to reduce the complexity of the test.

Only if I can get it to work.  Which I can't ... and would not know how anyway as well it is not documented... so why waste my time.
>
> How do I get all the toolkit and sdk include and lib dir variables now as
> FindCUDA provided?

The toolkit include directory can be found by querying
CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES
As far as CUDA SDK libraries those can simply used with target_link_libraries
as the SDK library path is considered to be an implicit link directory, and will
always be on the link line. This is actually the same for the CUDA sdk include
directory ( it will be placed on the include line when building ).

>
> I am so curfuffled by these changes.

These changes are needed to allow targets using CUDA to properly work with
'Modern' CMake (https://cmake.org/cmake/help/v3.8/manual/cmake-buildsystem.7.html#build-specification-and-usage-requirements).
Without these changes usage requirements and CUDA would never work together.

I assume the term *work* is used loosely.... VERY loosely.  I hate to point out the obvious, but I can't get it to work now and have not clue or seemingly hope on figuring it out other than to check out CMake and roll my own version after reading impl in order to figure out how it does and how to get it to work.  By that time I'd rather revert to writing VS xml project file by hand.

Regarding 960M and CUDA  7.5/7.5, 8.0/7.5, and 7.7/9.0

Answer is:

960M was likely released post CUDA  7.5 driver and possibly post 8.0.  Seems that architecture differences do not allow old drivers to work on newer arch cards.   Once 9.0 driver was released... 7.5 run time worked with 9.0 driver, but for some reason not 8.0.  Seems CUDA and Nvidia Runtime/Drivers have a dirty little secret much like Java and the runtimes.

At this point I cannot get CMake 3.2 or 3.9 to work with CUDA 7.5/9.0, VS 13, on Win10Pro/Enterprise.  And from the state of doc it seems not worth my effort to even try anymore.







--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
12
Loading...