变更日志 | Changelog#
All notable changes to SpikingJelly are documented in this file.
SpikingJelly starts maintaining this standard changelog from 2.0.0.dev0.
For older releases, see the historical fatal-bug record in
bugs.md
and the archived documentation linked from the project README.
Unreleased#
Features#
Functional State Transitions#
Module: spikingjelly.activation_based.functional.
Added explicit tensor-state APIs for modules with state-update semantics, including neurons, delay and synaptic filters, learning traces, and SpikeZIP STBIF updates. Existing modules retain their public state, lifecycle, backend selection, and output behavior.
State-update APIs use
*_stepfor one complete update and*_multi_steponly for independently implemented sequence paths. Supported CuPy, Triton, and Inductor paths identify their backend in the function name.The Inductor neuron multi-step implementation is the single source of its state-update equation and shares a bounded process-local compiled-graph cache.
Hookable Node classes retain their existing execution paths; their standard transitions are also available as independent functional APIs.
Added FlexSN custom-op registry diagnostics for entry, owner-reference, and active-reference counts.
ANN-to-SNN Conversion#
Module: spikingjelly.activation_based.ann2snn.
Added temporal-difference RMSNorm and SiLU operators and conversion support in
TransformerTDEquivalentRecipe.Added public
Qwen2SNNConfig,Qwen2SNNCalibration,Qwen2SNNModel, andQwen2SNNRecipefor calibration-driven, offline layerwise Qwen2 conversion with an explicit[T, B, S, H]layout and explicit KV-cache continuation.Added
SignedQCFSSequenceEncoderand revision-pinned Qwen2.5 correctness, quality, efficiency, and tensor-parallel evaluation tools. These experimental workflows do not claim latency or energy improvements.
Precision#
Module: spikingjelly.activation_based.precision.
Added optional Transformer Engine FP8 support through
PrecisionConfig(mode="fp8-te"), including Linear, pointwise Conv1d, LayerNorm, fused LayerNorm patterns, and SDPA adapters.Added
fp8-teandfp8-torchaoextras, capability diagnostics, and conversion reports.
Triton Neuron Kernels#
Module: spikingjelly.activation_based.triton_kernel.neuron_kernel.
Added a multi-step, inference-only Triton backend for
ActivationAwareIFNodewith FP32 and BF16 execution.Added experimental mixed-precision and FP8 IF, LIF, and ParametricLIF kernels, capability probes, execution plans, and benchmarks. FP8 does not consistently outperform BF16 in the measured workloads.
Added multi-step Triton training and inference for
ILIFNode. It reusesLIFNodedynamics and configures integer firing throughMultiLevelSpikeCount.Added an inference-only single-step Triton kernel for the SpikeZIP STBIF neuron, exposed through functional and neuron interfaces.
Integer-Valued Spike Conversion#
Module: spikingjelly.activation_based.layer.
Added
SpikeCountToBinaryandTemporalBinSumfor multi-step I-LIF networks, enabling integer-valued training and binary-event evaluation around bias-free weight layers.
Bug Fixes#
ANN-to-SNN Conversion#
Module: spikingjelly.activation_based.ann2snn.
Fixed TD operators retaining full cumulative sequences instead of compact final-step state.
Fixed FX conversion on PyTorch 2.6 and 2.7 for dynamic
torch.reshapecalls and forward signatures containing PEP 604 union annotations.Fixed signed QCFS boundary replay and statistics for non-last channel dimensions.
Fixed SpikeZIP STBIF Triton state rounding at exact half-integers to match Torch ties-to-even semantics.
Fixed converted Qwen2 position IDs, cache validation, and calibration metadata checks.
Activation-Based Sequence Forwarding#
Modules: spikingjelly.activation_based.functional,
spikingjelly.activation_based.layer.
Fixed time-last containers advancing stateful modules through stateless vectorization and preserved tuple outputs from sequence-to-ANN forwarding.
CUDA Neuron Kernels#
Module: spikingjelly.activation_based.cuda_kernel.neuron_kernel.
Fixed generated FP32 IF/LIF CUDA source containing invalid RST fragments.
Learning#
Module: spikingjelly.activation_based.learning.
Fixed STDP learners retaining network or reward autograd graphs across iterations.
Recurrent Networks#
Module: spikingjelly.activation_based.rnn.
Fixed stacked spiking RNN final states and dropout placement.
Triton Neuron Kernels#
Module: spikingjelly.activation_based.triton_kernel.neuron_kernel.
Fixed gradients for non-contiguous upstream tensors in stable multi-step IF/LIF/ParametricLIF kernels.
Timing-Based Neurons#
Module: spikingjelly.timing_based.neuron.
Fixed
Tempotronoutputs when batch or output-feature size is one.
Improvements#
Neuron Backend Caches#
Module: spikingjelly.activation_based.neuron.
Moved standard IF/LIF/ParametricLIF Inductor compiled-graph ownership from individual neuron instances to a bounded, PID-aware neuron backend cache. Equivalent modules can now share compiled callables without serializing cache entries through module deepcopy or pickle.
Timing-Based Models#
Modules: spikingjelly.timing_based.encoding,
spikingjelly.timing_based.neuron.
Simplified
GaussianTuningandTempotronto direct PyTorch operations.
Distributed Training#
Module: spikingjelly.activation_based.distributed.
Added Analyze -> Plan -> Apply configuration for data parallel, tensor parallel, FSDP2, and FSDP2+TP. Pipeline execution uses dedicated builders.
Added explicit tensor-parallel plans and replicated-activation DTensor styles for
TDLinear.Updated distributed benchmarks, result fields, and tutorials.
Triton IF/LIF Memory Optimisation#
Module: spikingjelly.activation_based.triton_kernel.neuron_kernel.
Reduced memory usage with
store_v_seq=Falseby retaining only the final membrane potential.
Breaking Changes and Notices#
ANN-to-SNN API Changes#
Module: spikingjelly.activation_based.ann2snn.
Removed the generic
ActivationRule,HookFactory,ReLURule, andThresholdOptimizerextension points and the correspondingRateCodingRecipeconstructor arguments. Custom graph conversion behavior should be implemented as anFXConversionRecipe;NeuronFactoryremains available for configuring neuron construction.
Distributed API Changes#
Module: spikingjelly.activation_based.distributed.
Replaced
TensorShardMemoryModulewith themake_tensor_shard_memory_module()factory. Tensor-parallel stateful modules now keep their concrete module type and original state-dict paths instead of adding aninnermodule namespace.Removed the
spikingjelly.activation_based.distributed.dtensorcompatibility facade. Import the high-level Analyze -> Plan -> Apply APIs fromspikingjelly.activation_based.distributedand low-level utilities from theirdata_parallel,pipeline, ortensor_parallelmodules.Replaced the
SNNDistributedConfigenable/experimental flags with the explicitmodevaluesnone,dp,tp,fsdp2, andfsdp2_tp. Model-specific tensor-parallel and FSDP roots are now passed directly through the corresponding root fields.Removed
build_eager_config(),SNNDistributedRuntime.from_legacy(), and thebuild_cifar10dvs_vgg_eager_policy()andbuild_spikformer_eager_policy()helpers. Useconfigure_snn_distributed()for manual eager configuration or the Analyze -> Plan -> Apply workflow.
Operation-Counting API Changes#
Module: spikingjelly.activation_based.op_counter.
Removed the redundant
SpikeSimEventEnergyProfilerandSpikeSimEventEnergyReportaliases. UseSpikeSimEnergyProfilerandSpikeSimEnergyReport.Removed stage-level aggregation and
MemoryResidencyCounter.get_stage_level_bits(). Use the level- and operation-level residency methods for current measurements.
Precision API Changes#
Module: spikingjelly.activation_based.precision.
PrecisionConfig.from_any()now accepts onlyNone,PrecisionConfig, a precision-mode string, or a dictionary using the currentmode,strictness,fp8_recipe, anddevicefields. Replace the legacyprecision,precision_strict, andfp8_reportaliases and attribute-style configuration objects with these explicit inputs.Float8TorchAOPolicyno longer acceptsstrictorfp8_recipe, andFloat8TransformerEnginePolicyno longer acceptsstrict. Pass these settings throughPrecisionConfigandprepare_model_for_precision();Float8TransformerEnginePolicyretains its effectivefp8_recipeargument.
Triton Utility Changes#
Module: spikingjelly.activation_based.triton_kernel.triton_utils.
Removed the documented
ensure_cleanup_tmp_python_files()decorator. Callers that create temporary Python files should own their lifecycle withtempfilecontext managers.
Triton Neuron Kernel API Changes#
Module: spikingjelly.activation_based.triton_kernel.neuron_kernel.
Replaced
TritonNeuronForwardPlanandprepare_triton_neuron_forward_plan()withTritonNeuronExecutionPlanandprepare_triton_neuron_execution_plan(). Thecompute_dtypeargument and related fields are now namedforward_compute_dtype,forward_compute_dtype_name, andforward_compute_tl_dtypeto distinguish forward and backward execution.
Dependencies#
Removed Pydantic from SpikingJelly's runtime and documentation dependencies after replacing its internal timing-based validation. Projects that use Pydantic directly must declare it as their own dependency.
2.0.0.dev0 - 2026-07-09#
This entry summarizes the user-visible changes since the previous PyPI stable release, 0.0.0.0.14 (2941330), through 2.0.0.dev0 (b4f3b68).
Features#
ANN-to-SNN Conversion#
Module: spikingjelly.activation_based.ann2snn.
Added a redesigned conversion subsystem with recipe-based workflows.
Added conversion recipes and examples for LTB, STA-style Transformer conversion, and SpikeZIP QANN/Transformer experiments.
Few-Spike and Activation-Aware Neurons#
Modules: spikingjelly.activation_based.neuron
Added few-spike neuron for ann2snn research.
Added activation-aware IF neuron for ann2snn research.
Memory Optimization#
Module: spikingjelly.activation_based.memopt.
Added the training memory optimization pipeline with gradient checkpointing and spike compression.
Precision#
Module: spikingjelly.activation_based.precision.
Added a common precision policy interface for configuring precision behavior without depending on backend-specific implementation details.
Distributed Training#
Module: spikingjelly.activation_based.distributed.
Added distributed training and DTensor utilities for larger-scale SNN experiments.
Profiling and Energy Estimation#
Module: spikingjelly.activation_based.op_counter.
Added operation counting tools for profiling SNN models.
Added inference energy estimation tools.
Improvements#
Updated the package version scheme from legacy
0.0.0.0.Xnumbering to PEP 440 compatible V2 versions.Raised the runtime baseline to Python
>=3.11andtorch>=2.6.0.Updated README and documentation pages for the V2 release policy, pre-release installation, and pre-V2 dependency pinning.
Refactored
spikingjelly.visualizinginto focused submodules.Refactored the official website.
Added broader tutorials and API documentation.
Reworked public API documentation and docstrings across the project.
Refined datasets, timing-based modules, exchange utilities, backend kernels, model helpers, and training utilities across the V2 development line.
Added broader regression tests for V2.
Bug Fixes#
Fixed neuron initialization edge cases.
Fixed reset-state handling edge cases.
Fixed spiking RNN hidden-state dtype handling.
Fixed CuPy and Triton backend dispatch issues for neuron evaluation paths.
Fixed dataset preprocessing edge cases.
Fixed publication metadata cleanup edge cases.
Hardened ANN-to-SNN conversion validation and calibration.
Hardened ANN-to-SNN step-mode, mask-handling, download, and module-replacement paths.
Fixed documentation rendering, tutorial, and API navigation issues.
Breaking Changes and Notices#
V2 starts a new compatibility generation. Projects that must remain on the legacy release line should pin
spikingjelly<2.Some experimental or internal ANN2SNN conversion interfaces were refactored around the V2 recipe and operator model.
Documentation structure and public API pages were reorganized; external links to old generated API pages may need to be updated.
Before upgrading from
0.0.0.0.14, review this changelog and the V2 README installation notes.Conservative projects should pin
spikingjelly<2until they are ready to validate V2 behavior.To test published V2 pre-releases, install with
pip install --pre spikingjelly.For source installs, follow the current README and ensure the selected PyTorch build matches the target CPU/CUDA environment.