On Tue, 1 Apr 2025, Richard Biener via Gcc wrote:
> In C++ there could be runtime initializers for a const qualified > object. I think all > you need to do is make sure the logic that places the object in .const > vs. .global > is consistent with the logic deciding how to access it. I think it is misguided to implicitly use PTX .const memory space for all readonly data. CUDA constant memory is a specialized memory region, limited in size (64KB) with small dedicated caches (8 KB). It is intended for data that is accessed in a uniform manner by threads. It would be more appropriate to treat it like .shared memory (exposed in nvptx via an attribute). Alexander