Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aten/src/ATen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -644,15 +644,15 @@ if(USE_ROCM)
${native_sparse_hip_cpp}
${native_quantized_hip_cpp}
${native_transformers_hip_cpp}
${native_quantized_cudnn_hip_cpp}
${native_quantized_cudnn_cpp}
Comment thread
zjgarvey marked this conversation as resolved.
${hip_cpp}
${native_hip_cpp}
${native_hip_linalg_cpp}
${cuda_generated_sources}
${ATen_HIP_SRCS}
${native_miopen_cpp}
${native_hipdnn_cpp}
${native_cudnn_hip_cpp}
${native_cudnn_cpp}
${miopen_cpp}
${all_hip_cpp}
)
Expand Down
4 changes: 0 additions & 4 deletions aten/src/ATen/native/cudnn/BatchNorm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
#include <ATen/core/Tensor.h>
#include <ATen/cuda/CUDAConfig.h>

#ifdef __HIP_PLATFORM_AMD__
#include <ATen/native/cudnn/hip/BatchNorm.h>
#else
#include <ATen/native/cudnn/BatchNorm.h>
#endif

#if !AT_CUDNN_ENABLED()

Expand Down
1 change: 0 additions & 1 deletion aten/src/ATen/native/cudnn/LossCTC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#include <ATen/Config.h>
#include <ATen/core/Tensor.h>
#include <ATen/cuda/CUDAConfig.h>
#include <ATen/cuda/CUDAGraphsUtils.cuh>
#if AT_CUDNN_ENABLED()
#include <ATen/cudnn/Descriptors.h>
#endif
Expand Down
6 changes: 3 additions & 3 deletions aten/src/ATen/native/cudnn/RNN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
#include <ATen/TensorUtils.h>
#include <ATen/core/Tensor.h>
#include <ATen/cuda/CUDAConfig.h>
#include <ATen/cuda/CUDAEvent.h>
#include <ATen/cuda/Exceptions.h>
#include <ATen/native/RNN.h>
#include <c10/util/Exception.h>
#include <c10/util/accumulate.h>
#include <c10/util/irange.h>
#include <torch/library.h>
#include <ATen/cuda/CUDAGraphsUtils.cuh>

