Skip to content

For some of the Metal kernels, we use global atomics which causes massive serialization, that affects performance #483

Open

Description

@himanshunaidu

Replacing this with atomic per threadgroups and reduction would be a better idea.

Relevant files:

  1. WorldPoints.metal
  2. MeshPipeline.metal
  3. Plane.metal

Activity

  1. self-assigned this
    on Apr 9, 2026
  2. himanshunaidu commented on Apr 9, 2026

    @himanshunaidu
    CollaboratorAuthor

    We also use global debug counters in some compute kernels that are useful for debugging purposes, but can affect performance in their current state.
    Better options would be to do one or both of the following:

    1. Add debug compile-time macro
    2. Replace per-thread atomics with threadgroup-local counters and then reduction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions