Reland b24ec52288895c79247e7352b351e2be368da73a that is temporarily reverted in https://github.com/intel/intel-xpu-backend-for-triton/pull/3316 by f66eab17114080e86bc9cf07c02aaa9c1b1e7d5a.