Alpaka: Separate usage of Acc inside and outside of kernels

Created on 27 Mar 2020  路  7Comments  路  Source: alpaka-group/alpaka

  • Within a kernel it should probably be called context CtxGpuCuda& ctx so that it is easier for users to understand what it is
  • Outside of a kernel it represents a stack of interconnected classes representing a backend
Enhancement Refactoring

Most helpful comment

Since we use already the name work division we could also use WorkerCtx.

The definition we found on a discussion with @j-stephan, @sbastrakov , @bussmann was:

Abstraction of devices via a programming model. 
Maps your working division to the hardware cores via a given programming model, 
provides memory management and synchronization functionality depending
on that model and functions for computation.

All 7 comments

I suggest a generic name e.g. DeviceCtx const & ctx

Do we need device as part of name in kernel? - All kernels are always on device.

In the end it is about the variable name within the kernel because the type is already a template parameter. At the moment we have TAcc const & acc. I would simply replace it by TCtx const & ctx.

I would like to note that for any non-computer scientist, the term "context" is not self-explanatory. So please document it well and prominently, if you pick it.

@ax3l good point, but do you think accelerator is really more clear (not saying it's not, since I can't abstract from computer science background here)? A couple of weeks ago Rene, Jan, I and Michael struggled for some time in how to explain in words what does it mean exactly in terms of alpaka kernels, and it turned out we had at least 3 different opinions on that.

Maybe DeviceContext or KernelContext or BackendInfo can add more meaning. As an idea, you five could focus on the description of what it is first and document it, and then a new name for the current accelerator type/param will arise more naturally.

Since we use already the name work division we could also use WorkerCtx.

The definition we found on a discussion with @j-stephan, @sbastrakov , @bussmann was:

Abstraction of devices via a programming model. 
Maps your working division to the hardware cores via a given programming model, 
provides memory management and synchronization functionality depending
on that model and functions for computation.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

ax3l picture ax3l  路  5Comments

tdd11235813 picture tdd11235813  路  4Comments

psychocoderHPC picture psychocoderHPC  路  4Comments

mxmlnkn picture mxmlnkn  路  5Comments

tdd11235813 picture tdd11235813  路  5Comments