Support gqa on all attention backends, drop support for pytorch 2.4 (#14772)