Reduce performance impact of compiler.enable decorator (#7498)
For some accelerators (such as HPU) running in a non-compile scenarios,
the `compiler.enable` decorator can cause significant performance drops
up to 8-12%.
We can easily avoid the performance hit in non-compile scenarios, by
detecting the ongoing compilation and returning immediately.
Signed-off-by: Max Kovalenko <mkovalenko@habana.ai>
Co-authored-by: Olatunji Ruwase <tunji.ruwase@snowflake.com>