Robert Maynard
fa583869f7
CUDA: Use MSVC default pattern for naming object files
...
The default that CUDA uses causes failures when you try to embed
CUDA obj's into another target.
2018-01-30 09:14:02 -05:00
Luz Paz
3ab7bf8285
Various typo fixes
...
Some are user-facing. Others are source comments.
2018-01-04 06:52:01 +11:00
Robert Maynard
4b7618d170
CUDA: Fix CUDA_STANDARD selection via cxx_std_11 with CXX_STANDARD
...
When C++ features require a certain C++/CUDA level, verify or update the
standard level target property for each language independently.
While at it, add missing rejection of invalid `CUDA_STANDARD` property
values.
Co-Author: Brad King <brad.king@kitware.com>
Fixes : #17519
2017-12-15 10:29:20 -05:00
Daniel Pfeifer
2b4c32c95f
clang-format: format all code as Cpp11
2017-08-30 11:07:05 -04:00
Brad King
fff782f6a6
Tests: Simplify CUDA rpath on macOS
...
Use the `BUILD_RPATH` property and reference the CMake-computed location
of the runtime libraries.
2017-06-21 10:41:49 -04:00
Robert Maynard
a36fb229ba
CUDA: Visual Studio now properly delays device linking
2017-04-26 11:41:22 -04:00
Robert Maynard
d40fc8856d
CUDA: ObjectLibrary test executable now runs on OSX
2017-03-23 09:44:30 -04:00
Brad King
d1530cc9a5
Merge topic 'cuda-msvc-flags'
...
55fb46d2
CUDA: Fix default compiler flags on Windows
d7c80f60
CUDA: Fix test cases to not override CUDA flags
2017-02-16 13:15:35 -05:00
Brad King
d7c80f6036
CUDA: Fix test cases to not override CUDA flags
...
Append to `CMAKE_CUDA_FLAGS` instead of overwriting it.
2017-02-15 11:12:09 -05:00
Brad King
e853dfed6a
Merge topic 'cuda-with-c'
...
1c60231c
CUDA: Link to standard system libraries when linking as CUDA
8d75d8dc
Tests: Add case for CUDA with C but not C++
2017-02-15 08:24:05 -05:00
Brad King
1c60231ca5
CUDA: Link to standard system libraries when linking as CUDA
...
On Windows with MSVC-like host compilers we must honor the standard
libraries chosen by the `Platform/Windows-MSVC` module. Otherwise C
code linked into the CUDA binary that expects to have these libraries
available may not link.
2017-02-14 10:34:15 -05:00
Brad King
8d75d8dc72
Tests: Add case for CUDA with C but not C++
...
An executable using CUDA and C should link as CUDA.
2017-02-14 10:34:06 -05:00
Brad King
33a65941fa
Tests: Run clang-format on CUDA code
2017-02-14 10:21:48 -05:00
Brad King
fa5188d0ed
Merge branch 'backport-clang-format-cuda' into clang-format-cuda
2017-02-14 10:21:22 -05:00
Brad King
c4a6135039
Tests: Run clang-format on CUDA code
2017-02-14 10:20:50 -05:00
Brad King
592e3d2f96
clang-format.bash: Format CUDA source files too
...
Add `.clang-format` configuration files for Cuda test directories that
use `Standard: Cpp11`. Otherwise clang-format splits the triple angle
brackets used for CUDA kernels.
2017-02-14 10:20:23 -05:00
Brad King
b7d8d80a62
Merge topic 'cmake_provide_include_dir_for_toolkit'
...
44f3acb2
CUDA: Detect the toolkit include directories
2017-02-14 08:30:30 -05:00
Robert Maynard
44f3acb202
CUDA: Detect the toolkit include directories
...
The `nvcc -v` output provides what include directories need to be added
to use the CUDA toolkit from other languages ( C/C++ ).
2017-02-10 16:08:06 -05:00
Pierre Moreau
166b339387
Tests/Cuda: Select a CUDA device supporting compute 3.0
2017-02-10 13:47:05 -05:00
Pierre Moreau
cbe4d5957b
Tests/Cuda: Return a non-zero code if errors occurred
2017-02-10 13:46:42 -05:00
Pierre Moreau
8731701cb6
Tests/Cuda: Use memory allocated on the GPU in the kernels
2017-02-10 13:46:08 -05:00
Pierre Moreau
0ae5386aa9
Tests/Cuda: Add missing separable compilation property
...
This resulted in `mixed_kernel()` returning an "invalid device function"
at runtime for `file1_func()`.
Suggested-by: Robert Maynard
2017-02-10 13:46:08 -05:00
Pierre Moreau
ce19607fed
Tests/Cuda: Fix missing CUDA static library at runtime on macOS
...
Suggested-by: Robert Maynard
2017-02-10 13:46:07 -05:00
Pierre Moreau
008ed80dcf
Tests/Cuda: Output error messages to std::cerr instead of std::cout
2017-02-10 13:46:07 -05:00
Pierre Moreau
c0d7bb8368
Tests/Cuda: Print asynchronous error messages, if any
...
As kernel launches are asynchronous, a `cudaGetLastError()` right after
the kernel launch might be executed while the kernel is still running.
Synchronizing the device will ensure that all the work is completed
before progressing further on, and allows to catch errors that were
previously missed.
The `cudaGetLastError()` after the `cudaDeviceSynchronize()` is there
to reset the error variable to `cudaSuccess`.
2017-02-10 13:46:07 -05:00
Pierre Moreau
21a125cdbf
Tests/Cuda: Print error message if mixed_kernel failed
2017-02-10 13:46:06 -05:00
Pierre Moreau
eebb2be8b0
Tests/Cuda: Add identifiers to error messages
2017-02-10 13:46:06 -05:00
Pierre Moreau
84f3c87b03
Tests/Cuda: Print error message if an error occurred
...
Fixes c59811a2
"CUDA: Tests now state why they are failing when no CUDA card is found."
2017-02-10 13:46:06 -05:00
Robert Maynard
dc5051f1c1
CUDA: Test that CUDA flags are used when device linking executables.
2017-01-12 15:13:31 -05:00
Brad King
5599d858c7
CUDA: Port test cases to Windows with MSVC host compiler
2017-01-12 10:39:04 -05:00
Robert Maynard
1ce39a1e73
CUDA: ConsumeCompileFeatures use cxx_nullptr for wider compiler support
...
We need to use a C++11 feature that is supported by the widest
range of compilers, so we chose nullptr instead of constexpr.
2017-01-11 10:40:38 -05:00
Robert Maynard
c59811a233
CUDA: Tests now state why they are failing when no CUDA card is found.
2016-12-15 15:57:01 -05:00
Brad King
c1a5507917
CUDA: Fix Cuda.Complex test case extern function signatures
...
Make the return types of the extern function declared in `main.cpp`
match those in the method implementations.
2016-12-09 14:19:22 -05:00
Robert Maynard
7b9131da64
CUDA: Add tests to verify CUDA compiler works properly.
2016-11-14 16:40:50 -05:00