Skip to content

[REQ] Allow wp.zeros backed by shared memory in kernels/funcs #1050

@nvtw

Description

@nvtw

Description

Allow local arrays to be backed by shared memory. This allows to reduce the amount of registers consumed by local arrays. The proposed API would include an additional parameter to wp.zeros that is only available in kernels. Tiles have a similar mechanic that allows to select their memory type.

Proposed API: left = wp.zeros(shape=(6,), dtype=wp.vec3, mem_type="shared")

Context

Allows to reduce the register pressure on bigger kernels. Especially for collision detection kernels that need local arrays while processing the contacts, it's very hard to get below the register limit of 255. Shared memory backed local arrays could be a tool to help with that. A similar strategy is used under the hood for the stack memory of bvh queries.

Metadata

Metadata

Assignees

Labels

feature requestRequest for something to be added

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions