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

Make sure FindLAPACK finds the same BLAS library #49647

Closed
wants to merge 4 commits into from

Conversation

isuruf
Copy link
Collaborator

@isuruf isuruf commented Dec 19, 2020

BLAS library is found by cmake/Dependencies.cmake and then
LAPACK library is found by FindLAPACK.cmake which in turn calls
FindBLAS.cmake. This means that we are searching for BLAS twice
and they might be different things. By setting a few variables,
this can be avoided.

cc @seemethere

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Dec 19, 2020

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 57250c8 (more details on the Dr. CI page):


  • 2/2 failures introduced in this PR

🕵️ 2 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_xla_linux_bionic_py3_6_clang9_test (1/2)

Step: "Run tests" (full log | diagnosis details | 🔁 rerun)

Jul 28 07:48:33 2021-07-28 07:48:33.426355: E t...w/compiler/xla/service/slow_operation_alarm.cc:55]
Jul 28 07:36:45   test_AvgPool3d_backward_after_cat_dim1_device_xla (__main__.TestNNDeviceTypeXLA) ... skip (0.002s)
Jul 28 07:36:45   test_BatchNorm_empty_xla (__main__.TestNNDeviceTypeXLA) ... ok (0.142s)
Jul 28 07:36:45   test_Bilinear_empty_xla (__main__.TestNNDeviceTypeXLA) ... skip (0.002s)
Jul 28 07:36:45   test_CTCLoss_cudnn_xla (__main__.TestNNDeviceTypeXLA) ... skip (0.002s)
Jul 28 07:36:46   test_CTCLoss_empty_target_xla (__main__.TestNNDeviceTypeXLA) ... ok (0.842s)
Jul 28 07:38:56   test_Conv2d_backward_depthwise_xla_float64 (__main__.TestNNDeviceTypeXLA) ... 2021-07-28 07:38:56.357716: E tensorflow/compiler/xla/service/slow_operation_alarm.cc:55] 
Jul 28 07:38:56 ********************************
Jul 28 07:38:56 Very slow compile?  If you want to file a bug, run with envvar XLA_FLAGS=--xla_dump_to=/tmp/foo and attach the results.
Jul 28 07:38:56 Compiling module SyncTensorsGraph.30789
Jul 28 07:38:56 ********************************
Jul 28 07:48:33 2021-07-28 07:48:33.426355: E tensorflow/compiler/xla/service/slow_operation_alarm.cc:55] 
Jul 28 07:48:33 ********************************
Jul 28 07:48:33 Very slow compile?  If you want to file a bug, run with envvar XLA_FLAGS=--xla_dump_to=/tmp/foo and attach the results.
Jul 28 07:48:33 Compiling module SyncTensorsGraph.35441
Jul 28 07:48:33 ********************************


Too long with no output (exceeded 1h30m0s): context deadline exceeded

See GitHub Actions build Linux CI (pytorch-linux-bionic-py3.8-gcc9-coverage) / render_test_results (default) (2/2)

Step: "Chown workspace" (full log | diagnosis details | 🔁 rerun)

2021-07-31T19:20:59.9842153Z docker: Error resp...pine/manifests/latest": no basic auth credentials.
2021-07-31T19:20:59.9049547Z env:
2021-07-31T19:20:59.9050222Z   BUILD_ENVIRONMENT: pytorch-linux-bionic-py3.8-gcc9-coverage
2021-07-31T19:20:59.9051306Z   DOCKER_IMAGE_BASE: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-py3.8-gcc9
2021-07-31T19:20:59.9052302Z   SCCACHE_BUCKET: ossci-compiler-cache-circleci-v2
2021-07-31T19:20:59.9052899Z   TORCH_CUDA_ARCH_LIST: 5.2
2021-07-31T19:20:59.9053385Z   IN_CI: 1
2021-07-31T19:20:59.9053861Z   CUSTOM_TEST_ARTIFACT_BUILD_DIR: build/custom_test_artifacts
2021-07-31T19:20:59.9054566Z   ALPINE_IMAGE: 308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine
2021-07-31T19:20:59.9055140Z ##[endgroup]
2021-07-31T19:20:59.9403631Z Unable to find image '308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine:latest' locally
2021-07-31T19:20:59.9842153Z docker: Error response from daemon: Head "https://308535385114.dkr.ecr.us-east-1.amazonaws.com/v2/tool/alpine/manifests/latest": no basic auth credentials.
2021-07-31T19:20:59.9843421Z See 'docker run --help'.
2021-07-31T19:20:59.9869272Z ##[error]Process completed with exit code 125.
2021-07-31T19:21:00.0007460Z Cleaning up orphan processes


