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

[rocBLAS] Fix issues with rocBLAS 4.0.0 #448

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

nilsfriess
Copy link
Contributor

Description

rocBLAS 4.0.0 removed support for the legacy BLAS inplace trmm, so calls to trmm cause a compilation error. The old functionality is provided by just duplicating the last two arguments of trmm (see also here).

To fix this, I am defining a macro ROCBLAS_NO_LEGACY_TRMM depending on the rocBLAS version which is then used in an #ifdef to decide which version of the function to call.

I also had to change slightly the way the path to librocblas.so is constructed in FindrocBLAS.cmake. I'm not sure if this is also related to the rocBLAS version or if this is a general issue on some systems, so I can also put that in a separated PR if you prefer.

Checklist

All Submissions

  • Do all unit tests pass locally? Attach a log.
    I don't have an AMD gpu to test, I'm just assessing the state of compiling oneMKL with AdaptiveCpp to see if [hipSYCL] Add hipSYCL GitHub CI #307 needs any updates and can the maybe be merged.
  • Have you formatted the code using clang-format?

@mmeterel
Copy link
Contributor

mmeterel commented Mar 12, 2024

@nilsfriess Thanks for the PR. I think this needs to be tested. You can contact me or infra team ( @toxicscum ) to access AMD GPUs.

@@ -381,10 +381,19 @@ inline void trmm(Func func, sycl::queue &queue, side left_right, uplo upper_lowe
auto a_ = sc.get_mem<rocDataType *>(a_acc);
auto b_ = sc.get_mem<rocDataType *>(b_acc);
rocblas_status err;

// rocblas version 4.0.0 removed the legacy BLAS trmm implementation
#ifdef ROCBLAS_NO_LEGACY_TRMM
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
#ifdef ROCBLAS_NO_LEGACY_TRMM
#if ROCBLAS_VERSION_MAJOR >= 3

We can use ROCBLAS_VERSION_MAJOR, that way we don't need to add a new define, also since it's deprecated in rocBLAS 3 it gives warning so we could also use the new interface for rocBLAS 3.x.

I ran into the same issue and ended up with a similar patch before finding this PR. I didn't have any ROCBLAS_LIB_PATH issues with rocBLAS 4.x though.

@Rbiessy
Copy link
Contributor

Rbiessy commented Jun 6, 2024

Thank you for the PR, we have recently removed the Findroc*.cmake files in #490 which should avoid the issues with ROCBLAS_LIB_PATH. Can you rebase your PR with the tip of develop?

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.

4 participants