Warning, /HeterogeneousTest/CUDAWrapper/README.md is written in an unsupported language. File is not indexed.
0001 # Introduction
0002
0003 The packages `HeterogeneousTest/CUDADevice`, `HeterogeneousTest/CUDAKernel`,
0004 `HeterogeneousTest/CUDAWrapper` and `HeterogeneousTest/CUDAOpaque` implement a set of libraries,
0005 plugins and tests to exercise the build rules for CUDA.
0006 In particular, these tests show what is supported and what are the limitations implementing
0007 CUDA-based libraries, and using them from multiple plugins.
0008
0009
0010 # `HeterogeneousTest/CUDAWrapper`
0011
0012 The package `HeterogeneousTest/CUDAWrapper` implements a library that defines and exports host-side
0013 wrappers that launch the kernels defined in the `HeterogeneousTest/CUDAKernel` library:
0014 ```c++
0015 namespace cms::cudatest {
0016
0017 void wrapper_add_vectors_f(...);
0018 void wrapper_add_vectors_d(...);
0019
0020 } // namespace cms::cudatest
0021 ```
0022 These wrappers can be used from host-only, non-CUDA aware libraries, plugins and applications. They
0023 can be linked with the standard host linker.
0024
0025 The `plugins` directory implements the `CUDATestWrapperAdditionModule` `EDAnalyzer` that calls the
0026 wrappers defined in this library. This plugin shows how the wrappers can be used directly from a
0027 host-only, non-CUDA aware plugin.
0028
0029 The `test` directory implements the `testCudaDeviceAdditionWrapper` test binary that calls the
0030 wrappers defined in this library, and shows how they can be used directly from a host-only, non-CUDA
0031 aware application.
0032 It also contains the `testCUDATestWrapperAdditionModule.py` python configuration to exercise the
0033 `CUDATestWrapperAdditionModule` module.
0034
0035
0036 # Other packages
0037
0038 For various ways in which this library and plugin can be tested, see also the other
0039 `HeterogeneousTest/CUDA...` packages:
0040 - [`HeterogeneousTest/CUDADevice/README.md`](../../HeterogeneousTest/CUDADevice/README.md)
0041 - [`HeterogeneousTest/CUDAKernel/README.md`](../../HeterogeneousTest/CUDAKernel/README.md)
0042 - [`HeterogeneousTest/CUDAOpaque/README.md`](../../HeterogeneousTest/CUDAOpaque/README.md)
0043
0044
0045 # Combining plugins
0046
0047 `HeterogeneousTest/CUDAOpaque/test` contains the `testCUDATestAdditionModules.py` python
0048 configuration that tries to exercise all four plugins in a single application.
0049 Unfortunately, the CUDA kernels used in the `CUDATestDeviceAdditionModule` plugin and those used in
0050 the `HeterogeneousTest/CUDAKernel` library run into some kind of conflict, leading to the error
0051 ```
0052 HeterogeneousTest/CUDAKernel/plugins/CUDATestKernelAdditionAlgo.cu, line 17:
0053 cudaCheck(cudaGetLastError());
0054 cudaErrorInvalidDeviceFunction: invalid device function
0055 ```
0056 Using together the other three plugins does work correctly.