You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: c10/cuda/CUDAAllocatorConfig.h
+15-4Lines changed: 15 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
8000
3
3
#include<c10/core/AllocatorConfig.h>
4
4
#include<c10/cuda/CUDAException.h>
5
5
#include<c10/cuda/CUDAMacros.h>
6
+
#include<c10/util/Deprecated.h>
6
7
#include<c10/util/Exception.h>
7
8
#include<c10/util/env.h>
8
9
@@ -17,9 +18,13 @@ enum class Expandable_Segments_Handle_Type : int {
17
18
// Environment config parser
18
19
classC10_CUDA_API CUDAAllocatorConfig {
19
20
public:
21
+
C10_DEPRECATED_MESSAGE(
22
+
"c10::cuda::CUDACachingAllocator::CUDAAllocatorConfig::max_split_size() is deprecated. Please use c10::CachingAllocator::AcceleratorAllocatorConfig::max_split_size() instead.")
"c10::cuda::CUDACachingAllocator::CUDAAllocatorConfig::garbage_collection_threshold() is deprecated. Please use c10::CachingAllocator::AcceleratorAllocatorConfig::garbage_collection_threshold() instead.")
@@ -60,6 +65,8 @@ class C10_CUDA_API CUDAAllocatorConfig {
60
65
returninstance().m_pinned_num_register_threads;
61
66
}
62
67
68
+
C10_DEPRECATED_MESSAGE(
69
+
"c10::cuda::CUDACachingAllocator::CUDAAllocatorConfig::pinned_use_background_threads() is deprecated. Please use c10::CachingAllocator::AcceleratorAllocatorConfig::pinned_use_background_threads() instead.")
@@ -72,25 +79,29 @@ class C10_CUDA_API CUDAAllocatorConfig {
72
79
return128;
73
80
}
74
81
75
-
// This is used to round-up allocation size to nearest power of 2 divisions.
76
-
// More description below in function roundup_power2_next_division
77
-
// As an example, if we want 4 divisions between 2's power, this can be done
78
-
// using env variable: PYTORCH_CUDA_ALLOC_CONF=roundup_power2_divisions:4
82
+
C10_DEPRECATED_MESSAGE(
83
+
"c10::cuda::CUDACachingAllocator::CUDAAllocatorConfig::roundup_power2_divisions() is deprecated. Please use c10::CachingAllocator::AcceleratorAllocatorConfig::roundup_power2_divisions() instead.")
"c10::cuda::CUDACachingAllocator::CUDAAllocatorConfig::roundup_power2_divisions() is deprecated. Please use c10::CachingAllocator::AcceleratorAllocatorConfig::roundup_power2_divisions() instead.")
"c10::cuda::CUDACachingAllocator::CUDAAllocatorConfig::max_non_split_rounding_size() is deprecated. Please use c10::CachingAllocator::AcceleratorAllocatorConfig::max_non_split_rounding_size() instead.")
"c10::cuda::CUDACachingAllocator::CUDAAllocatorConfig::last_allocator_settings() is deprecated. Please use c10::CachingAllocator::AcceleratorAllocatorConfig::last_allocator_settings() instead.")
0 commit comments