hanzo-ml 0.11.19

Minimalist ML framework.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#version 450
// f16 -> f32 elementwise cast. Reverse of cast_f2h; converts fused-fp16 attention outputs back to f32.
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : require
#extension GL_EXT_shader_16bit_storage : require
layout(local_size_x = 64) in;
layout(set = 0, binding = 0) readonly  buffer In  { float16_t src[]; };
layout(set = 0, binding = 1) writeonly buffer Out { float     dst[]; };
layout(push_constant) uniform Pc { uint n; };
void main() {
    uint i = gl_GlobalInvocationID.x;
    if (i < n) {
        dst[i] = float(src[i]);
    }
}