Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: usearch crashes on Windows Python 3.12.3 for v2.15.1 #491

Open
3 tasks done
genotrance opened this issue Sep 13, 2024 · 6 comments
Open
3 tasks done

Bug: usearch crashes on Windows Python 3.12.3 for v2.15.1 #491

genotrance opened this issue Sep 13, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@genotrance
Copy link

Describe the bug

usearch is crashing Python script on adding embeddings to the database. Last working version on Windows is v2.12. Crash is seen since 2.13+ to the latest version.

Same steps work on Linux for latest version, tested with Python 3.12 and 3.10.

Steps to reproduce

# embeddings = List[List[float]]
index = usearch.index.Index(ndim=len(embeddings[0]), dtype="f32")
index.add(idx, embedding)

usearch simply exits on the third line. There is no stack trace, error or crash.

Expected behavior

Embeddings should get added to the database.

USearch version

v2.13+

Operating System

Windows

Hardware architecture

x86

Which interface are you using?

Python bindings

Contact Details

No response

Are you open to being tagged as a contributor?

  • I am open to being mentioned in the project .git history as a contributor

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@genotrance genotrance added the bug Something isn't working label Sep 13, 2024
@ashvardanian
Copy link
Contributor

@genotrance, can you please provide more details on the environment - like the CPU model?

@genotrance
Copy link
Author

This is a Win11 laptop with an i7-1265U.

Platform: Windows-11-10.0.22621-SP0
Python version: 3.12.3 (tags/v3.12.3:f6650f9, Apr  9 2024, 14:05:25) [MSC v.1938 64 bit (AMD64)]
Architecture: ('64bit', 'WindowsPE')

@ashvardanian
Copy link
Contributor

@genotrance, can you please also log this:

index.hardware_acceleration

@genotrance
Copy link
Author

With 2.12, I got the output serial. On 2.15.1, I got haswell.

@ashvardanian
Copy link
Contributor

ashvardanian commented Sep 13, 2024

@genotrance, the haswell label makes sense, as your CPU supports AVX2. Does the issue persist if you try some other dtype in the constructor, like f16 and bf16?

@genotrance
Copy link
Author

I tried f16 and bf16 and both crashed. I was adding as below:

import usearch.index
i = usearch.index.Index(ndim=2, dtype="f16") # or bf16
i.add(1, np.array([[0.1, 0.2]], dtype="float16"))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants