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

[1.11.2] Added logic to find sbgemm in BLAS library #133

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <Aman.Surkar@ibm.com>
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

1 change: 1 addition & 0 deletions pytorch-2.1.2/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ source:
- 0310-PR100149.patch #[ppc_arch == "p10"]
- 0311-PR104956.patch # [ppc64le]
- 0312-Disabled-Wno-error-flag-for-p10.patch #[ppc_arch == "p10"]
- 0001-Fix-logic-to-find-sbgemm-in-BLAS-library.patch #[ppc_arch == "p10"]

requirements:
build:
Expand Down
Loading