Lines Matching refs:ceed
21 #define CeedChk_hiprtc(ceed, x) … argument
24 …if (result != HIPRTC_SUCCESS) return CeedError((ceed), CEED_ERROR_BACKEND, hiprtcGetErrorString(re…
27 #define CeedCallHiprtc(ceed, ...) \ argument
30 CeedChk_hiprtc(ceed, ierr_q_); \
36 static int CeedCompileCore_Hip(Ceed ceed, const char *source, const bool throw_error, bool *is_comp… in CeedCompileCore_Hip() argument
53 CeedCallHip(ceed, hipRuntimeGetVersion(&runtime_version)); in CeedCompileCore_Hip()
82 CeedCallBackend(CeedGetData(ceed, (void **)&ceed_data)); in CeedCompileCore_Hip()
83 CeedCallHip(ceed, hipGetDeviceProperties(&prop, ceed_data->device_id)); in CeedCompileCore_Hip()
92 CeedCallBackend(CeedGetJitSourceRoots(ceed, &num_jit_source_dirs, &jit_source_dirs)); in CeedCompileCore_Hip()
100 CeedCallBackend(CeedRestoreJitSourceRoots(ceed, &jit_source_dirs)); in CeedCompileCore_Hip()
106 CeedCallBackend(CeedGetJitDefines(ceed, &num_jit_defines, &jit_defines)); in CeedCompileCore_Hip()
114 CeedCallBackend(CeedRestoreJitDefines(ceed, &jit_defines)); in CeedCompileCore_Hip()
121 CeedCallHiprtc(ceed, hiprtcCreateProgram(&prog, code.str().c_str(), NULL, 0, NULL, NULL)); in CeedCompileCore_Hip()
124 …CeedDebug256(ceed, CEED_DEBUG_COLOR_SUCCESS, "---------- ATTEMPTING TO COMPILE JIT SOURCE --------… in CeedCompileCore_Hip()
125 CeedDebug(ceed, "Source:\n%s\n", code.str().c_str()); in CeedCompileCore_Hip()
126 CeedDebug256(ceed, CEED_DEBUG_COLOR_SUCCESS, "---------- END OF JIT SOURCE ----------\n"); in CeedCompileCore_Hip()
127 if (CeedDebugFlag(ceed)) { in CeedCompileCore_Hip()
129 CeedDebug256(ceed, CEED_DEBUG_COLOR_SUCCESS, "---------- JiT COMPILER OPTIONS ----------\n"); in CeedCompileCore_Hip()
131 CeedDebug(ceed, "Option %d: %s", i, opts[i]); in CeedCompileCore_Hip()
133 CeedDebug(ceed, ""); in CeedCompileCore_Hip()
134 …CeedDebug256(ceed, CEED_DEBUG_COLOR_SUCCESS, "---------- END OF JiT COMPILER OPTIONS ----------\n"… in CeedCompileCore_Hip()
151 CeedChk_hiprtc(ceed, hiprtcGetProgramLogSize(prog, &log_size)); in CeedCompileCore_Hip()
153 CeedCallHiprtc(ceed, hiprtcGetProgramLog(prog, log)); in CeedCompileCore_Hip()
155 return CeedError(ceed, CEED_ERROR_BACKEND, "%s\n%s", hiprtcGetErrorString(result), log); in CeedCompileCore_Hip()
158 CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- COMPILE ERROR DETECTED ----------\n"); in CeedCompileCore_Hip()
159 CeedDebug(ceed, "Error: %s\nCompile log:\n%s\n", hiprtcGetErrorString(result), log); in CeedCompileCore_Hip()
160 CeedDebug256(ceed, CEED_DEBUG_COLOR_WARNING, "---------- BACKEND MAY FALLBACK ----------\n"); in CeedCompileCore_Hip()
162 CeedCallHiprtc(ceed, hiprtcDestroyProgram(&prog)); in CeedCompileCore_Hip()
168 CeedCallHiprtc(ceed, hiprtcGetCodeSize(prog, &ptx_size)); in CeedCompileCore_Hip()
170 CeedCallHiprtc(ceed, hiprtcGetCode(prog, ptx)); in CeedCompileCore_Hip()
171 CeedCallHiprtc(ceed, hiprtcDestroyProgram(&prog)); in CeedCompileCore_Hip()
173 CeedCallHip(ceed, hipModuleLoadData(module, ptx)); in CeedCompileCore_Hip()
178 int CeedCompile_Hip(Ceed ceed, const char *source, hipModule_t *module, const CeedInt num_defines, … in CeedCompile_Hip() argument
183 …const CeedInt ierr = CeedCompileCore_Hip(ceed, source, true, &is_compile_good, module, num_defines… in CeedCompile_Hip()
190 int CeedTryCompile_Hip(Ceed ceed, const char *source, bool *is_compile_good, hipModule_t *module, c… in CeedTryCompile_Hip() argument
194 …const CeedInt ierr = CeedCompileCore_Hip(ceed, source, false, is_compile_good, module, num_defines… in CeedTryCompile_Hip()
204 int CeedGetKernel_Hip(Ceed ceed, hipModule_t module, const char *name, hipFunction_t *kernel) { in CeedGetKernel_Hip() argument
205 CeedCallHip(ceed, hipModuleGetFunction(kernel, module, name)); in CeedGetKernel_Hip()
212 int CeedRunKernel_Hip(Ceed ceed, hipFunction_t kernel, const int grid_size, const int block_size, v… in CeedRunKernel_Hip() argument
213 …CeedCallHip(ceed, hipModuleLaunchKernel(kernel, grid_size, 1, 1, block_size, 1, 1, 0, NULL, args, … in CeedRunKernel_Hip()
220 int CeedRunKernelDim_Hip(Ceed ceed, hipFunction_t kernel, const int grid_size, const int block_size… in CeedRunKernelDim_Hip() argument
222 …CeedCallHip(ceed, hipModuleLaunchKernel(kernel, grid_size, 1, 1, block_size_x, block_size_y, block… in CeedRunKernelDim_Hip()
229 static int CeedRunKernelDimSharedCore_Hip(Ceed ceed, hipFunction_t kernel, hipStream_t stream, cons… in CeedRunKernelDimSharedCore_Hip() argument
238 CeedCallHip(ceed, result); in CeedRunKernelDimSharedCore_Hip()
243 CeedDebug256(ceed, CEED_DEBUG_COLOR_ERROR, "---------- LAUNCH ERROR DETECTED ----------\n"); in CeedRunKernelDimSharedCore_Hip()
244 CeedDebug(ceed, "%s\n", message); in CeedRunKernelDimSharedCore_Hip()
245 CeedDebug256(ceed, CEED_DEBUG_COLOR_WARNING, "---------- BACKEND MAY FALLBACK ----------\n"); in CeedRunKernelDimSharedCore_Hip()
253 int CeedRunKernelDimShared_Hip(Ceed ceed, hipFunction_t kernel, hipStream_t stream, const int grid_… in CeedRunKernelDimShared_Hip() argument
257 …CeedCallBackend(CeedRunKernelDimSharedCore_Hip(ceed, kernel, stream, grid_size, block_size_x, bloc… in CeedRunKernelDimShared_Hip()
262 int CeedTryRunKernelDimShared_Hip(Ceed ceed, hipFunction_t kernel, hipStream_t stream, const int gr… in CeedTryRunKernelDimShared_Hip() argument
264 …CeedCallBackend(CeedRunKernelDimSharedCore_Hip(ceed, kernel, stream, grid_size, block_size_x, bloc… in CeedTryRunKernelDimShared_Hip()