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

Investigate HIP performance difference with spatial indices #1282

Open
bmhan12 opened this issue Feb 21, 2024 · 1 comment
Open

Investigate HIP performance difference with spatial indices #1282

bmhan12 opened this issue Feb 21, 2024 · 1 comment
Assignees
Labels
cuda Issues related to CUDA GPU Issues related to GPU development Hip Issues related to Hip Quest Issues related to Axom's 'quest' component Reviewed Spin Issues related to Axom's 'spin' component

Comments

@bmhan12
Copy link
Contributor

bmhan12 commented Feb 21, 2024

PR #1278 records an unexpected performance difference between HIP and CUDA (~4x slower) for the BVH and Implicit Grid spatial indices.

Some potential sources of improvement:

  • Verify Axom is using HIP intrinsics:
    // CUDA intrinsics: https://docs.nvidia.com/cuda/cuda-math-api/group__CUDA__MATH__INTRINSIC__INT.html
    // TODO: Support HIP intrinsics (https://rocm.docs.amd.com/projects/HIP/en/latest/reference/kernel_language.html)
    // Check for and setup defines for platform-specific intrinsics
    // Note: `__GNUC__` is defined for the gnu, clang and intel compilers
    #if defined(AXOM_USE_CUDA)
    // Intrinsics included implicitly
    #elif defined(_WIN64) && (_MSC_VER >= 1600)
    #define _AXOM_CORE_USE_INTRINSICS_MSVC
    #include <intrin.h>
    #elif defined(__x86_64__) && defined(__GNUC__)
    #define _AXOM_CORE_USE_INTRINSICS_GCC
    #include <x86intrin.h>
    #elif defined(__powerpc64__) && (defined(__GNUC__) || defined(__ibmxl__))
    #define _AXOM_CORE_USE_INTRINSICS_PPC
    #endif
  • Try newer rocm versions (>= 5.7.0)
  • Consider using RAJA::unsafeAtomicAdd (link and link to suggestions)
@bmhan12 bmhan12 added Quest Issues related to Axom's 'quest' component Spin Issues related to Axom's 'spin' component GPU Issues related to GPU development cuda Issues related to CUDA Hip Issues related to Hip labels Feb 21, 2024
@bmhan12 bmhan12 self-assigned this Feb 21, 2024
@kennyweiss
Copy link
Member

Presumably, given the updated query results in #1419, this is still an issue for our hip-based vs. cuda-based ImplicitGrid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cuda Issues related to CUDA GPU Issues related to GPU development Hip Issues related to Hip Quest Issues related to Axom's 'quest' component Reviewed Spin Issues related to Axom's 'spin' component
Projects
None yet
Development

No branches or pull requests

2 participants