Open qianwch opened 1 week ago
Agreed that this platform should be supported. What is the build error that you see without passing target-feature=+avx2,+fma
? I'm guessing your hardware does not have the expected SIMD support, but this shouldn't be required anyway, there are non-SIMD codepaths for everything.
Agreed that this platform should be supported. What is the build error that you see without passing
target-feature=+avx2,+fma
? I'm guessing your hardware does not have the expected SIMD support, but this shouldn't be required anyway, there are non-SIMD codepaths for everything.
It informs me to add the flags:
Compiling vectorscale v0.4.0 (pgvectorscale/pgvectorscale)
error: On x86, the AVX2 feature must be enabled. Set RUSTFLAGS="-C target-feature=+avx2,+fma"
--> src/access_method/distance.rs:5:1
|
5 | / compile_error!(
6 | | "On x86, the AVX2 feature must be enabled. Set RUSTFLAGS=\"-C target-feature=+avx2,+fma\""
7 | | );
| |_^
error: On x86, the AVX2 feature must be enabled. Set RUSTFLAGS="-C target-feature=+avx2,+fma"
--> src/access_method/distance_x86.rs:11:1
|
11 | / compile_error!(
12 | | "On x86, the AVX2 feature must be enabled. Set RUSTFLAGS=\"-C target-feature=+avx2,+fma\""
13 | | );
| |_^
error: On x86, the fma feature must be enabled. Set RUSTFLAGS="-C target-feature=+avx2,+fma"
--> src/access_method/distance_x86.rs:18:1
|
18 | / compile_error!(
19 | | "On x86, the fma feature must be enabled. Set RUSTFLAGS=\"-C target-feature=+avx2,+fma\""
20 | | );
| |_^
error: could not compile `vectorscale` (lib) due to 3 previous errors
@qianwch can you please provide the output of rustc --print cfg -C target-cpu=native
and also tell us your processor as found in [apple] -> "About This Mac" -> "processor" or "chip". Thanks.
rustc --print cfg -C target-cpu=native
$ rustc --print cfg -C target-cpu=native
debug_assertions
panic="unwind"
target_abi=""
target_arch="x86_64"
target_endian="little"
target_env=""
target_family="unix"
target_feature="aes"
target_feature="avx"
target_feature="avx2"
target_feature="bmi1"
target_feature="bmi2"
target_feature="cmpxchg16b"
target_feature="f16c"
target_feature="fma"
target_feature="fxsr"
target_feature="lzcnt"
target_feature="movbe"
target_feature="pclmulqdq"
target_feature="popcnt"
target_feature="rdrand"
target_feature="sse"
target_feature="sse2"
target_feature="sse3"
target_feature="sse4.1"
target_feature="sse4.2"
target_feature="ssse3"
target_feature="xsave"
target_feature="xsaveopt"
target_has_atomic="128"
target_has_atomic="16"
target_has_atomic="32"
target_has_atomic="64"
target_has_atomic="8"
target_has_atomic="ptr"
target_os="macos"
target_pointer_width="64"
target_vendor="apple"
unix
The CPU is intel i7 4 cores, 2.2 GHz
What happened?
I had to set RUSTFLAGS="-C target-feature=+avx2,+fma" to perform the build. But the building still failed:
pgvectorscale extension affected
0.4.0
PostgreSQL version used
16.4
What operating system did you use?
macOS 15.0.1
What installation method did you use?
Source
What platform did you run on?
Other
Relevant log output and stack trace
No response
How can we reproduce the bug?
Are you going to work on the bugfix?
🆘 No, could someone else please work on the bugfix?