0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::gpt: Simplify aperature unions.

This commit is contained in:
Jason Volk 2022-01-07 11:03:11 -08:00
parent c92e97f02a
commit d844ec895c

View file

@ -51,11 +51,9 @@ struct ircd_gpt_attn_qkvv
union ircd_gpt_attn_aperature
{
float
word[768],
fcon[2304],
proj[3][768],
qkv[3][12][64],
attn[12][64];
qkv[3][12][64];
union ircd_gpt_token
token[3];
@ -65,13 +63,33 @@ union ircd_gpt_attn_aperature
union ircd_gpt_attn_aperaturev
{
float4
word[768/4],
fcon[2304/4],
proj[3][768/4],
qkv[3][12][64/4],
attn[12][64/4];
qkv[3][12][64/4];
union ircd_gpt_tokenv
union ircd_gpt_token_f32x4
token[3];
};
union ircd_gpt_attn_aperature_f32x8
{
float8
fcon[2304/8],
proj[3][768/8],
qkv[3][12][64/8];
union ircd_gpt_token_f32x8
token[3];
};
union ircd_gpt_attn_aperature_f32x16
{
float16
fcon[2304/16],
proj[3][768/16],
qkv[3][12][64/16];
union ircd_gpt_token_f32x16
token[3];
};
#endif
@ -79,7 +97,6 @@ union ircd_gpt_attn_aperaturev
union ircd_gpt_ffnn_aperature
{
float
word[768],
fcon[3072],
proj[4][768];
@ -91,11 +108,30 @@ union ircd_gpt_ffnn_aperature
union ircd_gpt_ffnn_aperaturev
{
float4
word[768/4],
fcon[3072/4],
proj[4][768/4];
union ircd_gpt_tokenv
union ircd_gpt_token_f32x4
token[4];
};
union ircd_gpt_ffnn_aperature_f32x8
{
float8
fcon[3072/8],
proj[4][768/8];
union ircd_gpt_token_f32x4
token[4];
};
union ircd_gpt_ffnn_aperature_f32x16
{
float16
fcon[3072/16],
proj[4][768/16];
union ircd_gpt_token_f32x4
token[4];
};
#endif