When openblas exists, "OpenBLAS_FOUND" is defined, rather than "OPENBLAS_FOUND"....
authorHE, Tao <sighingnow@gmail.com>
Sun, 10 Mar 2019 16:21:13 +0000 (09:21 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 10 Mar 2019 16:34:50 +0000 (09:34 -0700)
Summary:
See https://github.com/pytorch/pytorch/blob/master/cmake/Modules/FindOpenBLAS.cmake#L36

This typo lead to cmake fails to detect openblas on ubuntu.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17841

Differential Revision: D14400261

Pulled By: soumith

fbshipit-source-id: 287e019e122230cf6b70ab1ea94e5c514f429c88

cmake/Dependencies.cmake

index 690f251..297eacb 100644 (file)
@@ -133,7 +133,7 @@ if (NOT BUILD_ATEN_MOBILE)
   set(AT_MKL_ENABLED 0)
   set(AT_MKL_MT 0)
   set(USE_BLAS 1)
-  if(NOT (ATLAS_FOUND OR OPENBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND))
+  if(NOT (ATLAS_FOUND OR OpenBLAS_FOUND OR MKL_FOUND OR VECLIB_FOUND))
     message(WARNING "Preferred BLAS (" ${BLAS} ") cannot be found, now searching for a general BLAS library")
     find_package(BLAS)
     if (NOT BLAS_FOUND)