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

[CMAKE] Variables aren't set correctly in rocBlas 6.3.2 #1550

Open
jdumke opened this issue Feb 12, 2025 · 8 comments
Open

[CMAKE] Variables aren't set correctly in rocBlas 6.3.2 #1550

jdumke opened this issue Feb 12, 2025 · 8 comments
Assignees

Comments

@jdumke
Copy link

jdumke commented Feb 12, 2025

Heelo,
sometimes it makes me curious how you get your builds done. In this case some CMAKE-variables aren't set in your scripts.
I tried to build rocBlas with the "T_rocblas" make-target on cmd.
Details are in the tarball.
rocblas_issue.tar.gz
The variable in question are:
CMAKE_CXX_COMPILER
CMAKE_MAKE_PROGRAM

@ppanchad-amd
Copy link

Hi @jdumke. Internal ticket has been created to investigate this issue. Thanks!

@TorreZuk TorreZuk self-assigned this Feb 12, 2025
@TorreZuk
Copy link
Contributor

@jdumke can you provide the link to the source of your build script you used as it is clear it is not building from the rocBLAS repo guide (install.sh or rmake.py) from https://github.com/ROCm/rocBLAS. The cmake -DCMAKE_TOOLCHAIN_FILE=toolchain-linux.cmake (a root level file) will set CMAKE_CXX_COMPILER but your script needs to be triaged to the provider for fixes to be advised. Thanks.

@jdumke
Copy link
Author

jdumke commented Feb 12, 2025

Sure, I tried to build rocBlas with the following commandline:
make -f ./ROCm/tools/rocm-build/ROCm.mk -j8 T_rocblas

ROCm.mk like provided by the ROCm/ROCm repo for Rocm-6.3.2.

It seems, there are some inconsistencies between the several subprojects.

By the way, is hipblaslt a hard dependency?

@TorreZuk
Copy link
Contributor

Still waiting for other investigators to comment. For a standard build hipblaslt yes it is a hard dependency.
You can build without the GEMM assembly backends with -DBUILD_WITH_HIPBLASLT=OFF and -DBUILD_WITH_TENSILE=OFF, just run python script rmake.py --help to see various options. But once you go down the build customization road you will diverge from the tested release.

@jdumke
Copy link
Author

jdumke commented Feb 14, 2025

I got your point, thanks. As workaround I use the precompiled hipblaslt. Hipblaslt doesn't compile for my gfx's, so I've to tweak around.

@TorreZuk
Copy link
Contributor

If just makig a personal build you are not sharing with other users (and other gfx) and your gfx isn't supported by hipBLASLt then just build rocblas with additional cmake argument -DBUILD_WITH_HIPBLASLT=OFF or if using rmake.py --no_hipblaslt

@jdumke
Copy link
Author

jdumke commented Feb 14, 2025

Thanks for helping me with the side question.
Another problem raised, none of the installed fortram compilers seem to fit, I can't figure out why so far.

@jdumke
Copy link
Author

jdumke commented Feb 15, 2025

I find the reason for the main question.
When building with ROCm.mk (which I use to build the full stack, one day) the script build_rocblas.sh from the same directory is invoked, this file calls cmake with -DCMAKE_TOOLCHAIN_FILE=toolchain-linux.cmake (line 39). After deleting this line, the configuration runs until the compiler flag test.
If I understand it correctly, the mentioned test is intended to work as follows:
For all requested offload-architectures do:

  1. pass the given flags to the compiler in question to build CMakeCXXCompilerId.cpp deep in the subdirectories of the sources.
  2. the program performs it's magic to produce a cryptic return code.
  3. decrypt this return code to a proper c-identifier

Is this right?
When I perform steps 1 and 2 by hand with amdclang all went fine, but while building all tests fail.
Okay, the idea is correct, but the sourcecode to test against is wrong, I think, but where is the correct one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants