Archived
rope builds its frequency ladder on the host per launch exactly as libref's rope_freqs does (a double pow, then YaRN or llama3 from rad_yarn.h) and takes cos and sin of the f32 angle in double on the card, as libref does; positions reach 131072 at MiniCPM5's context. neox and gptj with one position component; the row says so with a mode constraint and the launch refuses anything else by name. The gathers write a zero row for an index outside the table, libr4d's rule: libref instead checks every index on the host before running, which a launch cannot do without waiting on its stream. rad-kbench against libref: fixture 127/127 and MiniCPM5-2B 94/94, rel_l2 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018EpFgqQidSnH8zo7boVZC1
20 lines
588 B
C++
20 lines
588 B
C++
/* xe2_ops.h -- every libxe2 launch, by op. The rows that select them are in xe2_rows.cpp. */
|
|
#pragma once
|
|
#include "rad_abi.h"
|
|
|
|
namespace xe2 {
|
|
|
|
int add(const RadArgs* a, RadStream s);
|
|
|
|
int rmsnorm(const RadArgs* a, RadStream s);
|
|
int rmsnorm_quant_fp8(const RadArgs* a, RadStream s);
|
|
int quant_act_fp8(const RadArgs* a, RadStream s);
|
|
int gated_quant_fp8(const RadArgs* a, RadStream s);
|
|
|
|
int rope(const RadArgs* a, RadStream s);
|
|
int embed_lookup(const RadArgs* a, RadStream s);
|
|
int gather_rows(const RadArgs* a, RadStream s);
|
|
int cast(const RadArgs* a, RadStream s);
|
|
|
|
} // namespace xe2
|