diff --git a/api/hip/hip_module.cpp b/api/hip/hip_module.cpp index 0feefad7a3..435fe53af8 100644 --- a/api/hip/hip_module.cpp +++ b/api/hip/hip_module.cpp @@ -190,8 +190,8 @@ hipError_t hipModuleLaunchKernel(hipFunction_t f, return hipErrorOutOfMemory; } - // Make sure we have memory for the command execution - if (CL_SUCCESS != command->validateMemory()) { + // Capture the kernel arguments + if (CL_SUCCESS != command->captureAndValidate()) { delete command; return hipErrorMemoryAllocation; }