#ifndef AT_PER_OPERATOR_HEADERS
#include <ATen/Functions.h>
Expand Down Expand Up @@ -113,6 +110,9 @@ Tensor _cudnn_init_dropout_state(

#else // AT_CUDNN_ENABLED()

#include <ATen/cuda/CUDAEvent.h>
Comment thread
zjgarvey marked this conversation as resolved.
#include <ATen/cuda/CUDAGraphsUtils.cuh>
#include <ATen/cuda/Exceptions.h>
#include <ATen/native/cudnn/RNNUtils.h>

namespace at::native {
Expand Down
2 changes: 0 additions & 2 deletions aten/src/ATen/native/quantized/cudnn/BinaryOps.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#ifdef USE_CUDA
#include <ATen/cuda/CUDAConfig.h> // for the definition of AT_CUDNN_ENABLED

#if AT_CUDNN_ENABLED()
Expand Down Expand Up @@ -257,4 +256,3 @@ TORCH_LIBRARY_IMPL(quantized, QuantizedCUDA, m) {
} // namespace at::native

#endif // AT_CUDNN_ENABLED
#endif // USE_CUDA
2 changes: 0 additions & 2 deletions aten/src/ATen/native/quantized/cudnn/Conv.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#ifdef USE_CUDA
#include <ATen/cuda/CUDAConfig.h> // for the definition of AT_CUDNN_ENABLED

#if AT_CUDNN_ENABLED()
Expand Down Expand Up @@ -402,4 +401,3 @@ TORCH_LIBRARY_IMPL(quantized, QuantizedCUDA, m) {


#endif // AT_CUDNN_ENABLED
#endif // USE_CUDA
2 changes: 0 additions & 2 deletions aten/src/ATen/native/quantized/cudnn/ConvPrepack.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#ifdef USE_CUDA
#include <ATen/cuda/CUDAConfig.h> // for the definition of AT_CUDNN_ENABLED

#if AT_CUDNN_ENABLED()
Expand Down Expand Up @@ -208,4 +207,3 @@ TORCH_LIBRARY_IMPL(quantized, QuantizedCUDA, m) {
} // namespace at::native

#endif // AT_CUDNN_ENABLED
#endif // USE_CUDA
2 changes: 0 additions & 2 deletions aten/src/ATen/native/quantized/cudnn/ConvUnpackImpl.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#ifdef USE_CUDA
#include <ATen/cuda/CUDAConfig.h> // for the definition of AT_CUDNN_ENABLED

#if AT_CUDNN_ENABLED()
Expand All @@ -20,4 +19,3 @@ template std::tuple<at::Tensor, std::optional<at::Tensor>> PackedConvWeightCudnn
2>::unpack();

#endif // AT_CUDNN_ENABLED
#endif // USE_CUDA
2 changes: 0 additions & 2 deletions aten/src/ATen/native/quantized/cudnn/Linear.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#ifdef USE_CUDA
#include <ATen/cuda/CUDAConfig.h> // for the definition of AT_CUDNN_ENABLED

#if AT_CUDNN_ENABLED()
Expand Down Expand Up @@ -367,4 +366,3 @@ TORCH_LIBRARY_IMPL(quantized, QuantizedCUDA, m) {


#endif // AT_CUDNN_ENABLED
#endif // USE_CUDA
2 changes: 0 additions & 2 deletions aten/src/ATen/native/quantized/cudnn/LinearPrepack.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#ifdef USE_CUDA
#include <ATen/cuda/CUDAConfig.h> // for the definition of AT_CUDNN_ENABLED

#if AT_CUDNN_ENABLED()
Expand Down Expand Up @@ -56,4 +55,3 @@ TORCH_LIBRARY_IMPL(quantized, QuantizedCUDA, m) {


#endif // AT_CUDNN_ENABLED
#endif // USE_CUDA
2 changes: 0 additions & 2 deletions aten/src/ATen/native/quantized/cudnn/LinearUnpackImpl.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#ifdef USE_CUDA
#include <ATen/cuda/CUDAConfig.h> // for the definition of AT_CUDNN_ENABLED

#if AT_CUDNN_ENABLED()
Expand All @@ -15,4 +14,3 @@ std::tuple<at::Tensor, std::optional<at::Tensor>> PackedLinearWeightCudnn::unpac
}

#endif // AT_CUDNN_ENABLED
#endif // USE_CUDA
2 changes: 0 additions & 2 deletions aten/src/ATen/native/quantized/cudnn/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
This file contains some of the auxiliary functions used by both Conv.cpp & Linear.cpp (introduced in a later PR)
*/

#ifdef USE_CUDA
#include <ATen/cuda/CUDAConfig.h> // for the definition of AT_CUDNN_ENABLED

#if AT_CUDNN_ENABLED()
Expand Down Expand Up @@ -312,4 +311,3 @@ inline void filterEngineConfigs(
} // cudnn_utils

#endif // AT_CUDNN_ENABLED
#endif // USE_CUDA
4 changes: 0 additions & 4 deletions aten/src/ATen/native/transformers/cuda/attention.cu
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,7 @@
#include <ATen/ops/zeros.h>
#endif

#ifdef __HIP_PLATFORM_AMD__
#include <ATen/native/cudnn/hip/MHA.h>
#else
#include <ATen/native/cudnn/MHA.h>
#endif

#include <c10/cuda/CUDAMathCompat.h>

Expand Down
4 changes: 0 additions & 4 deletions aten/src/ATen/native/transformers/cuda/attention_backward.cu
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@
#endif
#endif

#ifdef __HIP_PLATFORM_AMD__
#include <ATen/native/cudnn/hip/MHA.h>
#else
#include <ATen/native/cudnn/MHA.h>
#endif

namespace at::native {

Expand Down
2 changes: 0 additions & 2 deletions tools/amd_build/build_amd.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@
# Keep this synchronized with is_pytorch_file in hipify_python.py
"aten/src/ATen/cuda/*",
"aten/src/ATen/native/cuda/*",
"aten/src/ATen/native/cudnn/*",
"aten/src/ATen/native/quantized/cudnn/*",
"aten/src/ATen/native/nested/cuda/*",
"aten/src/ATen/native/sparse/cuda/*",
"aten/src/ATen/native/quantized/cuda/*",
Expand Down
4 changes: 0 additions & 4 deletions torch/csrc/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,8 @@
#include <ATen/cuda/CUDAConfig.h>
#include <ATen/native/transformers/cuda/sdp_utils.h>
#include <torch/csrc/inductor/static_launcher/cuda.h>
#ifdef __HIP_PLATFORM_AMD__
#include <ATen/native/cudnn/hip/BatchNorm.h>
#else
#include <ATen/native/cudnn/BatchNorm.h>
#endif
#endif

#ifdef USE_XPU
#include <ATen/native/transformers/xpu/sdp_utils.h>
Expand Down