Tracing works with ptx backend.

When HL_TRACE > 0 injects cuCtxSynchronize calls