Skip to content

Commit

Permalink
[openblas] update to 0.3.20 (#24546)
Browse files Browse the repository at this point in the history
* update openblas

* verison stuff

* Remove ci.baseline.txt entries obsoleted by "supports" expression.

Co-authored-by: Alexander Neumann <you@example.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
  • Loading branch information
3 people committed May 5, 2022
1 parent 43a8bad commit 0e11392
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 134 deletions.
124 changes: 0 additions & 124 deletions ports/openblas/fix-uwp-build.patch
Original file line number Diff line number Diff line change
Expand Up @@ -33,127 +33,3 @@ index 3e98dba..ee597f7 100644
// cgemv_t.S return NaN if there are NaN or Inf in the buffer (see bug #746)
if(trans && stack_alloc_size)
memset(buffer, 0, MIN(BUFFER_SIZE, sizeof(FLOAT) * buffer_size));

--- a/driver/others/CMakeLists.txt
+++ b/driver/others/CMakeLists.txt
@@ -1,20 +1,23 @@
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_BINARY_DIR})
+if(WIN32)
+ add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
+endif()

if (${CORE} STREQUAL "PPC440")
set(MEMORY memory_qalloc.c)
else ()
set(MEMORY memory.c)
endif ()

if (USE_THREAD)

if (USE_OPENMP)
set(BLAS_SERVER blas_server_omp.c)
- elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+ elseif (WIN32)
set(BLAS_SERVER blas_server_win32.c)
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "WindowsStore")
set(BLAS_SERVER blas_server_win32.c)
endif ()

if (NOT DEFINED BLAS_SERVER)

--- a/cmake/os.cmake
+++ b/cmake/os.cmake
@@ -15,13 +15,13 @@

if (${CMAKE_SYSTEM_NAME} STREQUAL "AIX")
set(EXTRALIB "${EXTRALIB} -lm")
endif ()

# TODO: this is probably meant for mingw, not other windows compilers
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+if (WIN32)

set(NEED_PIC 0)
set(NO_EXPRECISION 1)

set(EXTRALIB "${EXTRALIB} -defaultlib:advapi32")

@@ -66,13 +66,13 @@

if (CYGWIN)
set(NEED_PIC 0)
set(NO_EXPRECISION 1)
endif ()

-if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Interix" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
+if (NOT WIN32 AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Interix" AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Android")
if (USE_THREAD)
set(EXTRALIB "${EXTRALIB} -lpthread")
endif ()
endif ()

if (QUAD_PRECISION)

--- a/cmake/system.cmake
+++ b/cmake/system.cmake
@@ -422,22 +422,22 @@
endif ()

if (USE_SIMPLE_THREADED_LEVEL3)
set(CCOMMON_OPT "${CCOMMON_OPT} -DUSE_SIMPLE_THREADED_LEVEL3")
endif ()

-if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+if (NOT WIN32)
if (DEFINED MAX_STACK_ALLOC)
if (NOT ${MAX_STACK_ALLOC} EQUAL 0)
set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=${MAX_STACK_ALLOC}")
endif ()
else ()
set(CCOMMON_OPT "${CCOMMON_OPT} -DMAX_STACK_ALLOC=2048")
endif ()
endif ()
-if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+if (NOT WIN32)
if (DEFINED BLAS3_MEM_ALLOC_THRESHOLD)
if (NOT ${BLAS3_MEM_ALLOC_THRESHOLD} EQUAL 32)
set(CCOMMON_OPT "${CCOMMON_OPT} -DBLAS3_MEM_ALLOC_THRESHOLD=${BLAS3_MEM_ALLOC_THRESHOLD}")
endif()
endif()
endif()
@@ -544,13 +544,13 @@

#For LAPACK Fortran codes.
set(LAPACK_FFLAGS "${LAPACK_FFLAGS} ${CMAKE_Fortran_FLAGS}")
set(LAPACK_FPFLAGS "${LAPACK_FPFLAGS} ${FPFLAGS}")

#Disable -fopenmp for LAPACK Fortran codes on Windows.
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+if (NOT WIN32)
set(FILTER_FLAGS "-fopenmp;-mp;-openmp;-xopenmp=parallel")
foreach (FILTER_FLAG ${FILTER_FLAGS})
string(REPLACE ${FILTER_FLAG} "" LAPACK_FFLAGS ${LAPACK_FFLAGS})
string(REPLACE ${FILTER_FLAG} "" LAPACK_FPFLAGS ${LAPACK_FPFLAGS})
endforeach ()
endif ()
@@ -562,17 +562,17 @@

