summaryrefslogtreecommitdiff
path: root/torch/lib
diff options
context:
space:
mode:
authorEdward Yang <ezyang@fb.com>2018-12-12 11:19:03 -0800
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-12-12 11:24:26 -0800
commit2d485ffb17ebdec54b399df591e1da031e101d46 (patch)
treee9e9208777a42581b3e31fe5f1a22702fc9ff5f1 /torch/lib
parent9943cf2378a9919c576420a743ff96306512efe1 (diff)
downloadpytorch-2d485ffb17ebdec54b399df591e1da031e101d46.tar.gz
pytorch-2d485ffb17ebdec54b399df591e1da031e101d46.tar.bz2
pytorch-2d485ffb17ebdec54b399df591e1da031e101d46.zip
Move CUDAGuard, CUDAStream and CUDAGuardImpl to c10/cuda (#14248)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/14248 This diff also introduces a horrifying hack to override CUDA's DeviceGuardImpl with a HIPGuardImplMasqueradingAsCUDA, to accommodate PyTorch's current behavior of pretending CUDA is HIP when you build with ROCm enabled. Reviewed By: bddppq Differential Revision: D13145293 fbshipit-source-id: ee0e207b6fd132f0d435512957424a002d588f02
Diffstat (limited to 'torch/lib')
-rw-r--r--torch/lib/THD/base/data_channels/DataChannelNccl.cpp2
-rw-r--r--torch/lib/c10d/ProcessGroupGloo.cpp4
-rw-r--r--torch/lib/c10d/ProcessGroupGloo.hpp2
-rw-r--r--torch/lib/c10d/ProcessGroupNCCL.cpp2
-rw-r--r--torch/lib/c10d/test/CUDATest.hpp2
-rw-r--r--torch/lib/c10d/test/ProcessGroupGlooAsyncTest.cpp2
-rw-r--r--torch/lib/c10d/test/ProcessGroupNCCLTest.cpp4
7 files changed, 9 insertions, 9 deletions
diff --git a/torch/lib/THD/base/data_channels/DataChannelNccl.cpp b/torch/lib/THD/base/data_channels/DataChannelNccl.cpp
index 1c29b54076..e21d1b72ad 100644
--- a/torch/lib/THD/base/data_channels/DataChannelNccl.cpp
+++ b/torch/lib/THD/base/data_channels/DataChannelNccl.cpp
@@ -3,7 +3,7 @@
#include <THD/base/data_channels/DataChannelUtils.hpp>
#include <ATen/ATen.h>
-#include <ATen/cuda/CUDAGuard.h>
+#include <c10/cuda/CUDAGuard.h>
#include <THC/THC.h>
#include <cuda.h>
diff --git a/torch/lib/c10d/ProcessGroupGloo.cpp b/torch/lib/c10d/ProcessGroupGloo.cpp
index 2f1493d2b1..613b854082 100644
--- a/torch/lib/c10d/ProcessGroupGloo.cpp
+++ b/torch/lib/c10d/ProcessGroupGloo.cpp
@@ -10,8 +10,8 @@
#ifdef USE_CUDA
#include <ATen/cuda/CUDAEvent.h>
-#include <ATen/cuda/CUDAGuard.h>
-#include <ATen/cuda/CUDAStream.h>
+#include <c10/cuda/CUDAGuard.h>
+#include <c10/cuda/CUDAStream.h>
#include <ATen/cuda/Exceptions.h>
#include <ATen/cuda/PinnedMemoryAllocator.h>
#endif
diff --git a/torch/lib/c10d/ProcessGroupGloo.hpp b/torch/lib/c10d/ProcessGroupGloo.hpp
index edb59d2482..1c7ac653ad 100644
--- a/torch/lib/c10d/ProcessGroupGloo.hpp
+++ b/torch/lib/c10d/ProcessGroupGloo.hpp
@@ -17,7 +17,7 @@
#ifdef USE_CUDA
#include <ATen/cuda/CUDAEvent.h>
-#include <ATen/cuda/CUDAStream.h>
+#include <c10/cuda/CUDAStream.h>
#endif
#include <c10d/ProcessGroup.hpp>
diff --git a/torch/lib/c10d/ProcessGroupNCCL.cpp b/torch/lib/c10d/ProcessGroupNCCL.cpp
index 5242b0957f..b6c699b7f0 100644
--- a/torch/lib/c10d/ProcessGroupNCCL.cpp
+++ b/torch/lib/c10d/ProcessGroupNCCL.cpp
@@ -7,7 +7,7 @@
#include <THC/THC.h>
#include <ATen/cuda/CUDAContext.h>
-#include <ATen/cuda/CUDAGuard.h>
+#include <c10/cuda/CUDAGuard.h>
#include <c10d/Utils.hpp>
diff --git a/torch/lib/c10d/test/CUDATest.hpp b/torch/lib/c10d/test/CUDATest.hpp
index 5e02e317fb..defaff895a 100644
--- a/torch/lib/c10d/test/CUDATest.hpp
+++ b/torch/lib/c10d/test/CUDATest.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <ATen/cuda/CUDAStream.h>
+#include <c10/cuda/CUDAStream.h>
namespace c10d {
namespace test {
diff --git a/torch/lib/c10d/test/ProcessGroupGlooAsyncTest.cpp b/torch/lib/c10d/test/ProcessGroupGlooAsyncTest.cpp
index b66238b6b2..de1432e57e 100644
--- a/torch/lib/c10d/test/ProcessGroupGlooAsyncTest.cpp
+++ b/torch/lib/c10d/test/ProcessGroupGlooAsyncTest.cpp
@@ -1,6 +1,6 @@
#include <gloo/transport/tcp/device.h>
-#include <ATen/cuda/CUDAGuard.h>
+#include <c10/cuda/CUDAGuard.h>
#include <ATen/cuda/CUDAMultiStreamGuard.h>
#include <c10d/FileStore.hpp>
diff --git a/torch/lib/c10d/test/ProcessGroupNCCLTest.cpp b/torch/lib/c10d/test/ProcessGroupNCCLTest.cpp
index 78010531ad..f18c559d67 100644
--- a/torch/lib/c10d/test/ProcessGroupNCCLTest.cpp
+++ b/torch/lib/c10d/test/ProcessGroupNCCLTest.cpp
@@ -5,9 +5,9 @@
#include <c10d/test/CUDATest.hpp>
#include <c10d/test/TestUtils.hpp>
-#include <ATen/cuda/CUDAGuard.h>
+#include <c10/cuda/CUDAGuard.h>
#include <ATen/cuda/CUDAMultiStreamGuard.h>
-#include <ATen/cuda/CUDAStream.h>
+#include <c10/cuda/CUDAStream.h>
using namespace c10d::test;