Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various small optimizations #816

Merged
merged 6 commits into from
May 8, 2024
Merged

Various small optimizations #816

merged 6 commits into from
May 8, 2024

Conversation

linehill
Copy link
Collaborator

... for reducing kernel launch host overhead.

  • Enable (optional) link-time optimizations for the libCHIP library.
  • Add early exits in couple functions.
  • Avoid redundant kernel argument copies. Along the way, fix CHIPGraphNodeKernel instances didn't copy kernel arguments fully (they only copied pointers to arguments but not their values).
  • Eliminate map lookups in SPVFuncInfo::visit*Args().

@pvelesko
Copy link
Collaborator

A test failed with what appears to be a race condition.

@linehill linehill force-pushed the misc-opts branch 2 times, most recently from 5fabc41 to 4af58f7 Compare May 2, 2024 08:27
Enable link-time / interprocedural optimizations on the runtime
library if available on the system.
Exit early if there are no hipMemoryTypeManaged and hipMemoryTypeHost
allocations in the current context.
... within hipLaunchKernel() call.

Along the way fix CHIPGraphNodeKernel instances didn't copy kernel arguments
fully (they only copied pointers to arguments but not their values).
Copy link
Collaborator

@pvelesko pvelesko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pvelesko pvelesko merged commit 1d0f197 into main May 8, 2024
25 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants