Files
luo jiyin 9a22905fb7 perf(engine): add blocked AVX2 int8 linear kernel (#608)
Reuse each widened weight chunk across up to four activation rows.

Use a scalar path when the CPU lacks AVX2 or FMA.
The blocked kernel reduces scoring time for both locked models.
Keep a focused test for row blocks, input tails, and optional bias.
2026-10-04 00:06:38 +08:00

18 lines
364 B
C++

#pragma once
#include <cstddef>
#include <cstdint>
namespace neural
{
namespace detail
{
bool supports_avx2_fma();
void linear_int8_avx2(const float *x, const std::int8_t *weights, const float *scales, const float *bias,
std::size_t rows, std::size_t inputs, std::size_t outputs, float *out);
} // namespace detail
} // namespace neural