Reland 977c6605260e24fadb7b13b88806677426d00f66 that is temporarily reverted in https://github.com/intel/intel-xpu-backend-for-triton/pull/5764 by 98b8e41c5a338c69a302c20a510277fdad5ccbbe.