spikingjelly.activation_based.triton_kernel package#

备注

Developers should decide whether Triton backend is available by:

try:
    import triton
except ImportError:
    triton = None

if triton is not None:
    # Triton backend is available
    ...
else:
    # Triton backend is not available
    ...

MemoryModule encapsulates this logic.

Predefined Neuron Kernels#

FlexSN Implementation#

Torch-to-Triton Transpiler#

Spike Compressors#

Utilities#

Borrowed from: AllenYolk/flash-snn fla-org/flash-linear-attention

spikingjelly.activation_based.triton_kernel.triton_utils.register_op(opname: str, mutates_args=())[源代码]#
spikingjelly.activation_based.triton_kernel.triton_utils.wrap_triton(kernel)[源代码]#
spikingjelly.activation_based.triton_kernel.triton_utils.contiguous_and_device_guard(f: Callable) Callable[源代码]#

Make sure all input tensors are contiguous and set to the same device.

spikingjelly.activation_based.triton_kernel.triton_utils.ensure_cleanup_tmp_python_files(f: Callable) Callable[源代码]#

Remove temporary python files returned or created by a wrapped function.

class spikingjelly.activation_based.triton_kernel.dummy.DummyImport[源代码]#

基类:object

Dummy class as an import placeholder.