diff options
author | Junjie Bai <bai@in.tum.de> | 2018-11-16 11:50:29 -0800 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2018-11-16 11:55:59 -0800 |
commit | 0d7a986da1cd1d9de886fb687de728eebf54200f (patch) | |
tree | 1c24ecb907c3fe28a49d9c768fbb48df147f259c /caffe2/sgd/CMakeLists.txt | |
parent | 30018fcd0b62af6fd9d750ee9fffd940dbd80de6 (diff) | |
download | pytorch-0d7a986da1cd1d9de886fb687de728eebf54200f.tar.gz pytorch-0d7a986da1cd1d9de886fb687de728eebf54200f.tar.bz2 pytorch-0d7a986da1cd1d9de886fb687de728eebf54200f.zip |
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
Diffstat (limited to 'caffe2/sgd/CMakeLists.txt')
-rw-r--r-- | caffe2/sgd/CMakeLists.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/caffe2/sgd/CMakeLists.txt b/caffe2/sgd/CMakeLists.txt index 55d0a91248..7604e315a0 100644 --- a/caffe2/sgd/CMakeLists.txt +++ b/caffe2/sgd/CMakeLists.txt @@ -9,12 +9,14 @@ set(Caffe2_GPU_SRCS ${Caffe2_GPU_SRCS} ${tmp}) file(GLOB tmp *_test.cc) exclude(Caffe2_GPU_SRCS "${Caffe2_GPU_SRCS}" ${tmp}) +# ------[ general HIP +file(GLOB tmp hip/*.cc) +set(Caffe2_HIP_SRCS ${Caffe2_HIP_SRCS} ${tmp}) # ---[ HIP files -# ------[ general GPU -file(GLOB_RECURSE tmp *_hip.cc) +file(GLOB tmp hip/*.hip) set(Caffe2_HIP_SRCS ${Caffe2_HIP_SRCS} ${tmp}) # exclude test files -file(GLOB_RECURSE tmp *_test.cc) +file(GLOB tmp hip/*_test.cc) exclude(Caffe2_HIP_SRCS "${Caffe2_HIP_SRCS}" ${tmp}) # ---[ CPU files. @@ -31,7 +33,7 @@ file(GLOB tmp *_gpu_test.cc) set(Caffe2_GPU_TEST_SRCS ${Caffe2_GPU_TEST_SRCS} ${tmp}) # ---[ HIP test files -file(GLOB_RECURSE tmp *_hip_test.cc) +file(GLOB tmp hip/*_test.cc) set(Caffe2_HIP_TEST_SRCS ${Caffe2_HIP_TEST_SRCS} ${tmp}) # ---[ CPU test files |