Skip to content

Commit fdba0fe

Browse files
committed
chore: refactor Triton kernels for improved readability and performance
- Updated `causal_linear_attention_kernel` in `attention.py` to enhance code clarity by restructuring parameter lists and adding comments. - Modified `rate_encoding_kernel` in `encoding.py` for better organization and readability, including adjustments to the random value generation logic. - Refined `linear_lif_fwd_kernel` in `linear_lif.py` to improve the clarity of matrix operations and voltage updates, ensuring better maintainability. - Enhanced `SpikingSelfAttention` class in `attention.py` to streamline state management and improve code readability. - Improved `LinearLIF` class in `linear_lif.py` by refining initialization and state handling, ensuring better compatibility with Triton kernels.
1 parent 44ce2a2 commit fdba0fe

File tree

6 files changed

+459
-357
lines changed

6 files changed

+459
-357
lines changed

0 commit comments

Comments
 (0)