-
Notifications
You must be signed in to change notification settings - Fork 99
v7: ⬆️ 500 Kernels for Mixed Precision Numerics on CPUs #220
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
Open
ashvardanian
wants to merge
264
commits into
main
Choose a base branch
from
main-elementwise
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14fd5d3 to
18c41fd
Compare
This entry is largely unnecessary, and its computation in linearization procedure depends on the value at the previous dim, making it hard to parallelize with SIMD.
56f1a5d to
38df49c
Compare
Haswell was already pretty clean, but NEON and Skylake needed polishing
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It started as a straightforward optimization request from the @albumentations-team: to improve the special case of the
wsum(Weighted Sum) operation for the "non-weighted" scenario and to add APIs for scalar multiplication and addition. This update introduces new public APIs in both C and Python:scale: Implementssum: ComputesRecognizing the value of consistency with widely-used libraries, we’ve also added "aliases" aligned with names familiar to developers using NumPy and OpenCV for element-wise addition and multiplication across vectors and scalars:
np.addcv.addsimd.addnp.multiplycv.multiplysimd.multiplyThe real excitement came when we realized that larger projects would take time to adopt emerging numeric types like
bfloat16andfloat8, which are well-known in AI circles. To bridge this gap, SimSIMD now introduces anAnyTensortype designed for maximum interoperability via CPython's Buffer Protocol and beyond, setting it apart from similar types in NumPy, PyTorch, TensorFlow, and JAX.Tensor Class for C, Python, and Rust 🦀
Element-wise Operations 🧮
Reduced Range Trigonometry 📐
Geospatial Operations 🛰️
Breaking:
flush_denormalsfunctions becomeconfigure_threadand also enables AMX and SME.DistancesTensorin Python is replaced withNDArrayto match NumPy API.simsimd_distance_tuniformly.If you have any feedback regarding the limitations of current array-processing software in a single- or multi-node AI training settings, I am all ears 👂