Add ittnotify in ScopedProfiler.

This commit is contained in:
Ye Luo 2020-12-19 01:16:53 -06:00
parent 879c9c8e2f
commit 4277992596
1 changed files with 9 additions and 0 deletions

View File

@ -6,6 +6,9 @@
#include "CUDA/cudaError.h"
#include <cuda_profiler_api.h>
#endif
#ifdef USE_VTUNE_API
#include <ittnotify.h>
#endif
namespace qmcplusplus
{
@ -20,6 +23,9 @@ public:
{
#ifdef ENABLE_CUDA
cudaErrorCheck(cudaProfilerStart(), "cudaProfilerStart failed!");
#endif
#ifdef USE_VTUNE_API
__itt_resume();
#endif
}
}
@ -30,6 +36,9 @@ public:
{
#ifdef ENABLE_CUDA
cudaErrorCheck(cudaProfilerStop(), "cudaProfilerStop failed!");
#endif
#ifdef USE_VTUNE_API
__itt_pause();
#endif
}
}