libmir-metal 0.3.0

Metal inference backend for libmir
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use models::weights::TensorBinding;

use super::{ModelTensors, NormWeight, Result, Stream};

mod projection;

pub(super) use projection::{BoundEmbedding, BoundLinear};

pub(super) fn adjusted_norm(
    tensors: &ModelTensors,
    binding: &TensorBinding,
    shift: f32,
    stream: &Stream,
) -> Result<NormWeight> {
    NormWeight::load_name_adjusted(tensors, &binding.source, shift, stream)
}