Skip to content

Module 02: Memory Access Patterns update - #188

Merged
lucbv merged 3 commits into
kokkos:mainfrom
lucbv:memory_access_patterns_update
Oct 3, 2026
Merged

lucbv merged 3 commits into
kokkos:mainfrom
lucbv:memory_access_patterns_update

Conversation

@lucbv

@lucbv lucbv commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

This includes switching from CudaSpace to GPUSpace and expanding a bit on what adding a new custom layout involves.

This includes switching from CudaSpace to GPUSpace and expanding
a bit on what adding a new custom layout involves.

Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>
@lucbv
lucbv requested review from crtrott and omsai September 30, 2026 16:08
@lucbv lucbv self-assigned this Sep 30, 2026
@lucbv lucbv changed the title Module 02: updating the section on MemoryAccessPatterns Module 02: Memory Access Patterns update Oct 1, 2026
Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>

@omsai omsai 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.

Might need a word removed and adding two footnotes for folks reading through the slides not attending in person.

Comment thread Content/Presentations/sections/Section_MemoryAccessPatterns.tex

\begin{block}{Important point}
For performance, accesses to views in \texttt{HostSpace} must be \textbf{cached}, while access to views in \texttt{CudaSpace} must be \textbf{coalesced}.
For performance, accesses to views in \texttt{HostSpace} must be \textbf{cached}, while access to views in \texttt{GPUmemorySpace} must be \textbf{coalesced}.

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.

Is GPUmemorySpace a placeholder? I worry about someone mistakenly looking for exactly this literal symbol in the API and maybe there could be some way of make it more clear that it's a placeholder? A bash-ism would be ${GPUmemorySpace} but I can't think of a well-understood C++ equivalent and so maybe one could qualify it with "your specific GPUmemorySpace" or "your hardware's GPUmemorySpace". We don't have to do this each time, but just need to point it out the first time. If space is at a premium in your block then maybe it could be a footnote.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okay, I clarified that with some editing

\begin{itemize}
\item{\textbf{HostSpace}: cached ({\color{darkgreen}good})}
\item{\textbf{CudaSpace}: uncoalesced ({\color{red}bad})}
\item{\textbf{GPUSpace}: uncoalesced ({\color{red}bad})}

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.

Same comment as above; if this isn't an actual symbol in the API, then may want to have a footnote on the slide the first time the placeholder is introduced saying to replace it with your specific hardware's *Space

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same as above

Now using GPU memory spaces instead to make it more clear that
it is not a Kokkos defined type but just the concept of GPU memory.

Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>
@lucbv
lucbv requested a review from omsai October 2, 2026 00:03

@omsai omsai 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.

Looks good! Removing the \texttt{....} formatting is a better solution than the footnote I was suggesting.

@lucbv
lucbv merged commit 47408b0 into kokkos:main Oct 3, 2026
7 checks passed
@lucbv
lucbv deleted the memory_access_patterns_update branch October 3, 2026 20:37
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