Build c10 HIP test
authorbddppq <bai@in.tum.de>
Fri, 14 Dec 2018 23:34:38 +0000 (15:34 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 14 Dec 2018 23:36:38 +0000 (15:36 -0800)
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
tools/amd_build/build_amd.py
tools/amd_build/pyHIPIFY/cuda_to_hip_mappings.py

index d1b0af9..328d214 100644 (file)
@@ -52,6 +52,8 @@ target_include_directories(
     $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
     $<INSTALL_INTERFACE:include>)
 
+add_subdirectory(test)
+
 # ---[ Installation
 install(TARGETS c10_hip EXPORT Caffe2Targets DESTINATION lib)
 install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
index f5d1351..2addaee 100644 (file)
@@ -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/*",
index 87931f1..72db033 100644 (file)
@@ -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)),