From 34f1f2208be5cd31f515d795142f2caef6860c34 Mon Sep 17 00:00:00 2001 From: bddppq Date: Fri, 14 Dec 2018 15:34:38 -0800 Subject: [PATCH] Build c10 HIP test Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15233 Reviewed By: ezyang Differential Revision: D13471002 Pulled By: bddppq fbshipit-source-id: b42c3bc2b9db672ce50a52eb700cc6ed13d3535f --- c10/hip/CMakeLists.txt | 2 ++ tools/amd_build/build_amd.py | 1 + tools/amd_build/pyHIPIFY/cuda_to_hip_mappings.py | 1 + 3 files changed, 4 insertions(+) diff --git a/c10/hip/CMakeLists.txt b/c10/hip/CMakeLists.txt index d1b0af9..328d214 100644 --- a/c10/hip/CMakeLists.txt +++ b/c10/hip/CMakeLists.txt @@ -52,6 +52,8 @@ target_include_directories( $ $) +add_subdirectory(test) + # ---[ Installation install(TARGETS c10_hip EXPORT Caffe2Targets DESTINATION lib) install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR} diff --git a/tools/amd_build/build_amd.py b/tools/amd_build/build_amd.py index f5d1351..2addaee 100644 --- a/tools/amd_build/build_amd.py +++ b/tools/amd_build/build_amd.py @@ -37,6 +37,7 @@ includes = [ "caffe2/db/*", "caffe2/utils/*", "c10/cuda/*", + "c10/cuda/test/CMakeLists.txt", # PyTorch paths # Keep this synchronized with is_pytorch_file in hipify_python.py "aten/src/ATen/cuda/*", diff --git a/tools/amd_build/pyHIPIFY/cuda_to_hip_mappings.py b/tools/amd_build/pyHIPIFY/cuda_to_hip_mappings.py index 87931f1..72db033 100644 --- a/tools/amd_build/pyHIPIFY/cuda_to_hip_mappings.py +++ b/tools/amd_build/pyHIPIFY/cuda_to_hip_mappings.py @@ -2270,6 +2270,7 @@ CAFFE2_SPECIFIC_MAPPINGS = collections.OrderedDict([ ("CUDA" ,("HIP", API_CAFFE2)), ("Cuda" ,("Hip", API_CAFFE2)), ("cuda_" ,("hip_", API_CAFFE2)), + ("_cuda" ,("_hip", API_CAFFE2)), ("CUDNN" ,("MIOPEN", API_CAFFE2)), ("CuDNN" ,("MIOPEN", API_CAFFE2)), ("cudnn" ,("miopen", API_CAFFE2)), -- 2.7.4