diff --git a/dace/codegen/targets/cuda.py b/dace/codegen/targets/cuda.py index 6de2cc0769..125fcf2930 100644 --- a/dace/codegen/targets/cuda.py +++ b/dace/codegen/targets/cuda.py @@ -2139,8 +2139,8 @@ def get_kernel_dimensions(self, dfg_scope): # Check block size against configured maximum values, if those can be determined total_bsize = prod(block_size) - total_limit = Config.get('compiler', 'cuda', 'block_size_limit') - lastdim_limit = Config.get('compiler', 'cuda', 'block_size_lastdim_limit') + total_limit = int(Config.get('compiler', 'cuda', 'block_size_limit')) + lastdim_limit = int(Config.get('compiler', 'cuda', 'block_size_lastdim_limit')) if (total_bsize > total_limit) == True: raise ValueError(f'Block size for kernel "{kernelmap_entry.map.label}" ({block_size}) ' f'is larger than the possible number of threads per block ({total_limit}). ' diff --git a/dace/transformation/dataflow/add_threadblock_map.py b/dace/transformation/dataflow/add_threadblock_map.py index 9bc5a8a2a7..febdb12861 100644 --- a/dace/transformation/dataflow/add_threadblock_map.py +++ b/dace/transformation/dataflow/add_threadblock_map.py @@ -76,8 +76,8 @@ def validate_block_size_limits(kernel_map_entry: nodes.MapEntry, block_size: Lis kernel_map_label = kernel_map_entry.map.label total_block_size = product(block_size) - limit = Config.get('compiler', 'cuda', 'block_size_limit') - lastdim_limit = Config.get('compiler', 'cuda', 'block_size_lastdim_limit') + limit = int(Config.get('compiler', 'cuda', 'block_size_limit')) + lastdim_limit = int(Config.get('compiler', 'cuda', 'block_size_lastdim_limit')) if (total_block_size > limit) == True: raise ValueError(f'Block size for kernel "{kernel_map_label}" ({block_size}) '