Add initial hipProfileStart/Stop

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

Change-Id: I2579824d2dd7863ea23874d34f0dabb3cb305d3e
Šī revīzija ir iekļauta:
Ben Sander
2016-10-27 22:05:52 -05:00
vecāks 32b086400e
revīzija bb58f4f6fc
5 mainīti faili ar 89 papildinājumiem un 5 dzēšanām
+15 -2
Parādīt failu
@@ -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