简体   繁体   中英

OpenCL profiling function in kernel

As far as I know, the kernel can be profiled by opencl profiling API. So I just get the kernel-level performance. But if the kernel call other function, how i get profiling of this callee.

static B {

}

kernel A {

B();

}

Profile the kernel with the function call and with the function call commented out. Subtract the execution time. However be careful that the compiler doesn't empty the kernel (disable compiler optimization) in case no result is written to global memory. Also be aware of time measurement error and uncertainty, if the function call takes way less time than the rest of the kernel execution; repeat and averagt the time measurements to get more accurate results.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM