Repository: pytorch
Issue: Install PyTorch from source on power machine
Labels: module: build,triaged,module: POWER

### 🐛 Describe the bug

Following the instructions I'm trying to install / build pytorch 1.7.1 from source on Linux (ppc64le) GPU
I downloaded the source 
I'm working with conda environment based on Python version 3.7.11
Run the required commands and during the run of setup process below , got an error 
```python setup.py install```

The error is :
```make[2]: Leaving directory '/user/kisin/pytorch_py37/pytorch_1.12/pytorch/third_party/nccl/nccl/src/collectives/device'
Linking    libnccl.so.2.7.8                    > /user/kisin/pytorch_py37/pytorch_1.12/pytorch/build/nccl/lib/libnccl.so.2.7.8
Archiving  libnccl_static.a                    > /user/kisin/pytorch_py37/pytorch_1.12/pytorch/build/nccl/lib/libnccl_static.a
/user/kisin/pytorch_py37/pytorch_1.12/pytorch/third_party/nccl/nccl/src
make[1]: Leaving directory '/user/kisin/pytorch_py37/pytorch_1.12/pytorch/third_party/nccl/nccl/src'
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "setup.py", line 760, in <module>
    build_deps()
  File "setup.py", line 315, in build_deps
    cmake=cmake)
  File "/user/kisin/pytorch_py37/pytorch_1.12/pytorch/tools/build_pytorch_libs.py", line 62, in build_caffe2
    cmake.build(my_env)
  File "/user/kisin/pytorch_py37/pytorch_1.12/pytorch/tools/setup_helpers/cmake.py", line 345, in build
    self.run(build_args, my_env)
  File "/user/kisin/pytorch_py37/pytorch_1.12/pytorch/tools/setup_helpers/cmake.py", line 141, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/projects/DLenvs/powerAI/envs/py3.7_pytorch1.7/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '128']' returned non-zero exit status 1.
```

### Versions

```Collecting environment information...
PyTorch version: N/A
Is debug build: N/A
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: N/A

OS: NAME="Red Hat Enterprise Linux Server" (ppc64le)
GCC version: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.17

Python version: 3.7.11 (default, Jul 27 2021, 15:02:35)  [GCC 7.3.0] (64-bit runtime)
Python platform: Linux-4.14.0-115.36.1.el7a.ppc64le-ppc64le-with-redhat-7.9-Maipo
Is CUDA available: N/A
CUDA runtime version: 10.2.89
GPU models and configuration: 
GPU 0: Tesla V100-SXM2-16GB
GPU 1: Tesla V100-SXM2-16GB
GPU 2: Tesla V100-SXM2-16GB
GPU 3: Tesla V100-SXM2-16GB

Nvidia driver version: 440.118.02
cuDNN version: Probably one of the following:
/usr/lib64/libcudnn.so.8.0.5
/usr/lib64/libcudnn_adv_infer.so.8.0.5
/usr/lib64/libcudnn_adv_train.so.8.0.5
/usr/lib64/libcudnn_cnn_infer.so.8.0.5
/usr/lib64/libcudnn_cnn_train.so.8.0.5
/usr/lib64/libcudnn_ops_infer.so.8.0.5
/usr/lib64/libcudnn_ops_train.so.8.0.5
/usr/local/cuda-9.0/targets/ppc64le-linux/lib/libcudnn.so.7.3.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: N/A

Versions of relevant libraries:
[pip3] numpy==1.17.4
[conda] cudatoolkit               10.2.89            684.g752c550    https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda
[conda] cudatoolkit-dev           10.2.89            684.g752c550    https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda
[conda] magma                     2.5.2             1650.g8b3cab9    https://public.dhe.ibm.com/ibmdl/export/pub/software/server/ibm-ai/conda
[conda] nomkl                     3.0                           0  
[conda] numpy                     1.17.4           py37hd5be1e1_0  
[conda] numpy-base                1.17.4           py37h2f8d375_0
```


cc @malfet @seemethere