Skip to content

Generalize the team size calc for SYCL/CUDA/HIP in Homme#8530

Open
tcclevenger wants to merge 1 commit into
E3SM-Project:masterfrom
tcclevenger:tcclevenger/homme/team_size_updates
Open

Generalize the team size calc for SYCL/CUDA/HIP in Homme#8530
tcclevenger wants to merge 1 commit into
E3SM-Project:masterfrom
tcclevenger:tcclevenger/homme/team_size_updates

Conversation

@tcclevenger

Copy link
Copy Markdown
Contributor

Previously num_warps_device was hard-coded, and num_threads_warp was obtained using Kokko::Impl variables which a) could go away and should not be relied on and b) did not have a SYCL equiv.

SYCL was also using hard coding num thread/vector lane which were too small and lead to large loss of performance at small work/node runs (e.g., 2K and 4K nodes for ne1024).

This solutions was found and tested at the ALCF 2026 hackathon with @abagusetty.

[BFB]

Previously num_warps_device was hardcoded, and num_threads_warp was
obtained using Kokko::Impl variables which a) could go away and should
not be relied on and b) did not have a SYCL equiv.

SYCL was also using hard coding num thread/vector lane which were too
small and lead to large loss of performance at small work/node runs
(e.g., large number of nodes).
@tcclevenger tcclevenger added HOMME CI: approved Allow gh actions PR testing on ghci-snl-* machines labels Jun 30, 2026
@tcclevenger

Copy link
Copy Markdown
Contributor Author

Here's the performance difference on Aurora (SYCL) with these changes:

Dycore device kernels

  • 36% speedup at 4K nodes for Dirk
  • 46% speedup at 4K nodes for Caar
DycoreCompute-BeforeAfter

Overall atmosphere

  • 19% speedup at 4K nodes
ATM-AllGPUMachines-F8K-sypd-supersmall

@rljacob

rljacob commented Jun 30, 2026

Copy link
Copy Markdown
Member

Do you expect this to change performance on Frontier or PM-GPU ?

@tcclevenger

Copy link
Copy Markdown
Contributor Author

Do you expect this to change performance on Frontier or PM-GPU ?

No, it should not change performance at all. I believe I tested in April that it yields the exact same team sizes for HIP and Cuda, but let me sanity check than one more time since it was a few months ago.

@abagusetty abagusetty left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!
The changes shouldnt have an impact to frontier and PM-GPU: since the hardcoded values already map to number returned by kokkos-API now. Just adds more hardware portability

@tcclevenger

Copy link
Copy Markdown
Contributor Author

Confirmed on Frontier everything is the same. PM-GPU hasn't run yet, but I'm confident it's the same there too.

@rljacob Am I ok to merge this today? Each change is ifdef guarded so guaranteed no code is different for any chrysalis config. Ok to wait as well.

@rljacob

rljacob commented Jun 30, 2026

Copy link
Copy Markdown
Member

lets wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI: approved Allow gh actions PR testing on ghci-snl-* machines HOMME

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants