For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo module
varlen_selective_scan
Variable-length selective scan kernels for Mamba SSM architecture.
comptime valuesβ
LOG2Eβ
comptime LOG2E = 1.4426950408889634
MAX_DSTATEβ
comptime MAX_DSTATE = 256
Strides1Dβ
comptime Strides1D = IndexList[1]
Strides2Dβ
comptime Strides2D = IndexList[2]
Strides3Dβ
comptime Strides3D = IndexList[3]
Strides4Dβ
comptime Strides4D = IndexList[4]
Functionsβ
- β
varlen_selective_scan_fwd_cpu: CPU kernel for variable-length selective scan. - β
varlen_selective_scan_fwd_gpu: GPU kernel for variable-length selective scan. - β
varlen_selective_state_update_cpu: CPU kernel for varlen selective state update. - β
varlen_selective_state_update_gpu: GPU kernel for selective state update with multi-head support.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!