| 21 | return lhs.type == rhs.type && lhs.device == rhs.device && lhs.threads == rhs.threads; |
| 22 | } |
| 23 | |
| 24 | S3TokenizerV2Weights::Conv1dWeights load_tokenizer_conv1d( |
| 25 | engine::core::BackendWeightStore & store, |
| 26 | const engine::assets::TensorSource & source, |
| 27 | const std::string & prefix, |
| 28 | int64_t out_channels, |
| 29 | int64_t in_channels, |
| 30 | int64_t kernel, |
| 31 | int64_t stride, |
| 32 | int64_t padding, |
| 33 | engine::assets::TensorStorageType weight_storage_type) { |
| 34 | S3TokenizerV2Weights::Conv1dWeights conv; |
| 35 | conv.out_channels = out_channels; |
| 36 | conv.in_channels = in_channels; |
| 37 | conv.kernel = kernel; |
| 38 | conv.stride = stride; |
| 39 | conv.padding = padding; |
| 40 | conv.weight_tensor = store.load_tensor(source, prefix + ".weight", weight_storage_type, {out_channels, in_channels, kernel}); |
| 41 | conv.bias_tensor = store.load_f32_tensor(source, prefix + ".bias", {out_channels}); |
| 42 | return conv; |
| 43 | } |
| 44 | |
| 45 | S3TokenizerV2Weights::LayerNormWeights load_tokenizer_layer_norm( |
no test coverage detected