| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
With CUDAARCHS there's the possibility of tests being run with multiple
architectures or having CMAKE_CUDA_ARCHITECTURES set with NVCC despite CMP0104
being OLD.
Fix a few tests to work properly in such cases.
|
|
|
|
|
|
|
|
|
|
|
|
| |
For NVCC the compiler takes care of device linking when passed the "-dlink"
flag.
Clang doesn't support such magic and requires the buildsystem to do the work
that NVCC does behind the scenes.
The implementation is based on Bazel's device linking documentation:
https://github.com/tensorflow/tensorflow/blob/7cabcdf073abad8c46e9dda62bb8fa4682d2061e/third_party/nccl/build_defs.bzl.tpl#L259
Closes: #20726
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Architecture 30 was removed with CUDA 11, so most of the CUDA tests fail with
it.
Remove setting the architecture and bump the minimum version to 3.18, so
CMP0104 takes effect and we can rely on the default architecture, which is
guaranteed to be compilable.
Use of __ldg() in ProperLinkFlags was removed as it only affects performance
and is available only on sm_35 and above.
Testing the functionality of CUDA_ARCHITECTURES is already covered by
CudaOnly.Architecture and CudaOnly.CompileFlags.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See https://github.com/codespell-project/codespell#readme
The following command was used:
```
codespell -q6 --skip="\
.git,\
*.json,\
./Copyright.txt,\
./Help/command/foreach.rst,\
./Help/prop_test/REQUIRED_FILES.rst,\
./Help/variable/CTEST_COVERAGE_COMMAND.rst,\
./Modules/CMakeCheckCompilerFlagCommonPatterns.cmake,\
./Modules/CMakeRCInformation.cmake,\
./Modules/Internal/CPack/NSIS.template.in,\
./Modules/FindMatlab.cmake,\
./Modules/MatlabTestsRedirect.cmake,\
./Modules/Platform/Windows-Clang.cmake,\
./Modules/Platform/Windows-Intel-Fortran.cmake,\
./Modules/Platform/Windows-MSVC.cmake,\
./Source/CMakeVersion.cmake,\
./Source/cmConvertMSBuildXMLToJSON.py,\
./Source/cmCreateTestSourceList.cxx,\
./Source/cmGlobalVisualStudio10Generator.cxx,\
./Source/cmExportBuildFileGenerator.cxx,\
./Source/cmExportInstallAndroidMKGenerator.cxx,\
./Source/cmExportInstallFileGenerator.cxx,\
./Source/cmExportSet.cxx,\
./Source/cmExportTryCompileFileGenerator.cxx,\
./Source/cmFindPackageCommand.cxx,\
./Source/cmInstallCommand.cxx,\
./Source/cmGeneratorExpressionLexer.cxx,\
./Source/cmLocalVisualStudio7Generator.cxx,\
./Source/cmOrderDirectories.cxx,\
./Source/cmTarget.cxx,\
./Source/kwsys/*,\
./Source/QtDialog/CMakeSetupDialog.ui,\
./Source/CPack/WiX/cmWIXRichTextFormatWriter.cxx,\
./Source/CTest/cmParseCoberturaCoverage.h,\
./Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in,\
./Tests/RunCMake/CPack/tests/DMG_SLA/English.license.rtf,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.license.txt,\
./Tests/RunCMake/CPack/tests/DMG_SLA/German.menu.txt,\
./Tests/RunCMake/GoogleTest/xml_output.cpp,\
./Tests/RunCMake/Make/TargetMessages*,\
./Utilities/*,\
" \
-L "\
dependees,\
endwhile,\
fo,\
filetest,\
helpfull,\
nd,\
objext,\
stoll,\
supercedes,\
superceded,\
vas,\
varn,\
"
```
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The ability to disable adding architectures completely for packaging purposes
and cases requiring passing the architectures flags explicitly has been
requested.
Support a false value for CUDA_ARCHITECTURES and CMAKE_CUDA_ARCHITECTURES
for this purpose.
Implements #20821.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit 0d0145138f (CUDA: Add abstraction for cuda runtime
selection, 2019-11-29, v3.17.0-rc1~83^2) we add CUDA runtime library
selection flags by default.
To maintain backwards compatibility the default CUDA runtime
library needs to be computed based on what libraries are found
on the initial compiler invocation. For example a toolchain
could establish initial flags that have all CUDA compilations
using the runtime version, and if we don't detect this we will
try to link to both the static and shared runtime.
Co-Author: Brad King <brad.king@kitware.com>
Fixes: #20708
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In commit a653ca9504 (Tests: Update CUDA tests to work with Clang,
2020-03-27) some tests were conditioned using `CMAKE_CUDA_COMPILER_ID`.
That is not defined when configuring CMake itself, so it accidentally
turned off NVCC-specific CUDA tests altogether. Convert the conditions
to check `CMake_TEST_CUDA` for `Clang` instead. That option is added
explicitly to builds where we want the tests to run, so we can set it to
a value indicating the CUDA compiler vendor.
In commit a653ca9504 (Tests: Update CUDA tests to work with Clang,
2020-03-27) the NVCC-specific `CudaOnly.GPUDebugFlag` test was
accidentally broken by removing a space when appending `-G` to the CUDA
flags. This was covered by the test not running. Restore the space.
Fixes: #20727
|
| | |
|
| |
| |
| |
| | |
Covers passing compile flags explicitly for both NVCC and Clang.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
Simplifies CUDA target architecture handling.
Required for Clang support as Clang doesn't automatically select a supported architecture.
We detect a supported architecture during compiler identification and set CMAKE_CUDA_ARCHITECTURES to it.
Introduces CMP0104 for backwards compatibility with manually setting code generation flags with NVCC.
Implements #17963.
|
|
|
|
|
| |
Fixes #17559
Replace our hard-coded default of cudart=static with a first-class abstraction to select the runtime library from an enumeration of logical names.
|
|
|
|
| |
Fixes #20164
|
| |
|
|
|
|
|
|
| |
Refined the initial design of FindCUDAToolkit and improve it
by adding more library support, more toolkit information and
tests.
|
| |
|
|
|
|
|
| |
Run the `clang-format.bash` script to update our C and C++ code to a new
include order `.clang-format`. Use `clang-format` version 6.0.
|
|
|
|
|
|
| |
Previously the CMake didn't compute the required set of libraries
needed to properly device link a static library when
CUDA_RESOLVE_DEVICE_SYMBOLS was enabled.
|
| |
|
|
|
|
|
| |
Introduce the CUDA_COMPILER_ID and CUDA_COMPILER_VERSION generator
expressions.
|
|
|
|
|
|
|
| |
`CUDA_RESOLVE_DEVICE_SYMBOLS` can be used with shared, module, and
executable target types. This relaxation is to allow for better
interoperability with linkers that automatically do CUDA device symbol
resolution and have no way to disable it.
|
|
|
|
|
|
|
|
|
| |
Convert the `CudaOnly.LinkSystemDeviceLibraries` test to a new
`Cuda.ProperDeviceLibraries` test. The former covered only the
`cublas_device` library which is removed by CUDA 10. Extend the new
test to also cover various cases of using threads.
Issue: #18008
|
|
|
|
|
| |
Make them match what `ADD_TEST_MACRO` gives to ctest as the
project name to build so that the `.sln` file will be found.
|
|\
| |
| |
| |
| |
| |
| | |
122c79748c CUDA: Avoid using deprecated cublas_device to identify device lib dirs
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2296
|
| |
| |
| |
| |
| |
| |
| | |
Use `curand_static` to identify directories containing device libraries
because `cublas_device` is deprecated and will be removed in the future.
Issue: #18290
|
| |
| |
| |
| |
| |
| |
| |
| | |
The nvcc device linker is designed so that each static library
with device symbols only needs to be listed once as it doesn't
care about link order. If you provide the same static library
multiple times it will error out. To make sure this occurs
we find the unique set of link items.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`. Use `clang-format` version 6.0.
* If you reached this commit for a line in `git blame`, re-run the blame
operation starting at the parent of this commit to see older history
for the content.
* See the parent commit for instructions to rebase a change across this
style transition commit.
|
|
|
|
|
|
|
|
|
| |
The CUDA Toolkit Visual Studio Integration does not honor the
`ClCompile.ProgramDataBaseFileName` field when telling `nvcc` how to
invoke `cl`. Work around this problem by passing `-Xcompiler=-Fd...`
ourselves through `AdditionalOptions`.
Fixes: #17647
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we dropped non-target items from the device link line because
nvcc rejects paths to shared library files, and only with target items
do we know the kind of library. However, this also prevents projects
from linking to system-provided libraries like `cublas_device` that
contain device code.
Fix this by passing more link items to device linking. Items that are
not file paths, such as `-lfoo`, can simply be passed unconditionally.
Items that are targets known to be shared libraries can still be
skipped. Items that are paths to library files can be passed directly
if they end in `.a`. Otherwise, pass them using `-Xnvlink` to bypass
nvcc's front-end. The nvlink tool knows to ignore shared library files.
Issue: #16317
|
|
|
|
| |
If `cudaMallocManaged` fails then later use of `has_debug` is not valid.
|
|\
| |
| |
| |
| |
| |
| | |
46abfedb CUDA: MSVC will now state files are cuda files when needed
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1658
|
| |
| |
| |
| |
| |
| |
| |
| | |
The MSVC CUDA build customizations before CUDA 9 would not explicitly
add the -x cu option when building. This caused .cpp and .c files
invoked with CudaCompile to be compiled as host code and not
cuda. Now when we detect CUDA < 9 we will explicitly add this
option to correct this bug.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| | |
506fda1c Genex: Enable COMPILE_LANGUAGE for INCLUDE_DIRECTORIES with VS and Xcode
c2f79c98 Genex: Enable COMPILE_LANGUAGE for COMPILE_DEFINITIONS with VS and Xcode
0795d25b cmVisualStudio10TargetGenerator: Factor out include dir computation
1ab4d186 cmLocalVisualStudio7Generator: Clarify variable name of compiled language
07e1a743 cmLocalVisualStudio7Generator: Clarify condition for target that compiles
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1657
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The set of compile flags used for a target's C and C++ sources is based
on the linker language. By default this is always the C++ flags if any
C++ sources appear in the target, and otherwise the C flags. Therefore
we can define the `COMPILE_LANGUAGE` generator expression in
`INCLUDE_DIRECTORIES` to match the selected language.
This is not exactly the same as for other generators, but is the best VS
and Xcode can do. It is also sufficient for many use cases since the
set of include directories for C and C++ is frequently similar but may
be distinct from those for other languages like CUDA.
Fixes: #17435
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The set of compile flags used for a target's C and C++ sources is based
on the linker language. By default this is always the C++ flags if any
C++ sources appear in the target, and otherwise the C flags. Therefore
we can define the `COMPILE_LANGUAGE` generator expression in
`COMPILE_DEFINITIONS` to match the selected language.
This is not exactly the same as for other generators, but is the best VS
and Xcode can do. It is also sufficient for many use cases since the
set of definitions for C and C++ is frequently similar but may be
distinct from those for other languages like CUDA.
Issue: #17435
|
|\ \
| |/
|/|
| |
| |
| |
| | |
dcc606ad CUDA: Allow -G to control device debuging on MSVC.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1619
|
| |
| |
| |
| | |
Fixes #17551
|
|/
|
|
| |
Fixes #17263
|
|
|
|
|
|
|
|
|
| |
The previous version had two bugs that caused the JIT runtime errors.
1. It was building the executable without separable compilation enabled
2. All kernel launches will fail if any kernel is missing a symbol, that
is why the call to file2_launch_kernel had to be removed
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
2ae880fa Genex: Enable COMPILE_LANGUAGE for COMPILE_OPTIONS with Visual Studio
2b7d59f3 Genex: Enable COMPILE_LANGUAGE for file(GENERATE) with Visual Studio
0f6f7c8a Genex: Fix COMPILE_LANGUAGE messages to allow file(GENERATE) with Xcode
c5a82d0f Tests: Decouple COMPILE_LANGUAGE in file(GENERATE) from COMPILE_OPTIONS
25773650 Tests: Remove unnecessary result files from RunCMake.File_Generate
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Jason Juang <jasjuang@gmail.com>
Merge-request: !1511
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since commit v3.9.0-rc4~3^2~1 (VS: Fix target_compile_options for CUDA,
2017-06-21), the evaluation of `COMPILE_LANGUAGE` receives the proper
language. The set of compile flags used for a target's C and C++
sources is based on the linker language. By default this is always the
C++ flags if any C++ sources appear in the target, and otherwise the C
flags. Therefore we can define the `COMPILE_LANGUAGE` generator
expression in `COMPILE_OPTIONS` to match the selected language.
This is not exactly the same as for other generators, but is the best VS
can do. It is also sufficient for many use cases since the set of
allowed flags for C and C++ is almost the same in Visual Studio.
Furthermore, since the VS generator moves many of the flags to
declarative `.vcxproj` elements, it will automatically avoid passing
C++ flags for C sources.
Issue: #17435
|
|/
|
|
|
|
|
| |
Use its value to initialize the `CUDA_SEPARABLE_COMPILATION` target
property when targets are created.
Fixes: #17478
|
|
|
|
| |
CUDA 9 dropped support for `compute_20`, so use a different alternative.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
bbc1f364 VS: Fix support for nvcc flags not in our flag table
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1007
|