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

aarch64: cd: switch from libomp to libgomp #1787

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

snadampal
Copy link
Contributor

In the current version of the scripts, torch libraries are linked to llvm openmp becasue conda openblas-openmp is linked to it. to switch to gnu libgomp, we are building the openblas from sources instead of installing from conda.

fixes##1774

@snadampal
Copy link
Contributor Author

this is the pytorch PR to test this change in ci: pytorch/pytorch#124353

In the current version of the CD scripts, torch libraries are
linked to llvm openmp because conda openblas-openmp is linked to it.
To switch to gnu libgomp, we are building the openblas from sources
instead of installing from conda.
@snadampal
Copy link
Contributor Author

fixed lint errors.

@malfet malfet merged commit b57d3a8 into pytorch:main Apr 24, 2024
2 checks passed
@malfet
Copy link
Contributor

malfet commented Apr 25, 2024

Looks like it broke nightly builds, because you are building OpenBLAS without LAPACK, will revert and try to fwd fix during the day

malfet added a commit that referenced this pull request Apr 25, 2024
This reverts commit b57d3a8 as it broke nightly tests, becuase OpenBLAS is built without LAPACK.
malfet pushed a commit that referenced this pull request Apr 25, 2024
In the current version of the scripts, torch libraries are linked to llvm openmp becasue conda openblas-openmp is linked to it. to switch to gnu libgomp, we are building the openblas from sources instead of installing from conda.

In essence it reverts #1462

fixes #1774

(cherry picked from commit b57d3a8)
@snadampal
Copy link
Contributor Author

I will update the OpenBLAS build for LAPACK

@snadampal
Copy link
Contributor Author

I have raised this PR to fix the missing LAPACK issue along with switching to libgomp.
this is the output from the wheel built with this change:

2.4.0a0+gitacbf888 PyTorch built with:
  - GCC 10.2
  - C++ Version: 201703
  - Intel(R) MKL-DNN v3.3.6 (Git Hash 86e6af5974177e513fd3fee58425e1063e7f1361)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - LAPACK is enabled (usually provided by MKL)
  - NNPACK is enabled
  - CPU capability usage: NO AVX
  - Build settings: BLAS_INFO=open, BUILD_TYPE=Release, CXX_COMPILER=/opt/rh/devtoolset-10/root/usr/bin/c++, CXX_FLAGS= -D_GLIBCXX_USE_CXX11_ABI=0 -fabi-version=11 -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -DNDEBUG -DUSE_KINETO -DTMP_LIBKINETO_NANOSECOND -DLIBKINETO_NOCUPTI -DLIBKINETO_NOROCTRACER -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -O2 -fPIC -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Werror=bool-operation -Wnarrowing -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-stringop-overflow -Wsuggest-override -Wno-psabi -Wno-error=pedantic -Wno-error=old-style-cast -Wno-missing-braces -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=open, TORCH_VERSION=2.4.0, USE_CUDA=OFF, USE_CUDNN=OFF, USE_CUSPARSELT=OFF, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_GLOO=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=OFF, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF, USE_ROCM_KERNEL_ASSERT=OFF, 

cc: @malfet , @atalman

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

3 participants