2023-12-15 01:35:58 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
2024-08-20 21:09:33 +08:00
|
|
|
#if defined(__CUDACC__) || defined(_NVHPC_CUDA)
|
|
|
|
|
#define HOST_DEVICE_INLINE __forceinline__ __host__ __device__
|
|
|
|
|
#define DEVICE_INLINE __forceinline__ __device__
|
|
|
|
|
#define HOST_INLINE __forceinline__ __host__
|
|
|
|
|
#else
|
|
|
|
|
#define HOST_DEVICE_INLINE inline
|
|
|
|
|
#define DEVICE_INLINE inline
|
|
|
|
|
#define HOST_INLINE inline
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-06-10 04:23:30 +08:00
|
|
|
int64_t get_device_attribute(int64_t attribute, int64_t device_id);
|
2023-11-24 08:31:19 +08:00
|
|
|
|
2024-06-10 04:23:30 +08:00
|
|
|
int64_t get_max_shared_memory_per_block_device_attribute(int64_t device_id);
|