杨志华
杨志华

Reputation: 1

Does cuda stream has own __constant__ memory copy?

I have a kernel which uses a little __constant__ memory multiple times and needs to copy different values to __constant__ memory each time. Recently, I needed to make this kernel multi stream concurrent.

How can I make each stream a copy of that __constant__ memory?

Upvotes: 0

Views: 235

Answers (1)

talonmies
talonmies

Reputation: 72353

How can I make each stream a copy of that __constant__ memory?

You can't. A __constant__ variable has context/device level scope. If your code only uses a "little" amount of constant memory, just pass it as a kernel argument. Kernel arguments are stored in a dedicated constant memory bank on all supported architectures.

Upvotes: 1

Related Questions