File size: 597 Bytes
3fd1a35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <cstddef>
#include <cstdint>

namespace ling3 {

float BFloat16ToFloat(std::uint16_t value) noexcept;
std::uint16_t FloatToBFloat16(float value) noexcept;
void RmsNorm(const float * input, const float * weight, float * output, std::size_t count, float epsilon) noexcept;
void SiluMultiply(const float * gate, const float * up, float * output, std::size_t count) noexcept;
void Silu(const float * input, float * output, std::size_t count) noexcept;
void WeightedAccumulate(const float * input, float weight, float * output, std::size_t count) noexcept;

} // namespace ling3