create_mirror_view_and_copy on unified memory architecture (MI300A)
[implementation suggestion omitted]
This does lead to a static_assert, due to incompatible types if compiled with Kokkos_ARCH_AMD_GFX942_APU=ON. As far as I have debugged the situation one of the types treats Kokkos::HIPSpace as beeing accessible from host and device, and therefore it is a valid host memory space (which is correct on MI300A). The other one does not and forces Kokkos::HostSpace leading to the type mismatch. I think I need to change Kokkos::HostSpace(), but was not able to figure out to what.
The whole code snippets needs to work on unified memory architectures and traditional architectures.
Tested on Kokkos develop branch with ROCM 7.2.
The repository is checked out at /workspace/repo. Work only on production
source code. Do not modify tests, CMake registration, CI configuration, or the
grading environment. Network access is unavailable and git history contains
only the base revision, so do not spend time looking for upstream commits or
pull requests. Diagnose from the local source, make a production-code change,
and use the smallest relevant target in the existing build tree for local
verification.