-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added logic to find sbgemm in BLAS library (#133)
- Loading branch information
1 parent
cb8d070
commit f0a070a
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
pytorch-2.1.2/recipe/0001-Fix-logic-to-find-sbgemm-in-BLAS-library.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
From c3246c9d7b3d9173d8419decd8a07ac25322b412 Mon Sep 17 00:00:00 2001 | ||
From: Aman Surkar <[email protected]> | ||
Date: Mon, 24 Jun 2024 10:58:18 +0000 | ||
Subject: [PATCH] Fix logic to find sbgemm in BLAS library | ||
|
||
--- | ||
cmake/Modules/FindBLAS.cmake | 20 ++++++++++---------- | ||
1 file changed, 10 insertions(+), 10 deletions(-) | ||
|
||
diff --git a/cmake/Modules/FindBLAS.cmake b/cmake/Modules/FindBLAS.cmake | ||
index 4d5007c625..5ca6c94988 100644 | ||
--- a/cmake/Modules/FindBLAS.cmake | ||
+++ b/cmake/Modules/FindBLAS.cmake | ||
@@ -385,16 +385,6 @@ IF (BLAS_LIBRARIES) | ||
cmake_pop_check_state() | ||
ENDIF(BLAS_LIBRARIES) | ||
|
||
-# Blas has bfloat16 support? | ||
-IF(BLAS_LIBRARIES) | ||
- SET(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES}) | ||
- check_function_exists("sbgemm_" BLAS_HAS_SBGEMM) | ||
- set(CMAKE_REQUIRED_LIBRARIES) | ||
- IF(BLAS_HAS_SBGEMM) | ||
- add_compile_options(-DBLAS_HAS_SBGEMM) | ||
- ENDIF(BLAS_HAS_SBGEMM) | ||
-ENDIF(BLAS_LIBRARIES) | ||
- | ||
# epilogue | ||
|
||
if(BLAS_LIBRARIES) | ||
@@ -416,3 +406,13 @@ ENDIF(NOT BLAS_FIND_QUIETLY) | ||
|
||
# Do nothing is BLAS was found before | ||
ENDIF(NOT BLAS_FOUND) | ||
+ | ||
+# Blas has bfloat16 support? | ||
+IF(BLAS_LIBRARIES) | ||
+ SET(CMAKE_REQUIRED_LIBRARIES ${BLAS_LIBRARIES}) | ||
+ check_function_exists("sbgemm_" BLAS_HAS_SBGEMM) | ||
+ set(CMAKE_REQUIRED_LIBRARIES) | ||
+ IF(BLAS_HAS_SBGEMM) | ||
+ add_compile_options(-DBLAS_HAS_SBGEMM) | ||
+ ENDIF(BLAS_HAS_SBGEMM) | ||
+ENDIF(BLAS_LIBRARIES) | ||
-- | ||
2.40.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters