On 10/22/15 09:01, Nathan Sidwell wrote:
On 10/22/15 05:55, Bernd Schmidt wrote:
On 10/22/2015 10:12 AM, Jakub Jelinek wrote:

So, is the worker broadcast buffer effectively a file scope .shared
variable?  My worry is that as .shared is quite limited resource, if you
compile many TUs and each allocates its own broadcast buffer you run out of
shared memory.  Is there any way how to share the broadcast buffers in
between different TUs (other than LTO)?

I think LTO is the mechanism, nvptx-lto1 only ever produces one assembly file.
So I'm not really concerned about this.

Correct.  PTX has no equivalent of common or weak, so we can't do the elf thing
of emitting a common defn and having the linking process pick the largest.

oh, and I even thought of having a bunch of defns in a library of the form
long worker_buf_<n>:

and then having the emitted code reference the set that it needed so that the linker would concatenate them into a single object. But PTX has no concept of sections, so couldn't gatheer those decls into contiguous memory,

nathan

Reply via email to