[NEON] Remove implicit type promotion in `Vectorized<c10::Half>::operator!=` (#123864)
To make code compilable with `gcc`, which `clang` does not allow transparent type promotion between vectorized NEON types of the same sizes, see https://godbolt.org/z/xoasoGM81 as an example
Pull Request resolved: https://github.com/pytorch/pytorch/pull/123864
Approved by: https://github.com/malfet
diff --git a/aten/src/ATen/cpu/vec/vec256/vec256_half_neon.h b/aten/src/ATen/cpu/vec/vec256/vec256_half_neon.h
index bb8716e..aaf1d599 100644
--- a/aten/src/ATen/cpu/vec/vec256/vec256_half_neon.h
+++ b/aten/src/ATen/cpu/vec/vec256/vec256_half_neon.h
@@ -565,9 +565,9 @@
}
Vectorized<c10::Half> operator!=(const Vectorized<c10::Half>& other) const {
- float32x4_t r0 = vreinterpretq_f16_u16(
+ float16x8_t r0 = vreinterpretq_f16_u16(
vmvnq_u16(vceqq_f16(values.val[0], other.values.val[0])));
- float32x4_t r1 = vreinterpretq_f16_u16(
+ float16x8_t r1 = vreinterpretq_f16_u16(
vmvnq_u16(vceqq_f16(values.val[1], other.values.val[1])));
return Vectorized<c10::Half>(r0, r1);
}