Pass WITH_BLAS option from environment to CMake (#78037)

Allows to choose the BLAS backend with Eigen. Previously this was a CMake option only and the env variable was ignored.

Related to f1f3c8b0fa

The claimed options BLAS=BLIS WITH_BLAS=blis are misleading: When BLAS=BLIS is set the WITH_BLAS option does not matter at all, it would only matter for BLAS=Eigen hence this issue went undetected so far.

Supersedes #59220
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78037
Approved by: https://github.com/adamjstewart, https://github.com/janeyx99
This commit is contained in:
Alexander Grund
2022-05-25 13:38:41 +00:00
committed by PyTorch MergeBot
parent 589f40e3ad
commit d5f99581b5

View File

@ -282,6 +282,7 @@ class CMake:
var: var
for var in (
"BLAS",
"WITH_BLAS",
"BUILDING_WITH_TORCH_LIBS",
"CUDA_HOST_COMILER",
"CUDA_NVCC_EXECUTABLE",