mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
Don't take the address of a kernel on CUDA devices that don't support this feature.
This commit is contained in:
parent
884c075058
commit
b9ea40c30d
@ -291,14 +291,17 @@ struct GpuDevice {
|
||||
int max_blocks_;
|
||||
};
|
||||
|
||||
#ifndef __CUDA_ARCH__
|
||||
#if !defined(__CUDA_ARCH__)
|
||||
#define LAUNCH_CUDA_KERNEL(kernel, gridsize, blocksize, sharedmem, device, ...) \
|
||||
(kernel) <<< (gridsize), (blocksize), (sharedmem), (device).stream() >>> (__VA_ARGS__); \
|
||||
assert(cudaGetLastError() == cudaSuccess);
|
||||
#else
|
||||
#elif __CUDA_ARCH__ >= 350
|
||||
#define LAUNCH_CUDA_KERNEL(kernel, ...) \
|
||||
{ const auto __attribute__((__unused__)) __makeTheKernelInstantiate = &(kernel); } \
|
||||
eigen_assert(false && "Cannot launch a kernel from another kernel" __CUDA_ARCH__);
|
||||
eigen_assert(false && "Cannot launch a kernel from another kernel" __CUDA_ARCH__ kernel);
|
||||
#else
|
||||
#define LAUNCH_CUDA_KERNEL(kernel, ...) \
|
||||
eigen_assert(false && "Cannot launch a kernel from another kernel" __CUDA_ARCH__ kernel);
|
||||
#endif
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user