MCPcopy Create free account
hub / github.com/ml-explore/mlx / dispatch_quantize

Function dispatch_quantize

mlx/backend/cpu/quantized.cpp:1214–1227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1212
1213template <typename T, typename U>
1214void dispatch_quantize(
1215 const array& w,
1216 array& out,
1217 array& scales,
1218 array& biases,
1219 int bits,
1220 int group_size) {
1221 auto w_ptr = w.data<T>();
1222 auto out_ptr = out.data<U>();
1223 auto scales_ptr = scales.data<T>();
1224 auto biases_ptr = biases.data<T>();
1225 quantize<T, U>(
1226 w_ptr, out_ptr, scales_ptr, biases_ptr, bits, group_size, w.size());
1227}
1228
1229void fast::Quantize::eval_cpu(
1230 const std::vector<array>& inputs,

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected