Add initial hipProfileStart/Stop

And modify sample to show how to use.
Still needs some work to understand interaction with CXL.

Change-Id: I2579824d2dd7863ea23874d34f0dabb3cb305d3e


[ROCm/hip commit: bb58f4f6fc]
This commit is contained in:
Ben Sander
2016-10-27 22:05:52 -05:00
parent 73d0a04f44
commit 2cfd770f1b
5 changed files with 89 additions and 5 deletions
@@ -1737,11 +1737,24 @@ hipError_t hipModuleLaunchKernel(hipFunction_t f,
*
* @warning The cudaProfilerInitialize API format for "configFile" is not supported.
*
* On AMD platforms, hipProfilerStart and hipProfilerStop require installation of AMD's GPU
* perf counter API and defining GPU_PERF
*/
// TODO - expand descriptions:
/**
* @brief Start recording of profiling information
* @warning : hipProfilerStart API is under development.
*/
hipError_t hipProfilerStart();
/**
* @brief Stop recording of profiling information.
* @warning : hipProfilerStop API is under development.
*/
hipError_t hipProfilerStop();
/**
* @}
*/
@@ -643,6 +643,18 @@ inline static hipError_t hipMemcpyPeerAsync ( void* dst, int dstDevice, const v
return hipCUDAErrorTohipError(cudaMemcpyPeerAsync(dst, dstDevice, src, srcDevice, count, stream));
}
// Profile APIs:
inline hipError_t hipProfilerStart()
{
return hipCUDAErrorTohipError(cudaProfileStart());
}
inline hipError_t hipProfilerStop()
{
return hipCUDAErrorTohipError(cudaProfileStop());
}
inline static hipError_t hipSetDeviceFlags (unsigned int flags)
{
return hipCUDAErrorTohipError(cudaSetDeviceFlags(flags));
@@ -802,6 +814,8 @@ inline static hipError_t hipModuleLaunchKernel(hipFunction_t f,
sharedMemBytes, stream, kernelParams, extra));
}
#ifdef __cplusplus
}
#endif