pub struct TreeAttentionParams {
pub num_heads: u32,
pub num_kv_heads: u32,
pub head_dim: u32,
pub kv_seq_len: u32,
pub kv_capacity: u32,
pub scale: f32,
pub q_seq_len: u32,
pub mask_stride: u32,
}Expand description
Parameters for the tree-attention kernel.
Fields§
§num_heads: u32§num_kv_heads: u32§head_dim: u32§kv_seq_len: u32§kv_capacity: u32§scale: f32§q_seq_len: u32Number of tree nodes (queries) to verify in this dispatch.
mask_stride: u32Stride between rows of the mask buffer. Must be >= kv_seq_len.
Callers usually pass mask_stride == kv_seq_len for tight
packing; higher values are legal but waste memory.
Trait Implementations§
Source§impl Clone for TreeAttentionParams
impl Clone for TreeAttentionParams
Source§fn clone(&self) -> TreeAttentionParams
fn clone(&self) -> TreeAttentionParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TreeAttentionParams
Auto Trait Implementations§
impl Freeze for TreeAttentionParams
impl RefUnwindSafe for TreeAttentionParams
impl Send for TreeAttentionParams
impl Sync for TreeAttentionParams
impl Unpin for TreeAttentionParams
impl UnsafeUnpin for TreeAttentionParams
impl UnwindSafe for TreeAttentionParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more