Skip to content

Commit

Permalink
Use Eigen blas for custom sdpa (pytorch#6229)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#6229

OpenBlas's implementation is not thread safe. Thus when used within
parallel_for, it produces incorrect output. This has been documented in a few
places like here OpenMathLib/OpenBLAS#1441 and
OpenMathLib/OpenBLAS#2543.

I tried few options to disable openblas's multithreading but none of them
seemed to work.

It is possible that upstream openblas has fixed this. Will validate this by
pulling in latest, but in the meanwhile using eigen_blas to unblock.
ghstack-source-id: 248095356
exported-using-ghexport

Reviewed By: cccclai

Differential Revision: D64398816

fbshipit-source-id: 46f2d10855007e35e5d6fb925e494f12330978fa
  • Loading branch information
kimishpatel authored and facebook-github-bot committed Oct 15, 2024
1 parent 96ecf78 commit 97a1965
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernels/optimized/lib_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def define_libs():
(
"^android-arm64.*$",
[
"fbsource//third-party/openblas:openblas",
"fbsource//arvr/third-party/eigen:eigen3_blas",
],
),
],
Expand Down

0 comments on commit 97a1965

Please sign in to comment.