Add initial hipProfileStart/Stop

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

Change-Id: I2579824d2dd7863ea23874d34f0dabb3cb305d3e
This commit is contained in:
Ben Sander committed 2016-10-27 23:09:32 -05:00
1 parent 32b086400e
commit bb58f4f6fc
5 files changed
+89 -5

No files matched your search

+15 -2
Vedi File
@@ -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