SWDEV-325249 - hipGraphAddKernelNode incompatible with hipFunction_t

If params.func isn't a host function, assume it's a hipFunction_t.

Change-Id: I43361ec49a8dd579225f30e31722977ca9a82378


[ROCm/clr commit: 29851c0d34]
このコミットが含まれているのは:
Christophe Paquot authored and Christophe Paquot committed 2022-03-07 13:33:17 -05:00
1 親 bb53dfb244
コミット 318ff0000d
2ファイル変更
+18 -11

検索条件に一致するファイルはありません

+4 -5
ファイルの表示
@@ -45,9 +45,8 @@ hipError_t ihipValidateKernelParams(const hipKernelNodeParams* pNodeParams) {
return hipErrorInvalidValue;
}
hipFunction_t func = nullptr;
hipError_t status =
PlatformState::instance().getStatFunc(&func, pNodeParams->func, ihipGetDevice());
if ((status != hipSuccess) || (func == nullptr)) {
hipError_t status = hipGraphKernelNode::getFunc(&func, *pNodeParams, ihipGetDevice());
if (status != hipSuccess) {
return hipErrorInvalidDeviceFunction;
}
size_t globalWorkSizeX = static_cast<size_t>(pNodeParams->gridDim.x) * pNodeParams->blockDim.x;
@@ -85,8 +84,8 @@ hipError_t ihipGraphAddKernelNode(hipGraphNode_t* pGraphNode, hipGraph_t graph,
return status;
}
hipFunction_t func = nullptr;
status = PlatformState::instance().getStatFunc(&func, pNodeParams->func, ihipGetDevice());
if ((status != hipSuccess) || (func == nullptr)) {
status = hipGraphKernelNode::getFunc(&func, *pNodeParams, ihipGetDevice());
if (status != hipSuccess) {
return hipErrorInvalidDeviceFunction;
}
*pGraphNode = new hipGraphKernelNode(pNodeParams, func);