spark_model/layers/
ops.rs1#[path = "ops/activations.rs"]
15mod activations;
16#[path = "ops/derived_weights.rs"]
17mod derived_weights;
18#[path = "ops/dispatch_config.rs"]
19mod dispatch_config;
20#[cfg(test)]
21#[path = "ops/dispatch_config_routing_tests.rs"]
22mod dispatch_config_routing_tests;
23#[path = "ops/dispatch_helpers.rs"]
24mod dispatch_helpers;
25#[path = "ops/dispatch_proj.rs"]
26mod dispatch_proj;
27#[path = "ops/dispatch_proj_decode.rs"]
30mod dispatch_proj_decode;
31#[path = "ops/target_defaults.rs"]
35pub mod target_defaults;
36#[path = "ops/dispatch_proj_rowwise.rs"]
38mod dispatch_proj_rowwise;
39#[path = "ops/embeddings.rs"]
40mod embeddings;
41#[path = "ops/fp8_act_quant.rs"]
42mod fp8_act_quant;
43#[path = "ops/fp8_act_quant_floor.rs"]
47mod fp8_act_quant_floor;
48#[path = "ops/fp8_gemv_batch.rs"]
49mod fp8_gemv_batch;
50#[path = "ops/fp8_moe.rs"]
53mod fp8_moe;
54#[path = "ops/fp8_moe_batch_a.rs"]
55mod fp8_moe_batch_a;
56#[path = "ops/fp8_moe_batch_b.rs"]
57mod fp8_moe_batch_b;
58#[path = "ops/gdn_flashinfer.rs"]
59#[cfg(unix)]
64pub mod gdn_flashinfer;
65#[cfg(not(unix))]
66#[path = "ops/gdn_flashinfer_absent.rs"]
67pub mod gdn_flashinfer;
68#[path = "ops/dense_gemm_m16_bf16.rs"]
71mod dense_gemm_m16_bf16;
72#[path = "ops/gemm_dense.rs"]
73mod gemm_dense;
74#[path = "ops/gemm_dense_int8.rs"]
75mod gemm_dense_int8;
76#[path = "ops/gemm_fp4.rs"]
77mod gemm_fp4;
78#[path = "ops/model_stats.rs"]
79pub mod model_stats;
80#[path = "ops/w8a16_gemm_m16.rs"]
81mod w8a16_gemm_m16;
82#[path = "ops/w8a16_gemv_ncol.rs"]
85mod w8a16_gemv_ncol;
86pub use model_stats::ModelStats;
87
88#[path = "ops/gemm_fp8_prefill.rs"]
89mod gemm_fp8_prefill;
90#[path = "ops/gemm_quant.rs"]
91mod gemm_quant;
92#[path = "ops/gemv_q2.rs"]
93mod gemv_q2;
94#[path = "ops/gemv_q2_vec.rs"]
95mod gemv_q2_vec;
96#[path = "ops/gemv_sw.rs"]
97mod gemv_sw;
98#[path = "ops/glm5next_mhc.rs"]
101mod glm5next_mhc;
102#[path = "ops/hyper_connection.rs"]
103mod hyper_connection;
104#[path = "ops/hyper_connection_dispatch.rs"]
105mod hyper_connection_dispatch;
106#[path = "ops/hyper_connection_lowrank.rs"]
107mod hyper_connection_lowrank;
108#[cfg(test)]
109#[path = "ops/hyper_connection_lowrank_tests.rs"]
110mod hyper_connection_lowrank_tests;
111#[path = "ops/kv_cache.rs"]
112mod kv_cache;
113#[path = "ops/kv_cache_fp8k.rs"]
114mod kv_cache_fp8k;
115#[path = "ops/kv_cache_turbok.rs"]
116mod kv_cache_turbok;
117#[path = "ops/lora_delta.rs"]
118pub mod lora_delta;
119#[path = "ops/model_levers.rs"]
120mod model_levers;
121#[path = "ops/moe_atomic_c4.rs"]
122mod moe_atomic_c4;
123#[path = "ops/moe_expert.rs"]
124mod moe_expert;
125#[path = "ops/moe_expert_more.rs"]
126mod moe_expert_more;
127#[path = "ops/moe_gate.rs"]
128mod moe_gate;
129#[path = "ops/moe_grouped_a.rs"]
130mod moe_grouped_a;
131#[path = "ops/moe_grouped_a2.rs"]
132mod moe_grouped_a2;
133#[path = "ops/moe_grouped_b.rs"]
134mod moe_grouped_b;
135#[path = "ops/moe_grouped_fp4.rs"]
136mod moe_grouped_fp4;
137#[path = "ops/moe_lora_grouped.rs"]
138pub mod moe_lora_grouped;
139#[path = "ops/moe_prefill.rs"]
140mod moe_prefill;
141#[path = "ops/norm.rs"]
142mod norm;
143#[cfg(test)]
145#[path = "ops/kquant_fold_tests.rs"]
146mod kquant_fold_tests;
147mod kquant_mmq;
148#[cfg(test)]
149#[path = "ops/kquant_mmq_tests.rs"]
150mod kquant_mmq_tests;
151#[cfg(test)]
152#[path = "ops/norm_gated_rms_strided_tests.rs"]
153mod norm_gated_rms_strided_tests;
154mod nvfp4_mmq;
155#[path = "ops/ple.rs"]
156mod ple;
157#[cfg(test)]
158#[path = "ops/ple_tests.rs"]
159mod ple_tests;
160#[path = "ops/prefill_attn_a.rs"]
161mod prefill_attn_a;
162#[path = "ops/prefill_attn_b.rs"]
163mod prefill_attn_b;
164#[path = "ops/prefill_attn_batched.rs"]
165mod prefill_attn_batched;
166#[path = "ops/prefill_attn_fp8k.rs"]
167mod prefill_attn_fp8k;
168#[path = "ops/prefill_attn_main_a.rs"]
169mod prefill_attn_main_a;
170#[path = "ops/prefill_attn_main_b.rs"]
171mod prefill_attn_main_b;
172#[path = "ops/prefill_attn_turbok.rs"]
173mod prefill_attn_turbok;
174mod q2_0_mmq;
175mod q4k_mmq;
176#[path = "ops/qsa.rs"]
177mod qsa;
178#[path = "ops/quant_dispatch.rs"]
179mod quant_dispatch;
180#[path = "ops/sampling.rs"]
181mod sampling;
182#[path = "ops/ssm_ba_gates_hopper.rs"]
183mod ssm_ba_gates_hopper;
184#[path = "ops/ssm_gdn_a.rs"]
185mod ssm_gdn_a;
186#[path = "ops/ssm_gdn_a2.rs"]
187mod ssm_gdn_a2;
188#[path = "ops/ssm_gdn_a3.rs"]
189mod ssm_gdn_a3;
190#[path = "ops/ssm_gdn_b.rs"]
191mod ssm_gdn_b;
192#[path = "ops/ssm_gdn_batched.rs"]
193mod ssm_gdn_batched;
194#[path = "ops/ssm_gdn_hopper_prefill.rs"]
195mod ssm_gdn_hopper_prefill;
196#[path = "ops/ssm_gdn_snap.rs"]
197mod ssm_gdn_snap;
198#[path = "ops/ssm_gdn_tc_route.rs"]
199mod ssm_gdn_tc_route;
200#[path = "ops/ssm_gdn_woa.rs"]
201mod ssm_gdn_woa;
202#[path = "ops/ssm_gdn_wyn.rs"]
203mod ssm_gdn_wyn;
204#[path = "ops/ssm_mamba.rs"]
205mod ssm_mamba;
206#[path = "ops/ssm_preproc.rs"]
207mod ssm_preproc;
208#[path = "ops/ssm_ssd.rs"]
209mod ssm_ssd;
210pub mod token_overlay;
211#[cfg(test)]
216#[path = "ops/w8a16_gemv_hopper_tests.rs"]
217mod w8a16_gemv_hopper_tests;
218#[path = "ops/wide_prefill.rs"]
219mod wide_prefill;
220
221pub use activations::*;
222pub use dense_gemm_m16_bf16::*;
223pub use derived_weights::{Derivation, DerivedWeights};
224pub use dispatch_config::{CublasScope, GemmDispatch, parse_cublas_scope};
225pub use dispatch_helpers::*;
226pub use dispatch_proj::*;
227pub use dispatch_proj_decode::*;
228pub use dispatch_proj_rowwise::*;
229pub use embeddings::*;
230pub use fp8_act_quant::*;
231pub use fp8_act_quant_floor::*;
232pub use fp8_gemv_batch::*;
233pub use fp8_moe::*;
234pub use fp8_moe_batch_a::*;
235pub use fp8_moe_batch_b::*;
236pub use gemm_dense::*;
237pub use gemm_dense_int8::*;
238pub use gemm_fp4::*;
239pub use gemm_fp8_prefill::*;
240pub use gemm_quant::*;
241pub use gemv_q2::*;
242pub use gemv_q2_vec::*;
243pub use gemv_sw::*;
244pub use glm5next_mhc::*;
245pub use hyper_connection::*;
246pub use hyper_connection_dispatch::*;
247pub use hyper_connection_lowrank::*;
248pub use kquant_mmq::*;
249pub use kv_cache::*;
250pub use kv_cache_fp8k::*;
251pub use kv_cache_turbok::*;
252pub use model_levers::ModelLevers;
253pub use moe_atomic_c4::*;
254pub use moe_expert::*;
255pub use moe_expert_more::*;
256pub use moe_gate::*;
257pub use moe_grouped_a::*;
258pub use moe_grouped_a2::*;
259#[allow(unused_imports)]
260pub(crate) use moe_grouped_b::*;
261pub use moe_grouped_fp4::*;
262pub use moe_lora_grouped::*;
263pub use moe_prefill::*;
264pub use norm::*;
265pub use nvfp4_mmq::*;
266pub use ple::*;
267pub use prefill_attn_a::*;
268pub use prefill_attn_b::*;
269pub use prefill_attn_batched::*;
270pub use prefill_attn_fp8k::*;
271pub use prefill_attn_main_a::*;
272pub use prefill_attn_main_b::*;
273pub use prefill_attn_turbok::*;
274pub use q2_0_mmq::*;
275pub use q4k_mmq::*;
276pub use qsa::*;
277pub use quant_dispatch::*;
278pub use sampling::*;
279pub use ssm_ba_gates_hopper::*;
280pub use ssm_gdn_a::*;
281pub use ssm_gdn_a2::*;
282pub use ssm_gdn_a3::*;
283pub use ssm_gdn_b::*;
284pub use ssm_gdn_batched::*;
285pub(crate) use ssm_gdn_hopper_prefill::*;
286pub use ssm_gdn_snap::*;
287pub use ssm_gdn_tc_route::*;
288pub use ssm_gdn_woa::*;
289pub use ssm_gdn_wyn::*;
290pub use ssm_mamba::*;
291pub use ssm_preproc::*;
292pub use ssm_ssd::*;
293pub use w8a16_gemm_m16::*;
294pub use w8a16_gemv_ncol::*;
295pub use wide_prefill::*;