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

Add include directories for rocTracer, hipBLAS-common, rocRAND #3615

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

Conversation

afzpatel
Copy link

@afzpatel afzpatel commented Mar 13, 2025

This PR resolves issues related to building MIOpen with spack. In Spack, all of these packages are installed in different paths, not is a single /opt/rocm path, which is why the include directories need to be explictly added.

Changes:

  • Link roc::hipblas and roc::rocrand libraries, when hipblas_FOUND and rocrand_FOUND variables are true.
  • Make SQLite::SQLite3, nlohmann_json::nlohmann_json, and roc::hipblas transitive dependencies at build time. This ensures that MIOpenDriver, which is built during the MIOpen build process, properly finds the necessary header files when built with Spack.
  • Replace linking to roctx64 with ${rocTracer}. Also, add include directories for rocTracer.
  • Add include directories for rocrand and hipblas-common

@afzpatel afzpatel requested a review from srekolam March 13, 2025 19:41
@afzpatel afzpatel marked this pull request as ready for review March 13, 2025 19:48
@afzpatel afzpatel marked this pull request as draft March 14, 2025 16:01
@afzpatel afzpatel changed the title Add linking and include directories for rocTracer, hipBLAS, rocRAND Add include directories for rocTracer, hipBLAS, rocRAND Mar 14, 2025
@afzpatel
Copy link
Author

Is rocRAND only supposed to be required when building MIOpenDriver? I'm getting this error with MIOPEN_BUILD_DRIVER set to OFF.

In file included from /tmp/root/spack-stage/spack-stage-miopen-hip-6.3.2-rifpm6oiq4vemblnwp7rn3xri4s36sz5/spack-src/src/dropout_api.cpp:41:
/tmp/root/spack-stage/spack-stage-miopen-hip-6.3.2-rifpm6oiq4vemblnwp7rn3xri4s36sz5/spack-src/src/kernels/miopen_rocrand.hpp:45:10: fatal error: 'rocrand/rocrand_xorwow.h' file not found
   45 | #include <rocrand/rocrand_xorwow.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~

@afzpatel afzpatel marked this pull request as ready for review March 14, 2025 20:01
@BrianHarrisonAMD
Copy link
Contributor

Is rocRAND only supposed to be required when building MIOpenDriver? I'm getting this error with MIOPEN_BUILD_DRIVER set to OFF.

In file included from /tmp/root/spack-stage/spack-stage-miopen-hip-6.3.2-rifpm6oiq4vemblnwp7rn3xri4s36sz5/spack-src/src/dropout_api.cpp:41:
/tmp/root/spack-stage/spack-stage-miopen-hip-6.3.2-rifpm6oiq4vemblnwp7rn3xri4s36sz5/spack-src/src/kernels/miopen_rocrand.hpp:45:10: fatal error: 'rocrand/rocrand_xorwow.h' file not found
   45 | #include <rocrand/rocrand_xorwow.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~

I think it was, but looks like it's been used in some kernels that are included generally.

@afzpatel afzpatel changed the title Add include directories for rocTracer, hipBLAS, rocRAND Add include directories for rocTracer, hipBLAS-common, rocRAND Mar 19, 2025
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