spikingjelly.activation_based.triton_kernel.neuron_kernel package#
This package contains multi-step neuron kernels implemented with Triton.
torch.compile Compatibility#
Triton neuron backend is now compatible with torch.compile for IF/LIF/PLIF multi-step kernels.
Compatibility conditions:
torch>=2.6.0with Triton installed.CUDA device is required (Triton backend does not run on CPU).
Use neuron modules with
step_mode='m'andbackend='triton'.Supported surrogate types in Triton backend are
SigmoidandATan.
Current limits and notes:
Unsupported surrogate functions will raise
NotImplementedErrorin Triton path.torch.library.triton_opis used when available; runtime fallback tocustom_opis supported.Known problematic compile configurations from current validation:
torch.compile(..., mode="reduce-overhead")may trigger CUDAGraph output-overwrite runtime errors.fullgraph=Truecan trigger backend compiler exceptions (observed on PLIF).modeandoptionscannot be used together on some PyTorch versions.
It is recommended to use
torch.compile(..., backend="inductor")with explicitoptionsand tune CUDAGraph-related options if needed.