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

[ARM][CUDA][OpenBLAS] Build with NOFORTRAN=1 FLAG #1861

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

Conversation

tinglvv
Copy link
Collaborator

@tinglvv tinglvv commented Jun 10, 2024

To fix the below error, need to run apt install libopenblas-dev

  File "/usr/local/lib/python3.10/dist-packages/torch/__init__.py", line 289, in <module>    from torch._C import *  # noqa: F403
ImportError: libgfortran.so.5: cannot open shared object file: No such file or directory

Test build OpenBLAS without gfortran

cc @Aidyn-A @nWEIdia @ptrblck

Copy link
Collaborator

@nWEIdia nWEIdia left a comment

Choose a reason for hiding this comment

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

LGTM!

@nWEIdia nWEIdia changed the title test build nofortran flag [ARM][CUDA][OpenBLAS] Build with NOFORTRAN=1 FLAG Jun 10, 2024
@nWEIdia nWEIdia requested a review from atalman June 11, 2024 16:24
@@ -7,6 +7,7 @@ git clone https://github.com/OpenMathLib/OpenBLAS.git -b v0.3.25 --depth 1 --sha


OPENBLAS_BUILD_FLAGS="
NOFORTRAN=1
Copy link
Contributor

Choose a reason for hiding this comment

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

This file is called also from manywheel/Dockerfile_aarch64 should we instead set this flag in Dockerfile aarch64 cuda ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@tinglvv Please make this script do if else, according to whether Dockerfile called this file with an argument or not. If yes, then it is arm cuda dockerfile calling. Otherwise, it is arm cpu dockerfile calling. Thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks Andrey for noticing this. Updated accordingly to build only for cu124 (currently cuda-aarch64 only). Will need to refactor this in the future.

@@ -14,6 +14,11 @@ DYNAMIC_ARCH=1
TARGET=ARMV8
CFLAGS=-O3
"
if [ "$DESIRED_CUDA" = "cu124" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need to use BASE_CUDA_VERSION 12.4 here instead
Looks like DESIRED_CUDA is not set

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for checking, indeed it was not set. Let me use GPU_ARCH_TYPE: cuda-aarch64 instead

@atalman
Copy link
Contributor

atalman commented Jun 14, 2024

hi @tinglvv yes this looks good. I do see it here on gpu aarch64 builds:
https://github.com/pytorch/builder/actions/runs/9519461690/job/26242701970?pr=1861#step:5:1221

And not here:
https://github.com/pytorch/builder/actions/runs/9519461690/job/26242706088?pr=1861#step:5:686

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

Successfully merging this pull request may close these issues.

None yet

4 participants