postgresqlPackages.vectorchord: disable avx512vnni support (#538998)
This commit is contained in:
@@ -37,6 +37,10 @@
|
||||
hash = "sha256-+BOuiinbKPZZaDl9aYsIoZPgvLZ4FA6Rb4/W+lAz4so=";
|
||||
};
|
||||
|
||||
# Remove the patches currently used for vectorchord 1.1.1,
|
||||
# as vectorchord 1.0.0 does not need them.
|
||||
patches = [ ];
|
||||
|
||||
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
|
||||
inherit (finalAttrs) src;
|
||||
hash = "sha256-kwe2x7OTjpdPonZsvnR1C/89D5W/R5JswYF79YcSFEA=";
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
diff --git a/crates/simd/src/byte.rs b/crates/simd/src/byte.rs
|
||||
index 0c7c4be..87737d4 100644
|
||||
--- a/crates/simd/src/byte.rs
|
||||
+++ b/crates/simd/src/byte.rs
|
||||
@@ -389,7 +389,7 @@ mod reduce_sum_of_xy {
|
||||
}
|
||||
}
|
||||
|
||||
- #[crate::multiversion(@"v4:avx512vnni", @"v4", @"v3", @"v2", @"a2:dotprod", @"a2", "z17", "z16", "z15", "z14", "z13", "p9", "p8", "p7", "r1")]
|
||||
+ #[crate::multiversion(@"v4", @"v3", @"v2", @"a2:dotprod", @"a2", "z17", "z16", "z15", "z14", "z13", "p9", "p8", "p7", "r1")]
|
||||
pub fn reduce_sum_of_xy(s: &[u8], t: &[u8]) -> u32 {
|
||||
assert_eq!(s.len(), t.len());
|
||||
let n = s.len();
|
||||
diff --git a/crates/simd/src/halfbyte.rs b/crates/simd/src/halfbyte.rs
|
||||
index e1aa016..f7dc3dc 100644
|
||||
--- a/crates/simd/src/halfbyte.rs
|
||||
+++ b/crates/simd/src/halfbyte.rs
|
||||
@@ -411,7 +411,7 @@ mod reduce_sum_of_xy {
|
||||
}
|
||||
}
|
||||
|
||||
- #[crate::multiversion(@"v4:avx512vnni", @"v4", @"v3", @"v2", @"a2:dotprod", @"a2", "z17", "z16", "z15", "z14", "z13", "p9", "p8", "p7", "r1")]
|
||||
+ #[crate::multiversion(@"v4", @"v3", @"v2", @"a2:dotprod", @"a2", "z17", "z16", "z15", "z14", "z13", "p9", "p8", "p7", "r1")]
|
||||
pub fn reduce_sum_of_xy(s: &[u8], t: &[u8]) -> u32 {
|
||||
assert_eq!(s.len(), t.len());
|
||||
let n = s.len();
|
||||
--
|
||||
2.54.0
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
nix-update-script,
|
||||
postgresql,
|
||||
postgresqlTestExtension,
|
||||
rustc,
|
||||
stdenv,
|
||||
}:
|
||||
buildPgrxExtension (finalAttrs: {
|
||||
inherit postgresql;
|
||||
@@ -23,6 +25,17 @@ buildPgrxExtension (finalAttrs: {
|
||||
|
||||
cargoHash = "sha256-IXOCzKJArNOcb/2TcJbLz1XdCquUpyF/cLHYU5vmlko=";
|
||||
|
||||
patches = lib.optional (lib.versionOlder rustc.llvm.version "22.0.0" && stdenv.isx86_64) [
|
||||
# Due to a bug in LLVM 21, build fails on x86_64 with:
|
||||
# `rustc-LLVM ERROR: Cannot select: intrinsic %llvm.x86.avx512.vpdpbusd.512`.
|
||||
# This has been fixed in Rust's build of LLVM and LLVM 22 with https://github.com/rust-lang/llvm-project/commit/94e2c19f86a699d7a19ff0f4130b696699189c8d,
|
||||
# but this is not reflected in nixpkgs' packaging of rustc.
|
||||
# For this reason, we temporarily disable avx512vnni support until this is fixed in nixpkgs.
|
||||
# This might cause a performance penalty, but should not affect correctness.
|
||||
# See https://github.com/NixOS/nixpkgs/pull/537113#issuecomment-4846239887
|
||||
./0001-disable-avx512vnni.patch
|
||||
];
|
||||
|
||||
# Include upgrade scripts in the final package
|
||||
# https://github.com/supervc-stack/VectorChord/blob/0.5.0/crates/make/src/main.rs#L366
|
||||
postInstall = ''
|
||||
|
||||
Reference in New Issue
Block a user