1 job timed out:

  • pytorch_xla_linux_bionic_py3_6_clang9_test

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

BLAS library is found by cmake/Dependencies.cmake and then
LAPACK library is found by FindLAPACK.cmake which in turn calls
FindBLAS.cmake. This means that we are searching for BLAS twice
and they might be different things. By setting a few variables,
this can be avoided.
@codecov
Copy link

codecov bot commented Dec 19, 2020

Codecov Report

Merging #49647 (d42edce) into master (c0deb23) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #49647      +/-   ##
==========================================
- Coverage   41.55%   41.54%   -0.01%     
==========================================
  Files         503      503              
  Lines       68006    68006              
==========================================
- Hits        28258    28255       -3     
- Misses      39748    39751       +3     

@ngimel ngimel added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Dec 21, 2020
@isuruf
Copy link
Collaborator Author

isuruf commented Jul 25, 2021

It would be good to merge this for the conda-forge build.

cc @rgommers

Copy link
Collaborator

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks @isuruf, this looks good to me.

@malfet would you be able to land this?

Copy link
Contributor

@malfet malfet left a comment

Choose a reason for hiding this comment

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

LGTM, although it misses similar checks for Atlas and Eigen.

cmake/Dependencies.cmake Outdated Show resolved Hide resolved
@facebook-github-bot
Copy link
Contributor

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@isuruf
Copy link
Collaborator Author

isuruf commented Jul 28, 2021

LGTM, although it misses similar checks for Atlas and Eigen.

I added support for atlas. Eigen is not supported by cmake/Modules/FindBLAS.cmake

@rgommers
Copy link
Collaborator

rgommers commented Aug 2, 2021

This seems ready to land. The three CI failures are all unrelated (1 a connectivity issue, 2 timeouts)

@facebook-github-bot
Copy link
Contributor

@malfet has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@malfet merged this pull request in b58e04f.

malfet pushed a commit that referenced this pull request Feb 16, 2022
This reverts [suggestion](#49647 (comment)) proposed to #49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
facebook-github-bot pushed a commit that referenced this pull request Feb 16, 2022
Summary:
This reverts [suggestion](#49647 (comment)) proposed to #49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12

Test Plan: automation

Reviewed By: malfet

Differential Revision: D34273761

fbshipit-source-id: ba510d5a8ba3fbffe61135311f83a1d8e524d3d5
atalman added a commit to atalman/pytorch that referenced this pull request Feb 17, 2022
This reverts [suggestion](pytorch#49647 (comment)) proposed to pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 17, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 17, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 17, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 17, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 17, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
atalman added a commit that referenced this pull request Feb 17, 2022
)

This reverts [suggestion](#49647 (comment)) proposed to #49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 17, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 17, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 20, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 20, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 20, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
cyyever pushed a commit to cyyever/pytorch_private that referenced this pull request Feb 21, 2022
This reverts [suggestion](pytorch/pytorch#49647 (comment)) proposed to pytorch/pytorch#49647

Which is somehow sufficient to workaround symptoms of https://github.com/pytorch/pytorch/issue/72653 

I.e. before this change, `BLAS_LIBRARIES` were set to `caffe2::mkl`
which is an interface library with link property set as follows:
https://github.com/pytorch/pytorch/blob/59dd84cab6ede977173cd48d64abf1bcf6b2fabb/cmake/public/mkl.cmake#L10-L12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla signed Merged open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants