[GPUJIT] Call `cuProfilerStop` before destroying the context to flush profiler cache.
commit606cc3257d062f4e5091e41e3249de21599663d1
authorSiddharth Bhat <siddu.druid@gmail.com>
Tue, 1 Aug 2017 14:36:24 +0000 (1 14:36 +0000)
committerSiddharth Bhat <siddu.druid@gmail.com>
Tue, 1 Aug 2017 14:36:24 +0000 (1 14:36 +0000)
treeb761a7ac9dbe2ec6e72230be387b3bd260fc1965
parent2cbb22bce6100be71f5671d0d04ab06315f236a1
[GPUJIT] Call `cuProfilerStop` before destroying the context to flush profiler cache.

This is necessary to get accurate traces from `nvprof` / `nvcc`.
Otherwise, we lose some profiling information.

Differential Revision: https://reviews.llvm.org/D35940

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@309682 91177308-0d34-0410-b5e6-96231b3b80d8
tools/GPURuntime/GPUJIT.c