Implement __hipPushCallConfiguration/__hipPopCallConfiguration for hip_clang (#1845)

This is needed so that the right symbols are present if we want to use hip-clang with hip/hcc runtime
Tá an tiomantas seo le fáil i:
saleelk údaraithe agus GitHub tiomanta 2020-02-04 19:37:57 +05:30
1 tuismitheoir 4d472b777f
tiomantas 499938d974
1 comhad athraithe
+38
+38
Féach ar an gComhad
@@ -189,6 +189,44 @@ hipError_t hipConfigureCall(
return hipSuccess;
}
extern "C" hipError_t __hipPushCallConfiguration(
dim3 gridDim,
dim3 blockDim,
size_t sharedMem,
hipStream_t stream)
{
GET_TLS();
auto ctx = ihipGetTlsDefaultCtx();
LockedAccessor_CtxCrit_t crit(ctx->criticalData());
crit->_execStack.push(ihipExec_t{gridDim, blockDim, sharedMem, stream});
return hipSuccess;
}
extern "C" hipError_t __hipPopCallConfiguration(
dim3 *gridDim,
dim3 *blockDim,
size_t *sharedMem,
hipStream_t *stream)
{
GET_TLS();
auto ctx = ihipGetTlsDefaultCtx();
LockedAccessor_CtxCrit_t crit(ctx->criticalData());
ihipExec_t exec;
exec = std::move(crit->_execStack.top());
crit->_execStack.pop();
*gridDim = exec._gridDim;
*blockDim = exec._blockDim;
*sharedMem = exec._sharedMem;
*stream = exec._hStream;
return hipSuccess;
}
hipError_t hipSetupArgument(
const void *arg,
size_t size,