Skip to content

Investigate penalty of passing LocalGeometry around #2450

Closed

Description

@imreddyTeja
  • Put in a test to show if we're reading too much of the geometry. The compiler may not actually be inlining when we tell it to inline.

Maybe define an array of fixed size and see at some point the compiler gives up on inlining.

Might have to look at nsys reports to see how much is being passed through.

Create new data structure like LocalGeometry but only contains two fields, to see if a simpler struct would actually reduce an important GPU usage metric.

Look in pointwise and broadcasts--anywhere projections are involved.

Look at UnrolledUtilities tests for inspiration for writing the test.

Test cases

  • Pointwise (loop over different complexities and levels of nesting; inputs (tuples of N floats)) -- when do we fail to inline, or fail to compile altogether
    • +, *, /, log (something harder than divide), project
    • 1 vs 2 nonlocal args, yes/no is LocalGeom used?: interpolate, weighted interpolate, upwinding (e.g., van Leer), div or curl

Check runtime of every example, but also register pressure, etc.

Links

Activity

  1. moved this to Backlog in Performanceon Feb 2, 2026
  2. moved this from Backlog to In progress in Performanceon Feb 2, 2026
  3. self-assigned this
    on Feb 2, 2026
  4. changed the title [-]Investigate penalty of passing LocalGeometry around ...[/-] [+]Investigate penalty of passing `LocalGeometry` around[/+] on Feb 3, 2026
  5. petebachant commented on Feb 10, 2026

    @petebachant
  6. petebachant commented on Feb 20, 2026

    @petebachant
  7. petebachant commented on Mar 9, 2026

    @petebachant
    Member
  8. petebachant commented on Apr 21, 2026

    @petebachant
    Member

    Not really sure if #2471 addresses this.

  9. moved this from In progress to In review in Performanceon Apr 28, 2026
  10. petebachant commented on Apr 29, 2026

    @petebachant
    Member

    Tests are in, so I'm going to close this. If we can come up with a more specific question to answer, I recommend a new issue.

  11. moved this from In review to Done in Performanceon Apr 29, 2026
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

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions