5
5
#include < cuda.h>
6
6
#include < cuda/api_wrappers.h>
7
7
8
- #include < cub/util_allocator.cuh>
9
-
10
8
#include " FWCore/MessageLogger/interface/MessageLogger.h"
11
9
#include " FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
12
10
#include " FWCore/ParameterSet/interface/ParameterSet.h"
13
11
#include " FWCore/ParameterSet/interface/ParameterSetDescription.h"
14
12
#include " HeterogeneousCore/CUDAServices/interface/CUDAService.h"
15
13
#include " HeterogeneousCore/CUDAUtilities/interface/cudaCheck.h"
16
14
15
+ #include " CachingDeviceAllocator.h"
17
16
#include " CachingHostAllocator.h"
18
17
19
18
void setCudaLimit (cudaLimit limit, const char * name, size_t request) {
@@ -311,7 +310,7 @@ CUDAService::CUDAService(edm::ParameterSet const& config, edm::ActivityRegistry&
311
310
<< " max bin " << maxBin << " \n "
312
311
<< " resulting bins:\n " ;
313
312
for (auto bin = minBin; bin <= maxBin; ++bin) {
314
- auto binSize = cub ::CachingDeviceAllocator::IntPow (binGrowth, bin);
313
+ auto binSize = notcub ::CachingDeviceAllocator::IntPow (binGrowth, bin);
315
314
if (binSize >= (1 <<30 ) and binSize % (1 <<30 ) == 0 ) {
316
315
log << " " << std::setw (8 ) << (binSize >> 30 ) << " GB\n " ;
317
316
} else if (binSize >= (1 <<20 ) and binSize % (1 <<20 ) == 0 ) {
@@ -324,7 +323,7 @@ CUDAService::CUDAService(edm::ParameterSet const& config, edm::ActivityRegistry&
324
323
}
325
324
log << " maximum amount of cached memory: " << (minCachedBytes >> 20 ) << " MB\n " ;
326
325
327
- allocator_ = std::make_unique<Allocator>(cub ::CachingDeviceAllocator::IntPow (binGrowth, maxBin),
326
+ allocator_ = std::make_unique<Allocator>(notcub ::CachingDeviceAllocator::IntPow (binGrowth, maxBin),
328
327
binGrowth, minBin, maxBin, minCachedBytes,
329
328
false , // do not skip cleanup
330
329
debug
@@ -427,8 +426,8 @@ struct CUDAService::Allocator {
427
426
void hostPreallocate (int numberOfDevices, const std::vector<unsigned int >& bytes);
428
427
429
428
size_t maxAllocation;
430
- cub ::CachingDeviceAllocator deviceAllocator;
431
- cub ::CachingHostAllocator hostAllocator;
429
+ notcub ::CachingDeviceAllocator deviceAllocator;
430
+ notcub ::CachingHostAllocator hostAllocator;
432
431
};
433
432
434
433
void *CUDAService::allocate_device (int dev, size_t nbytes, cuda::stream_t <>& stream) {
0 commit comments