CHIP-SPV / chipStar

chipStar is a tool for compiling and running HIP/CUDA on SPIR-V via OpenCL or Level Zero APIs.
Other
166 stars 27 forks source link

OpenCL: Use non-profiling queue, switch to profiling when needed #814

Closed linehill closed 2 months ago

linehill commented 3 months ago

Enabling queue profiling by default slow down kernel enqueue API calls according to vtune, at least, on Intel OpenCL targeting Intel ARC A750. Disabling the profiling improved some HeCBench cases on the device:

This patch creates queues with and without profiling and the non-profiling one is used at start. The BE switches to use the profiling queue when needed. Note, there is only transition from non-profiling queue to profiling one but not back.

Also, add environment variable for forcing queue profiling to be disabled.