Skip to content

Commit

Permalink
Fix C2 Ambiguous namespace
Browse files Browse the repository at this point in the history
Summary: cuda:: is a ambiguous namespace. Make it explicit c10::cuda

Differential Revision: D41469007

fbshipit-source-id: 7af0308ceb1eee37bc4fbd4d6f166206eb200afd
  • Loading branch information
xw285cornell authored and facebook-github-bot committed Nov 22, 2022
1 parent ce856ce commit 51915ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions caffe2/core/context_gpu.cu
Original file line number Diff line number Diff line change
Expand Up @@ -561,12 +561,12 @@ struct DefaultCUDAAllocator final : public at::Allocator {
// some models that are currently running with the thc
// allocator fit in memory. We will need to find some
// way of resolving this problem.
cuda::CUDAStreamGuard g(
c10::cuda::CUDAStreamGuard g(
Stream(
Stream::DEFAULT,
Device(kCUDA, CaffeCudaGetDevice())
));
ptr = cuda::CUDACachingAllocator::raw_alloc(nbytes);
ptr = c10::cuda::CUDACachingAllocator::raw_alloc(nbytes);
}
if (FLAGS_caffe2_gpu_memory_tracking) {
g_size_map[ptr] = nbytes;
Expand Down Expand Up @@ -625,7 +625,7 @@ struct DefaultCUDAAllocator final : public at::Allocator {
break;
}
case CudaMemoryPoolType::THC: {
cuda::CUDACachingAllocator::raw_delete(ptr);
c10::cuda::CUDACachingAllocator::raw_delete(ptr);
if (FLAGS_caffe2_gpu_memory_tracking) {
g_cuda_device_affiliation.erase(g_cuda_device_affiliation.find(ptr));
}
Expand Down

0 comments on commit 51915ce

Please sign in to comment.