diff --git a/tensorflow/core/kernels/avgpooling_op.cc b/tensorflow/core/kernels/avgpooling_op.cc index 1cc5a2d8a3e..ba38e1a188f 100644 --- a/tensorflow/core/kernels/avgpooling_op.cc +++ b/tensorflow/core/kernels/avgpooling_op.cc @@ -36,10 +36,10 @@ limitations under the License. #include "tensorflow/core/util/padding.h" #include "tensorflow/core/util/tensor_format.h" -#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#if GOOGLE_CUDA #include "tensorflow/core/kernels/maxpooling_op_gpu.h" #include "tensorflow/core/kernels/pooling_ops_common_gpu.h" -#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#endif // GOOGLE_CUDA namespace tensorflow { @@ -112,7 +112,7 @@ REGISTER_KERNEL_BUILDER( Name("AvgPool").Device(DEVICE_CPU).TypeConstraint("T"), AvgPoolingOp); -#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#if GOOGLE_CUDA template class AvgPoolingOp : public UnaryOp { public: @@ -205,7 +205,7 @@ REGISTER_KERNEL_BUILDER( REGISTER_KERNEL_BUILDER( Name("AvgPool").Device(DEVICE_GPU).TypeConstraint("T"), AvgPoolingOp); -#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#endif // GOOGLE_CUDA // The operation to compute AvgPool gradients. // It takes two inputs: @@ -368,7 +368,7 @@ TF_CALL_float(REGISTER_CPU_KERNEL); TF_CALL_double(REGISTER_CPU_KERNEL); TF_CALL_half(REGISTER_CPU_KERNEL); -#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#if GOOGLE_CUDA // A CUDNN based AvgPoolingGrad implementation. It includes the padding as the // candidates for the pooling operation. @@ -577,6 +577,6 @@ REGISTER_KERNEL_BUILDER(Name("AvgPoolGrad") .HostMemory("orig_input_shape"), AvgPoolingGradOpCustomGPUKernel); -#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM +#endif // GOOGLE_CUDA } // namespace tensorflow diff --git a/tensorflow/stream_executor/gpu/gpu_driver.h b/tensorflow/stream_executor/gpu/gpu_driver.h index 07b35192f03..57a87fb5bd2 100644 --- a/tensorflow/stream_executor/gpu/gpu_driver.h +++ b/tensorflow/stream_executor/gpu/gpu_driver.h @@ -19,16 +19,13 @@ limitations under the License. #define TENSORFLOW_STREAM_EXECUTOR_GPU_GPU_DRIVER_H_ #include -#include "tensorflow/stream_executor/platform/port.h" -#include "third_party/gpus/cuda/include/cuda.h" #include "tensorflow/stream_executor/device_options.h" +#include "tensorflow/stream_executor/gpu/gpu_types.h" #include "tensorflow/stream_executor/lib/status.h" #include "tensorflow/stream_executor/lib/statusor.h" #include "tensorflow/stream_executor/platform/port.h" -#include "tensorflow/stream_executor/gpu/gpu_types.h" - namespace stream_executor { namespace gpu {