From f9446e0c944e0d430b5be89e7968c23a8f5212e7 Mon Sep 17 00:00:00 2001 From: Edward Yang Date: Wed, 5 Dec 2018 20:50:41 -0800 Subject: [PATCH] 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 --- aten/src/ATen/native/DispatchStub.h | 5 ++++- tools/amd_build/build_amd.py | 7 ++++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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 @@ 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 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 @@ 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/*", ] -- 2.7.4