From 3c32e5934cb91163a63556008c1b98ee1d16dc05 Mon Sep 17 00:00:00 2001 From: laurent Date: Mon, 10 Jul 2023 13:43:30 +0100 Subject: [PATCH 1/2] Support for f16 hgemm. --- Cargo.toml | 4 ++++ src/lib.rs | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 6165dcef..7a81c239 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,3 +18,7 @@ keywords = ["linear-algebra"] [dependencies] libc = "0.2" +half = {version="2.3.1", optional=true} + +[features] +half = ["dep:half"] diff --git a/src/lib.rs b/src/lib.rs index f2206459..82f34f0e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1436,4 +1436,22 @@ extern "C" { b: *mut c_double_complex, ldb: *const c_int, ); + + // Half + #[cfg(feature = "half")] + pub fn hgemm_( + transa: *const c_char, + transb: *const c_char, + m: *const c_int, + n: *const c_int, + k: *const c_int, + alpha: *const half::f16, + a: *const half::f16, + lda: *const c_int, + b: *const half::f16, + ldb: *const c_int, + beta: *const half::f16, + c: *mut half::f16, + ldc: *const c_int, + ); } From e39c1063a265d0e822feb809475ae7541d27579a Mon Sep 17 00:00:00 2001 From: laurent Date: Mon, 10 Jul 2023 13:45:23 +0100 Subject: [PATCH 2/2] Bump the crate version. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7a81c239..28ad24e0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "blas-sys" -version = "0.7.1" +version = "0.7.2" license = "Apache-2.0/MIT" authors = [ "Andrew Straw ",