This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: The nvptx port
- From: Cesar Philippidis <cesar_philippidis at mentor dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Bernd Schmidt <bernds at codesourcery dot com>, Richard Henderson <rth at redhat dot com>, <gcc-patches at gcc dot gnu dot org>, Thomas Schwinge <thomas_schwinge at mentor dot com>
- Date: Fri, 14 Nov 2014 08:37:52 -0800
- Subject: Re: The nvptx port
- Authentication-results: sourceware.org; auth=none
- References: <20141114082948 dot GH5026 at tucnak dot redhat dot com> <5465E2CF dot 6000105 at codesourcery dot com> <20141114113945 dot GM5026 at tucnak dot redhat dot com> <5465F1B8 dot 80205 at codesourcery dot com> <546621CD dot 40007 at mentor dot com> <20141114161836 dot GU5026 at tucnak dot redhat dot com>
On 11/14/2014 08:18 AM, Jakub Jelinek wrote:
>> Also, keep in mind that PTX doesn't have a global TID. The user needs to
>> calculate it using ctaid/tid and friends.
>
> Ok. Is %gridid needed for that combo too?
Eventually, probably. Currently, we're launching all of our kernels with
cuLaunchKernel, and that function doesn't take grids into account.
Nvidia's documentation is kind of confusing. They use different
terminology for their high level CUDA stuff and the low level PTX. E.g.,
what CUDA refers to blocks/warps, PTX calls CTAs. I'm not sure what
grids corresponds to, but I think it might be devices. If that's the
case, the runtime does have the capability to select which device to run
a kernel on. But, it can't run a single kernel on multiple devices
unless you use asynchronous kernel invocations.
Cesar