Skip to content

Commit d247c50

Browse files
committed
Fix bad rebase: remove unusued get_max_block_size function from CUDA backend.
1 parent a6a9f69 commit d247c50

File tree

1 file changed

+0
-45
lines changed
  • thrust/system/cuda/detail/core

1 file changed

+0
-45
lines changed

thrust/system/cuda/detail/core/util.h

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -491,51 +491,6 @@ namespace core {
491491
return 0;
492492
}
493493

494-
template <class Kernel>
495-
int CUB_RUNTIME_FUNCTION
496-
get_max_block_size(Kernel k)
497-
{
498-
int devId;
499-
cuda_cub::throw_on_error(cudaGetDevice(&devId),
500-
"get_max_block_size :"
501-
"failed to cudaGetDevice");
502-
503-
cudaOccDeviceProp occ_prop;
504-
cuda_cub::throw_on_error(get_occ_device_properties(occ_prop, devId),
505-
"get_max_block_size: "
506-
"failed to cudaGetDeviceProperties");
507-
508-
509-
cudaFuncAttributes attribs;
510-
cuda_cub::throw_on_error(cudaFuncGetAttributes(&attribs, reinterpret_cast<void *>(k)),
511-
"get_max_block_size: "
512-
"failed to cudaFuncGetAttributes");
513-
cudaOccFuncAttributes occ_attrib(attribs);
514-
515-
516-
cudaFuncCache cacheConfig;
517-
cuda_cub::throw_on_error(cudaDeviceGetCacheConfig(&cacheConfig),
518-
"get_max_block_size: "
519-
"failed to cudaDeviceGetCacheConfig");
520-
521-
cudaOccDeviceState occ_state;
522-
occ_state.cacheConfig = (cudaOccCacheConfig)cacheConfig;
523-
int block_size = 0;
524-
int min_grid_size = 0;
525-
cudaOccError occ_status = cudaOccMaxPotentialOccupancyBlockSize(&min_grid_size,
526-
&block_size,
527-
&occ_prop,
528-
&occ_attrib,
529-
&occ_state,
530-
0);
531-
if (CUDA_OCC_SUCCESS != occ_status || block_size <= 0)
532-
cuda_cub::throw_on_error(cudaErrorInvalidConfiguration,
533-
"get_max_block_size: "
534-
"failed to cudaOccMaxPotentialOccupancyBlockSize");
535-
536-
return block_size;
537-
}
538-
539494
// LoadIterator
540495
// ------------
541496
// if trivial iterator is passed, wrap loads into LDG

0 commit comments

Comments
 (0)