PR #11345: [XLA:GPU] Relax row reduction vectorization restriction
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this [failed invocation](https://github.com/tensorflow/tensorflow/pull/66454/checks?check_run_id=24264266546) of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.
PR #11345: [XLA:GPU] Relax row reduction vectorization restriction

Imported from GitHub PR https://github.com/openxla/xla/pull/11345

Row reduction did not enable vectorization if num_threads_x <= WarpSize() previously due to half or more of the threads don't do anything. But for current tiling implementation, it is not right. Assume row reduction operand shape is [1024, 256] and num_threads_x is 32 (because of 32 * 16 > 256),  each thread can handle 8 scalar or 4 vec<T, 2>. 
It is better to judge whether (num_threads_x * vector_size) is larger than the reduced minor dimension.
Copybara import of the project:

--
4fe28d16b52728773a82b6cd31dd3314857ebd21 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

Relax row reduction vectorization restriction. Below hlo can improve
from 0.030ms to 0.026ms on A100 40GB:
HloModule reduce_sum

region_0.5 {
  Arg_1.7.0 = f32[] parameter(1)
  Arg_0.6.0 = f32[] parameter(0)
  ROOT add.4.0 = f32[] add(Arg_0.6.0, Arg_1.7.0)
}

ENTRY main.14 {
  Arg_0.1.0 = bf16[65536,256]{1,0} parameter(0)
  convert.8.1 = f32[65536,256]{1,0} convert(Arg_0.1.0)
  constant_3_1 = f32[] constant(0)
  ROOT reduce.9.1 = f32[65536]{0} reduce(convert.8.1, constant_3_1), dimensions={1}, to_apply=region_0.5
}

--
90e14e2cd2966ac093677536ce2452e4c073541c by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

analysis memory coalescing correctly for vectorization load

--
aa0a3fb62f8877b919ca906291a19440da9ff631 by Zhou, Lingzhi <lingzhi.zhou@intel.com>:

match symbol with range

Merging this change closes #11345

FUTURE_COPYBARA_INTEGRATE_REVIEW=https://github.com/openxla/xla/pull/11345 from lingzhi98:lingzhi/row_reduction_vectorization aa0a3fb62f8877b919ca906291a19440da9ff631
