Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: thrust::device_vector does not compile with large element type #2777

Open
1 task done
fkallen opened this issue Nov 12, 2024 · 0 comments
Open
1 task done

[BUG]: thrust::device_vector does not compile with large element type #2777

fkallen opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working right.

Comments

@fkallen
Copy link

fkallen commented Nov 12, 2024

Is this a duplicate?

Type of Bug

Compile-time Error

Component

Thrust

Describe the bug

thrust::device_vector cannot be used with large element type (sizeof(T) ~ 32kb).
Any fill kernel or initialization kernel will fail to compile because constant memory space for kernel parameters are exceeded.

/opt/compiler-explorer/cuda/12.6.1/bin/../targets/x86_64-linux/include/cub/device/dispatch/dispatch_for.cuh(137): Error: Formal parameter space overflowed (40016 bytes required, max 32764 bytes allowed) in function ZN3cub17CUB_200500_890_NS6detail8for_each13static_kernelINS2_12policy_hub_t12policy_350_tEmN6thrust20THRUST_200500_890_NS8cuda_cub20__uninitialized_fill7functorINS7_10device_ptrI11LargeStructEESC_EEEEvT0_T1

How to Reproduce

#include <thrust/device_vector.h>

struct LargeStruct{
    char data[40000];
};

int main(){
    thrust::device_vector<LargeStruct> d_vec(1);
}

Expected behavior

device_vector can be used with large types.

Reproduction link

https://godbolt.org/z/88v1ffcYh

Operating System

No response

nvidia-smi output

No response

NVCC version

No response

@fkallen fkallen added the bug Something isn't working right. label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working right.
Projects
None yet
Development

No branches or pull requests

1 participant