HIPify less files in PyTorch (#14804)
Summary:
Stacked on #14803
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14804
Differential Revision: D13347986
Pulled By: ezyang
fbshipit-source-id: c93177b4ad51855660d0de36d042bfc542bd4be0
diff --git a/aten/src/ATen/native/DispatchStub.h b/aten/src/ATen/native/DispatchStub.h
index 5b296d0..89011fa 100644
--- a/aten/src/ATen/native/DispatchStub.h
+++ b/aten/src/ATen/native/DispatchStub.h
@@ -166,7 +166,10 @@
#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
diff --git a/tools/amd_build/build_amd.py b/tools/amd_build/build_amd.py
index d109e6a..05cfa67 100644
--- a/tools/amd_build/build_amd.py
+++ b/tools/amd_build/build_amd.py
@@ -35,7 +35,12 @@
"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/*",
]