ashvardanian / SimSIMD

Up to 200x Faster Inner Products and Vector Similarity — for Python, JavaScript, Rust, C, and Swift, supporting f64, f32, f16 real & complex, i8, and binary vectors using SIMD for both x86 AVX2 & AVX-512 and Arm NEON & SVE 📐
https://ashvardanian.com/posts/simsimd-faster-scipy/
Apache License 2.0
797 stars 42 forks source link

Golang: '_Float16' is not supported on this target #71

Closed corani closed 5 months ago

corani commented 5 months ago

After fixing the a few issues (#70) I'm getting the following error:

$ go test
# github.com/ashvardanian/simsimd/golang
In file included from ./../include/simsimd/binary.h:23,
                 from ./../include/simsimd/simsimd.h:21,
                 from ./simsimd.go:6:
./../include/simsimd/types.h:119:9: error: '_Float16' is not supported on this target
  119 | typedef _Float16 simsimd_f16_t;
      |         ^~~~~~~~
FAIL    github.com/ashvardanian/simsimd/golang [build failed]
corani commented 5 months ago

I've temporarily hacked around it by setting SIMSIMD_NATIVE_F16 0 in https://github.com/ashvardanian/SimSIMD/blob/main/include/simsimd/types.h#L120, but obviously that isn't the right solution. With that (and the changes in #70) it seems to work.

I have too little experience with C to fix it properly though.

ashvardanian commented 5 months ago

@corani, thank you for the issue and the PR 🤗 That one is patched, and this will be fixed with the next release.

corani commented 5 months ago

@ashvardanian your change works, but I'm wondering if the problem isn't in the type support detection. Maybe it's just something on my system?

ashvardanian commented 5 months ago

:tada: This issue has been resolved in version 3.7.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: