Repository: pytorch
Issue: compilation error with PyTorch v1.11 for CPU on ppc64le
Labels: triaged,module: POWER

### 🐛 Describe the bug

I observed the following errors while building PyTorch v1.11 with USE_CUDA=0 on ppc64le:

```
<mydir>/work/aten/src/ATen/cpu/vec/vec256/vsx/vec256_qint8_vsx.h: In static member function ‘static at::vec::CPU_CAPABILITY::Vectorized<c10::qint8> at::vec::CPU_CAPABILITY::Vectorized<c10::qint8>::requantize_from_int(const int_vec_return_type&, float, int32_t)’:
<mydir>/work/aten/src/ATen/cpu/vec/vec256/vsx/vec256_qint8_vsx.h:293:13: warning: parameter ‘multiplier’ set but not used [-Wunused-but-set-parameter]
  293 |       float multiplier,
      |       ~~~~~~^~~~~~~~~~
In file included from <mydir>/work/aten/src/ATen/cpu/vec/vec256/vsx/vec256_common_vsx.h:15,
                 from <mydir>/work/aten/src/ATen/cpu/vec/vec256/vec256.h:19,
                 from <mydir>/work/aten/src/ATen/native/attention.cpp:8:
<mydir>/work/aten/src/ATen/cpu/vec/vec256/vsx/vec256_quint8_vsx.h: In static member function ‘static at::vec::CPU_CAPABILITY::Vectorized<c10::quint8> at::vec::CPU_CAPABILITY::Vectorized<c10::quint8>::quantize(const float_vec_return_type&, float, int32_t, float)’:
<mydir>/work/aten/src/ATen/cpu/vec/vec256/vsx/vec256_quint8_vsx.h:179:13: warning: parameter ‘inverse_scale’ set but not used [-Wunused-but-set-parameter]
  179 |       float inverse_scale) {
      |       ~~~~~~^~~~~~~~~~~~~
<mydir>/work/aten/src/ATen/cpu/vec/vec256/vsx/vec256_quint8_vsx.h: In static member function ‘static at::vec::CPU_CAPABILITY::Vectorized<c10::quint8> at::vec::CPU_CAPABILITY::Vectorized<c10::quint8>::requantize_from_int(const int_vec_return_type&, float, int32_t)’:
<mydir>/work/aten/src/ATen/cpu/vec/vec256/vsx/vec256_quint8_vsx.h:303:13: warning: parameter ‘multiplier’ set but not used [-Wunused-but-set-parameter]
  303 |       float multiplier,
      |       ~~~~~~^~~~~~~~~~
In file included from <mydir>/work/aten/src/ATen/ATen.h:13,
                 from <mydir>/work/aten/src/ATen/native/attention.cpp:3:
<mydir>/work/aten/src/ATen/native/attention.cpp: In lambda function:
<mydir>/work/aten/src/ATen/native/attention.cpp:145:46: error: use of deleted function ‘double& at::vec::CPU_CAPABILITY::Vectorized<double>::operator[](int)’
  145 |                   hmax = std::max(max_input[i], hmax);
      |                                              ^
<mydir>/work/aten/src/ATen/Dispatch.h:68:12: note: in definition of macro ‘AT_PRIVATE_CASE_TYPE_USING_HINT’
   68 |     return __VA_ARGS__();                                                        \
      |            ^~~~~~~~~~~
<mydir>/work/aten/src/ATen/Dispatch.h:317:7: note: in expansion of macro ‘AT_PRIVATE_CASE_TYPE’
  317 |       AT_PRIVATE_CASE_TYPE(NAME, at::ScalarType::Double, double, __VA_ARGS__)  \
      |       ^~~~~~~~~~~~~~~~~~~~
<mydir>/work/aten/src/ATen/native/attention.cpp:119:3: note: in expansion of macro ‘AT_DISPATCH_FLOATING_TYPES_AND2’
  119 |   AT_DISPATCH_FLOATING_TYPES_AND2(
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <mydir>/work/aten/src/ATen/cpu/vec/vec256/vsx/vec256_common_vsx.h:8,
                 from <mydir>/work/aten/src/ATen/cpu/vec/vec256/vec256.h:19,
                 from <mydir>/work/aten/src/ATen/native/attention.cpp:8:
<mydir>/work/aten/src/ATen/cpu/vec/vec256/vsx/vec256_double_vsx.h:190:11: note: declared here
  190 |   double& operator[](int idx) = delete;
      |           ^~~~~~~~
In file included from <mydir>/work/aten/src/ATen/ATen.h:13,
                 from <mydir>/work/aten/src/ATen/native/attention.cpp:3:
<mydir>/work/aten/src/ATen/native/attention.cpp:152:66: error: use of deleted function ‘double& at::vec::CPU_CAPABILITY::Vectorized<double>::operator[](int)’
  152 |                     hsum += std::exp(static_cast<accscalar_t>(v[i]) - hmax);
```

### Versions

PyTorch v1.11
OS: Red Hat Enterprise Linux 8.4 ppc64le
Python version: 3.9.5