File tree Expand file tree Collapse file tree
pgvectorscale/src/access_method Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6464 id : runtests
6565 run : |
6666 cd pgvectorscale
67- ls
68- ${{ matrix.platform.rustflags != '' && format('RUSTFLAGS="{0}"', matrix.platform.rustflags) || '' }} cargo pgrx test -- pg${{ matrix.pg.major }}
67+ ${{ matrix.platform.rustflags != '' && format('export RUSTFLAGS="{0}"', matrix.platform.rustflags) || '' }}
68+ cargo pgrx test -- pg${{ matrix.pg.major }}
Original file line number Diff line number Diff line change 11/* we use the avx2 version of x86 functions. This verifies that's kosher */
22#[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
33#[ cfg( not( target_feature = "avx2" ) ) ]
4+ #[ cfg( not( doc) ) ]
45compile_error ! (
56 "On x86, the AVX2 feature must be enabled. Set RUSTFLAGS=\" -C target-feature=+avx2,+fma\" "
67) ;
78
89pub fn init ( ) {
910 #[ cfg( any( target_arch = "x86" , target_arch = "x86_64" ) ) ]
10- if ( !is_x86_feature_detected ! ( "avx2" ) || !is_x86_feature_detected ! ( "fma" ) ) {
11+ if !is_x86_feature_detected ! ( "avx2" ) || !is_x86_feature_detected ! ( "fma" ) {
1112 panic ! ( "On x86, pgvectorscale requires the CPU to support AVX2 and FMA. See https://github.com/timescale/pgvectorscale/issues/115" ) ;
1213 }
1314}
Original file line number Diff line number Diff line change @@ -7,12 +7,14 @@ use simdeez::sse41::*;
77use simdeez:: avx2:: * ;
88
99#[ cfg( not( target_feature = "avx2" ) ) ]
10+ #[ cfg( not( doc) ) ]
1011compile_error ! (
1112 "On x86, the AVX2 feature must be enabled. Set RUSTFLAGS=\" -C target-feature=+avx2,+fma\" "
1213) ;
1314
1415//note: without fmadd, the performance degrades pretty badly. Benchmark before disbaling
1516#[ cfg( not( target_feature = "fma" ) ) ]
17+ #[ cfg( not( doc) ) ]
1618compile_error ! (
1719 "On x86, the fma feature must be enabled. Set RUSTFLAGS=\" -C target-feature=+avx2,+fma\" "
1820) ;
You can’t perform that action at this time.
0 commit comments