leleka-cpu-sys holds the C kernels (one translation unit per ISA level, built by build.rs with cc) behind a checked FFI; it is the only unsafe code of the CPU runtime and opts out of the workspace unsafe_code lint with a recorded exception. leleka-cpu-kernels does safe run-time dispatch with a LELEKA_CPU_ISA override that fails rather than silently changing level. Ports the int8xint8 and int4xint8 dot products from Colibri c/idot.h at scalar, AVX2 and AVX-VNNI. Tests compare every level with the C scalar kernel and an independent i64 oracle (13 tests; Windows MSVC and Linux GCC 14.2). Activations must be in [-127, 127]: -128 is outside the contract and a test pins that. No performance claim: nothing was timed. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
18 lines
673 B
Plaintext
18 lines
673 B
Plaintext
colibri
|
|
Copyright 2026 Vincenzo Fornaro
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
|
|
Third-party components bundled with this software and their licenses
|
|
are listed in THIRD_PARTY_NOTICES.md.
|