From e966aafe9cf492456945c3c8112493e1df312262 Mon Sep 17 00:00:00 2001 From: Dirreke Date: Sat, 6 Apr 2024 20:40:12 +0800 Subject: [PATCH] Update OpenBLAS to version 0.3.27 --- openblas-build/Cargo.toml | 12 ++++++------ openblas-build/src/build.rs | 20 ++++++++++++++++++-- openblas-build/src/download.rs | 4 ++-- openblas-src/Cargo.toml | 2 +- openblas-src/build.rs | 4 ++-- 5 files changed, 29 insertions(+), 13 deletions(-) diff --git a/openblas-build/Cargo.toml b/openblas-build/Cargo.toml index 2d7727f..d97845e 100644 --- a/openblas-build/Cargo.toml +++ b/openblas-build/Cargo.toml @@ -12,14 +12,14 @@ readme = "../README.md" exclude = ["test_build/"] [dependencies] -anyhow = "1.0.68" -flate2 = "1.0.25" -tar = "0.4.38" -thiserror = "1.0.22" -ureq = { version = "2.5.0", default-features = false, features = [ +anyhow = "1.0.79" +flate2 = "1.0.28" +tar = "0.4.40" +thiserror = "1.0.56" +ureq = { version = "2.9.1", default-features = false, features = [ "native-certs", "native-tls", "gzip", ] } native-tls = { version = "0.2.11" } -walkdir = "2.3.1" +walkdir = "2.4.0" diff --git a/openblas-build/src/build.rs b/openblas-build/src/build.rs index 5be60d7..e0245b2 100644 --- a/openblas-build/src/build.rs +++ b/openblas-build/src/build.rs @@ -102,6 +102,7 @@ pub enum Target { CORTEXA57, CORTEXA72, CORTEXA73, + CORTEXA76, CORTEXA510, CORTEXA710, CORTEXX1, @@ -128,7 +129,10 @@ pub enum Target { // RISC-V 64: RISCV64_GENERIC, + RISCV64_ZVL128B, C910V, + x280, + RISCV64_ZVL236B, // LOONGARCH64: LOONGSONGENERIC, @@ -142,6 +146,10 @@ pub enum Target { EV4, EV5, EV6, + + // CSKY + CSKY, + CK860FV, } impl FromStr for Target { @@ -236,6 +244,7 @@ impl FromStr for Target { "cortexa57" => Self::CORTEXA57, "cortexa72" => Self::CORTEXA72, "cortexa73" => Self::CORTEXA73, + "cortexa76" => Self::CORTEXA76, "cortexa510" => Self::CORTEXA510, "cortexa710" => Self::CORTEXA710, "cortexx1" => Self::CORTEXX1, @@ -262,12 +271,15 @@ impl FromStr for Target { // RISC-V 64: "riscv64_generic" => Self::RISCV64_GENERIC, + "riscv64_zvl128B" => Self::RISCV64_ZVL128B, "c910v" => Self::C910V, + "x280" => Self::x280, + "riscv64_zvl236B" => Self::RISCV64_ZVL236B, // LOONGARCH64: "loongsongeneric" => Self::LOONGSONGENERIC, - "loongson3r5" => Self::LOONGSON3R5, - "loongson2k1000" => Self::LOONGSON2K1000, + "longson3r5" => Self::LOONGSON3R5, + "longson2k1000" => Self::LOONGSON2K1000, // Elbrus E2000: "e2k" => Self::E2K, @@ -277,6 +289,10 @@ impl FromStr for Target { "ev5" => Self::EV5, "ev6" => Self::EV6, + // CSKY + "csky" => Self::CSKY, + "ck860fv" => Self::CK860FV, + _ => { return Err(Error::UnsupportedTarget { target: s.to_string(), diff --git a/openblas-build/src/download.rs b/openblas-build/src/download.rs index 229c7f2..7eaaa6d 100644 --- a/openblas-build/src/download.rs +++ b/openblas-build/src/download.rs @@ -1,11 +1,11 @@ use anyhow::Result; use std::path::{Path, PathBuf}; -const OPENBLAS_VERSION: &str = "0.3.25"; +const OPENBLAS_VERSION: &str = "0.3.27"; pub fn openblas_source_url() -> String { format!( - "https://github.com/xianyi/OpenBLAS/releases/download/v{}/OpenBLAS-{}.tar.gz", + "https://github.com/OpenMathLib/OpenBLAS/releases/download/v{}/OpenBLAS-{}.tar.gz", OPENBLAS_VERSION, OPENBLAS_VERSION ) } diff --git a/openblas-src/Cargo.toml b/openblas-src/Cargo.toml index 56ae44f..227316e 100644 --- a/openblas-src/Cargo.toml +++ b/openblas-src/Cargo.toml @@ -36,7 +36,7 @@ system = [] libc = "0.2" [build-dependencies] -dirs = "3.0.1" +dirs = "5.0.1" openblas-build = { version = "0.10.9", path = "../openblas-build" } [target.'cfg(target_os="windows")'.build-dependencies] diff --git a/openblas-src/build.rs b/openblas-src/build.rs index 51df5c9..1587f32 100644 --- a/openblas-src/build.rs +++ b/openblas-src/build.rs @@ -140,9 +140,9 @@ fn build() { } let output = if feature_enabled("cache") { - use std::{collections::hash_map::DefaultHasher, hash::*}; + use std::hash::*; // Build OpenBLAS on user's data directory. - // See https://docs.rs/dirs/3.0.1/dirs/fn.data_dir.html + // See https://docs.rs/dirs/5.0.1/dirs/fn.data_dir.html // // On Linux, `data_dir` returns `$XDG_DATA_HOME` or `$HOME/.local/share`. // This build script creates a directory based on the hash value of `cfg`,