set(LAPACK_CFLAGS "${CMAKE_C_CFLAGS} -DHAVE_LAPACK_CONFIG_H")
if (INTERFACE64)
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DLAPACK_ILP64")
endif ()

-if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+if (WIN32)
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DOPENBLAS_OS_WINDOWS")
endif ()

-if (${CMAKE_C_COMPILER} STREQUAL "LSB" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
+if (${CMAKE_C_COMPILER} STREQUAL "LSB" OR WIN32)
set(LAPACK_CFLAGS "${LAPACK_CFLAGS} -DLAPACK_COMPLEX_STRUCTURE")
endif ()

if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
if ("${F_COMPILER}" STREQUAL "FLANG")
if (${CMAKE_Fortran_COMPILER_VERSION} VERSION_LESS_EQUAL 3)
8 changes: 4 additions & 4 deletions ports/openblas/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO xianyi/OpenBLAS
REF 2480e5046e3b0120da8a7fd1442eca628df55f87 # v0.3.19
SHA512 b85a96c8cd75bf7197732f3b923b8b0ffdc6261d7d6dc7b622d4bf24f061d02273ad99571cabe4686d92f77ff8e6f7e2de0851758cbb3c529d7c2ca96a0bc34d
REF 0b678b19dc03f2a999d6e038814c4c50b9640a4e # v0.3.20
SHA512 6e32f7dfc5dde46570873810c1da09d102f76ccfce41a5adbaeef2fccada54f9ab07e1ee541a6d55e138e6500392a6f55236f4f3a7766803358e5a6205334946
HEAD_REF develop
PATCHES
uwp.patch
Expand Down Expand Up @@ -36,8 +36,7 @@ set(COMMON_OPTIONS -DBUILD_WITHOUT_LAPACK=ON)

if(VCPKG_TARGET_IS_OSX)
if("dynamic-arch" IN_LIST FEATURES)
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
message(STATUS "Openblas with \"dynamic-arch\" option for OSX supports only dynamic linkage. It's not a bag of openblas but bug of combination cmake+ninja+osx. See: https://gitlab.kitware.com/cmake/cmake/-/issues/16731")
set(conf_opts GENERATOR "Unix Makefiles")
endif()
endif()

Expand All @@ -58,6 +57,7 @@ endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
${conf_opts}
OPTIONS
${FEATURE_OPTIONS}
${COMMON_OPTIONS}
Expand Down
5 changes: 3 additions & 2 deletions ports/openblas/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "openblas",
"version": "0.3.19",
"port-version": 1,
"version": "0.3.20",
"description": "OpenBLAS is an optimized BLAS library based on GotoBLAS2 1.13 BSD version.",
"homepage": "https://github.com/xianyi/OpenBLAS",
"license": "BSD-3-Clause",
"supports": "!(windows & arm)",
"dependencies": [
{
"name": "openblas",
Expand Down
2 changes: 0 additions & 2 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,6 @@ ompl:x64-osx=fail
ompl:x64-linux=fail
openal-soft:arm-uwp=fail
openal-soft:x64-uwp=fail
openblas:arm64-windows=fail
openblas:arm-uwp=fail
# opencc/deps/rapidjson-1.1.0/rapidjson.h: Unknown machine endianess detected
opencc:arm64-windows=fail
# opencc/deps/marisa-0.2.5/lib/marisa/grimoire/io/mapper.cc currently doesn't support UWP.
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -5057,8 +5057,8 @@
"port-version": 5
},
"openblas": {
"baseline": "0.3.19",
"port-version": 1
"baseline": "0.3.20",
"port-version": 0
},
"opencascade": {
"baseline": "7.6.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/o-/openblas.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "abd8d8b0d0286d963399d79e3e8b6f7f8e12117b",
"version": "0.3.20",
"port-version": 0
},
{
"git-tree": "90e2cde7fda025b587d6c41e699c98c263cf41eb",
"version": "0.3.19",
Expand Down

0 comments on commit 0e11392

Please sign in to comment.