Skip to content

Use an alias for Kokkos' default view memory trait#442

Merged
tcclevenger merged 1 commit into
masterfrom
tcclevenger/add_alias_for_managed_mem
May 12, 2026
Merged

Use an alias for Kokkos' default view memory trait#442
tcclevenger merged 1 commit into
masterfrom
tcclevenger/add_alias_for_managed_mem

Conversation

@tcclevenger
Copy link
Copy Markdown
Contributor

Add an alias for Kokkos' default memory trait (managed memory, no other specializations) since Kokkos deprecated using MemoryManaged = MemoryTraits<0>.

@tcclevenger tcclevenger requested a review from bartgol May 11, 2026 20:50
using HostDevice = Kokkos::Device<Kokkos::DefaultHostExecutionSpace, Kokkos::DefaultHostExecutionSpace::memory_space>;

// Alias for Kokkos' default memory trait for views (managed memory, no special properties)
using ManagedMemoryTrait = Kokkos::MemoryTraits<0>;
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.

@bartgol I didn't add this to KokkosTypes since it isn't device dependent. Also, I added "Trait" since I felt "MemoryManaged" wasn't very descriptive. I also considered KokkosManagedMemoryTrait or even KokkosDefaultMemoryTrait. Not sure if you have opinions on these.

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.

I think this is fine. I hope this won't get used much anyways in ekat and customers (in favor of KokkosTypes' typedefs), so this is fine.

Does kokkos still have the unmanaged trait typedef in 5.x?

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.

Yes, Unmanaged still exists

@tcclevenger tcclevenger merged commit 5a130aa into master May 12, 2026
4 checks passed
@tcclevenger tcclevenger deleted the tcclevenger/add_alias_for_managed_mem branch May 12, 2026 14:03
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