Change hip filename extension to .hip (#14036)
authorJunjie Bai <bai@in.tum.de>
Fri, 16 Nov 2018 19:50:29 +0000 (11:50 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 16 Nov 2018 19:55:59 +0000 (11:55 -0800)
commit0d7a986da1cd1d9de886fb687de728eebf54200f
tree1c24ecb907c3fe28a49d9c768fbb48df147f259c
parent30018fcd0b62af6fd9d750ee9fffd940dbd80de6
Change hip filename extension to .hip (#14036)

Summary:
xw285cornell

- To make hip files to have unique filename extension we change hip files from _hip.cc to .hip (it's the only blessing option other than .cu in hipcc https://github.com/ROCm-Developer-Tools/HIP/blob/3d51a1fb0105e2f2312d2523c20e0034339f6ada/bin/hipcc#L552).
- Change to use host compiler to compile .cc|.cpp files. Previously we use hcc to compile them which is unnecessary
- Change the hipify script to not replace "gpu" with "hip" in the filename of the generated hipified files. Previously we do this because hcc has a bug when linking files that have same filename. We have now changed to use host linker to do linking so this is unnecessary anymore.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14036

Reviewed By: xw285cornell

Differential Revision: D13091813

Pulled By: bddppq

fbshipit-source-id: ea3d887751d8abb39d75f5d5104aa66ce66b9ee0
35 files changed:
binaries/CMakeLists.txt
caffe2/CMakeLists.txt
caffe2/core/CMakeLists.txt
caffe2/core/common_gpu.cc
caffe2/core/common_gpu.h
caffe2/core/hip/common_miopen.hip [moved from caffe2/core/hip/common_miopen.cc with 100% similarity]
caffe2/core/hip/miopen_wrapper.h
caffe2/db/CMakeLists.txt
caffe2/image/CMakeLists.txt
caffe2/operators/CMakeLists.txt
caffe2/operators/hip/activation_ops_miopen.h
caffe2/operators/hip/conv_op_miopen.hip [moved from caffe2/operators/hip/conv_op_miopen.cc with 99% similarity]
caffe2/operators/hip/conv_transpose_op_miopen.hip [moved from caffe2/operators/hip/conv_transpose_op_miopen.cc with 99% similarity]
caffe2/operators/hip/elu_op_miopen.hip [moved from caffe2/operators/hip/elu_op_miopen.cc with 100% similarity]
caffe2/operators/hip/local_response_normalization_op_miopen.hip [moved from caffe2/operators/hip/local_response_normalization_op_miopen.cc with 99% similarity]
caffe2/operators/hip/pool_op_miopen.hip [moved from caffe2/operators/hip/pool_op_miopen.cc with 99% similarity]
caffe2/operators/hip/relu_op_miopen.hip [moved from caffe2/operators/hip/relu_op_miopen.cc with 100% similarity]
caffe2/operators/hip/sigmoid_op_miopen.hip [moved from caffe2/operators/hip/sigmoid_op_miopen.cc with 100% similarity]
caffe2/operators/hip/spatial_batch_norm_op_miopen.hip [moved from caffe2/operators/hip/spatial_batch_norm_op_miopen.cc with 99% similarity]
caffe2/operators/hip/tanh_op_miopen.hip [moved from caffe2/operators/hip/tanh_op_miopen.cc with 100% similarity]
caffe2/operators/rnn/CMakeLists.txt
caffe2/operators/rnn/hip/recurrent_op_miopen.h
caffe2/operators/rnn/hip/recurrent_op_miopen.hip [moved from caffe2/operators/rnn/hip/recurrent_op_miopen.cc with 100% similarity]
caffe2/python/pybind_state_hip.cc
caffe2/queue/CMakeLists.txt
caffe2/sgd/CMakeLists.txt
caffe2/utils/CMakeLists.txt
caffe2/utils/conversions.h
caffe2/utils/hip/math_blas_gpu_test.cc [moved from caffe2/utils/hip/math_blas_hip_test.cc with 99% similarity]
caffe2/utils/math_gpu.cu
cmake/public/LoadHIP.cmake
cmake/public/utils.cmake
tools/amd_build/build_caffe2_amd.py
tools/amd_build/pyHIPIFY/cuda_to_hip_mappings.py
tools/amd_build/pyHIPIFY/hipify_python.py