22#if defined(FZGMOD_BACKEND_HIP)
29using stream_t = hipStream_t;
30using event_t = hipEvent_t;
31using mempool_t = hipMemPool_t;
32using error_t = hipError_t;
33using graph_t = hipGraph_t;
34using graph_exec_t = hipGraphExec_t;
36inline constexpr error_t kBackendSuccess = hipSuccess;
43 return hipGetErrorString(err);
50 hipMemPoolGetAttribute(pool, hipMemPoolAttrUsedMemCurrent, &used);
51 return static_cast<size_t>(used);
58 hipMemPoolGetAttribute(pool, hipMemPoolAttrUsedMemHigh, &high);
59 return static_cast<size_t>(high);
64#elif defined(FZGMOD_BACKEND_SYCL)
66#error "FZGMOD_BACKEND=SYCL is not implemented yet"
75using stream_t = cudaStream_t;
76using event_t = cudaEvent_t;
77using mempool_t = cudaMemPool_t;
78using error_t = cudaError_t;
79using graph_t = cudaGraph_t;
80using graph_exec_t = cudaGraphExec_t;
82inline constexpr error_t kBackendSuccess = cudaSuccess;
89 return cudaGetErrorString(err);
96 cudaMemPoolGetAttribute(pool, cudaMemPoolAttrUsedMemCurrent, &used);
97 return static_cast<size_t>(used);
104 cudaMemPoolGetAttribute(pool, cudaMemPoolAttrUsedMemHigh, &high);
105 return static_cast<size_t>(high);
Backend-neutral spelling of the host-side GPU runtime API.
Definition algorithms.h:48
size_t getPoolUsedMemCurrent(mempool_t pool)
Definition types.h:93
const char * getBackendErrorString(error_t err)
Definition types.h:88
constexpr bool kBackendSupportsGraphCapture
Definition types.h:85
size_t getPoolUsedMemHigh(mempool_t pool)
Definition types.h:101