HIPify less files in PyTorch (#14804)
authorEdward Yang <ezyang@fb.com>
Thu, 6 Dec 2018 04:50:41 +0000 (20:50 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 6 Dec 2018 04:52:38 +0000 (20:52 -0800)
Summary:
Stacked on #14803
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14804

Differential Revision: D13347986

Pulled By: ezyang

fbshipit-source-id: c93177b4ad51855660d0de36d042bfc542bd4be0

aten/src/ATen/native/DispatchStub.h
tools/amd_build/build_amd.py

index 5b296d0..89011fa 100644 (file)
@@ -166,7 +166,10 @@ struct RegisterHIPDispatch {
 #if defined(__CUDACC__)
 #define REGISTER_DISPATCH(name, fn) REGISTER_CUDA_DISPATCH(name, fn)
 #elif defined(__HIPCC__)
-#define REGISTER_DISPATCH(name, fn) REGISTER_HIP_DISPATCH(name, fn)
+// TODO: cut this over to HIP dispatch once we stop pretending that CUDA
+// is HIP in the PyTorch HIPify build.
+#define REGISTER_DISPATCH(name, fn) REGISTER_CUDA_DISPATCH(name, fn)
+// #define REGISTER_DISPATCH(name, fn) REGISTER_HIP_DISPATCH(name, fn)
 #elif defined(CPU_CAPABILITY)
 #define REGISTER_DISPATCH(name, fn) REGISTER_ARCH_DISPATCH(name, CPU_CAPABILITY, fn)
 #endif
index d109e6a..05cfa67 100644 (file)
@@ -35,7 +35,12 @@ includes = [
     "c10/cuda/*",
     # PyTorch paths
     # Keep this synchronized with is_pytorch_file in hipify_python.py
-    "aten/*",
+    "aten/src/ATen/cuda/*",
+    "aten/src/ATen/native/cuda/*",
+    "aten/src/ATen/native/sparse/cuda/*",
+    "aten/src/THC/*",
+    "aten/src/THCUNN/*",
+    "aten/src/ATen/test/*",
     "torch/*",
 ]