SWDEV-240806 - Initial commit for hipGraph and stream capture infrastructure

On StreamBegincapture captures the parameters passed to APIs and respective node will be created and added to graph
All parameters are passed to STREAM_CAPTURE macro, it checks if stream in capture mode and redirects the call to the capture function and returns
Updated hipStream and hipEvent with capture parameters
Added handling for hipStreamBeginCapture & hipStreamEndCapture

Change-Id: Ic8926a7b4336c2cc81f0b3a9a224aa392c474134


[ROCm/clr commit: 8cc0e04239]
This commit is contained in:
Anusha Godavarthy Surya
2021-03-02 16:23:47 -05:00
committed by Christophe Paquot
szülő abc42e8c5c
commit 1fe1fe9361
17 fájl változott, egészen pontosan 1836 új sor hozzáadva és 15 régi sor törölve
@@ -209,7 +209,7 @@ hipError_t hipFuncSetSharedMemConfig ( const void* func, hipSharedMemConfig conf
HIP_RETURN(hipSuccess);
}
inline hipError_t ihipLaunchKernel_validate(hipFunction_t f, uint32_t globalWorkSizeX,
hipError_t ihipLaunchKernel_validate(hipFunction_t f, uint32_t globalWorkSizeX,
uint32_t globalWorkSizeY, uint32_t globalWorkSizeZ,
uint32_t blockDimX, uint32_t blockDimY,
uint32_t blockDimZ, uint32_t sharedMemBytes,
@@ -484,7 +484,9 @@ extern "C" hipError_t hipLaunchKernel(const void *hostFunction,
hipStream_t stream)
{
HIP_INIT_API(hipLaunchKernel, hostFunction, gridDim, blockDim, args, sharedMemBytes, stream);
HIP_RETURN(ihipLaunchKernel(hostFunction, gridDim, blockDim, args, sharedMemBytes, stream, nullptr, nullptr, 0));
STREAM_CAPTURE(hipLaunchKernel, stream, hostFunction, gridDim, blockDim, args, sharedMemBytes);
HIP_RETURN(ihipLaunchKernel(hostFunction, gridDim, blockDim, args, sharedMemBytes, stream,
nullptr, nullptr, 0));
}
extern "C" hipError_t hipExtLaunchKernel(const void* hostFunction,