spikingjelly 2.0.0.dev2__tar.gz → 2.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (471) hide show
  1. spikingjelly-2.1.0/LICENSE +202 -0
  2. spikingjelly-2.1.0/LICENSES/NOTICE +185 -0
  3. spikingjelly-2.1.0/MANIFEST.in +2 -0
  4. {spikingjelly-2.0.0.dev2/spikingjelly.egg-info → spikingjelly-2.1.0}/PKG-INFO +57 -58
  5. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/README.md +46 -43
  6. spikingjelly-2.1.0/ops/__init__.py +3 -0
  7. spikingjelly-2.1.0/ops/_cuda.cuh +34 -0
  8. spikingjelly-2.1.0/ops/activation_aware_if/__init__.py +18 -0
  9. spikingjelly-2.1.0/ops/activation_aware_if/cpu.py +38 -0
  10. spikingjelly-2.1.0/ops/activation_aware_if/kernels.cuh +55 -0
  11. spikingjelly-2.1.0/ops/activation_aware_if/native.cu +84 -0
  12. spikingjelly-2.1.0/ops/activation_aware_if/native.py +11 -0
  13. spikingjelly-2.1.0/ops/activation_aware_if/reference.py +35 -0
  14. spikingjelly-2.1.0/ops/activation_aware_if/triton.py +160 -0
  15. spikingjelly-2.1.0/ops/activation_aware_if/validation.py +63 -0
  16. spikingjelly-2.1.0/ops/autograd.py +52 -0
  17. spikingjelly-2.1.0/ops/clif/__init__.py +19 -0
  18. spikingjelly-2.1.0/ops/clif/autograd.py +92 -0
  19. spikingjelly-2.1.0/ops/clif/cpu.py +32 -0
  20. spikingjelly-2.1.0/ops/clif/reference.py +44 -0
  21. spikingjelly-2.1.0/ops/clif/triton.py +250 -0
  22. spikingjelly-2.1.0/ops/cuda_surrogate.cuh +27 -0
  23. spikingjelly-2.1.0/ops/dispatch.py +179 -0
  24. spikingjelly-2.1.0/ops/eif/__init__.py +19 -0
  25. spikingjelly-2.1.0/ops/eif/autograd.py +193 -0
  26. spikingjelly-2.1.0/ops/eif/cpu.py +102 -0
  27. spikingjelly-2.1.0/ops/eif/kernels.cuh +66 -0
  28. spikingjelly-2.1.0/ops/eif/native.cu +140 -0
  29. spikingjelly-2.1.0/ops/eif/native.py +5 -0
  30. spikingjelly-2.1.0/ops/eif/reference.py +83 -0
  31. spikingjelly-2.1.0/ops/eif/triton.py +314 -0
  32. spikingjelly-2.1.0/ops/few_spike/__init__.py +64 -0
  33. spikingjelly-2.1.0/ops/few_spike/cpu.py +3 -0
  34. spikingjelly-2.1.0/ops/few_spike/kernels.cuh +50 -0
  35. spikingjelly-2.1.0/ops/few_spike/native.cu +74 -0
  36. spikingjelly-2.1.0/ops/few_spike/native.py +3 -0
  37. spikingjelly-2.1.0/ops/few_spike/triton.py +123 -0
  38. spikingjelly-2.1.0/ops/first_spike.py +262 -0
  39. spikingjelly-2.1.0/ops/flexsn/__init__.py +3 -0
  40. spikingjelly-2.1.0/ops/flexsn/hop.py +96 -0
  41. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel → spikingjelly-2.1.0/ops}/flexsn/info.py +6 -70
  42. spikingjelly-2.1.0/ops/flexsn/kernel.py +94 -0
  43. spikingjelly-2.1.0/ops/flexsn/launch.py +153 -0
  44. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel → spikingjelly-2.1.0/ops}/flexsn/template.py +58 -238
  45. spikingjelly-2.1.0/ops/flexsn/triton.py +362 -0
  46. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel → spikingjelly-2.1.0/ops}/fp8_capability.py +4 -4
  47. spikingjelly-2.1.0/ops/if_/__init__.py +19 -0
  48. spikingjelly-2.1.0/ops/if_/autograd.py +84 -0
  49. spikingjelly-2.1.0/ops/if_/cpu.py +65 -0
  50. spikingjelly-2.1.0/ops/if_/kernels.cuh +56 -0
  51. spikingjelly-2.1.0/ops/if_/native.cu +148 -0
  52. spikingjelly-2.1.0/ops/if_/native.py +5 -0
  53. spikingjelly-2.1.0/ops/if_/reference.py +67 -0
  54. spikingjelly-2.1.0/ops/if_/triton.py +257 -0
  55. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/neuron_kernel/integrate_and_fire.py → spikingjelly-2.1.0/ops/if_/triton_precision.py +199 -326
  56. spikingjelly-2.1.0/ops/if_linear/__init__.py +5 -0
  57. spikingjelly-2.1.0/ops/if_linear/functional.py +277 -0
  58. spikingjelly-2.1.0/ops/if_linear/kernels.cuh +144 -0
  59. spikingjelly-2.1.0/ops/if_linear/native.cu +150 -0
  60. spikingjelly-2.1.0/ops/ilif/__init__.py +19 -0
  61. spikingjelly-2.1.0/ops/ilif/autograd.py +133 -0
  62. spikingjelly-2.1.0/ops/ilif/cpu.py +60 -0
  63. spikingjelly-2.1.0/ops/ilif/kernels.cuh +59 -0
  64. spikingjelly-2.1.0/ops/ilif/native.cu +122 -0
  65. spikingjelly-2.1.0/ops/ilif/native.py +5 -0
  66. spikingjelly-2.1.0/ops/ilif/reference.py +71 -0
  67. spikingjelly-2.1.0/ops/ilif/triton.py +237 -0
  68. spikingjelly-2.1.0/ops/izhikevich/__init__.py +19 -0
  69. spikingjelly-2.1.0/ops/izhikevich/autograd.py +238 -0
  70. spikingjelly-2.1.0/ops/izhikevich/cpu.py +125 -0
  71. spikingjelly-2.1.0/ops/izhikevich/kernels.cuh +75 -0
  72. spikingjelly-2.1.0/ops/izhikevich/native.cu +155 -0
  73. spikingjelly-2.1.0/ops/izhikevich/native.py +5 -0
  74. spikingjelly-2.1.0/ops/izhikevich/reference.py +128 -0
  75. spikingjelly-2.1.0/ops/izhikevich/triton.py +374 -0
  76. spikingjelly-2.1.0/ops/layout.py +69 -0
  77. spikingjelly-2.1.0/ops/lif/__init__.py +19 -0
  78. spikingjelly-2.1.0/ops/lif/autograd.py +111 -0
  79. spikingjelly-2.1.0/ops/lif/cpu.py +74 -0
  80. spikingjelly-2.1.0/ops/lif/kernels.cuh +120 -0
  81. spikingjelly-2.1.0/ops/lif/native.cu +160 -0
  82. spikingjelly-2.1.0/ops/lif/native.py +5 -0
  83. spikingjelly-2.1.0/ops/lif/reference.py +108 -0
  84. spikingjelly-2.1.0/ops/lif/triton.py +299 -0
  85. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/neuron_kernel/lif.py → spikingjelly-2.1.0/ops/lif/triton_precision.py +249 -346
  86. spikingjelly-2.1.0/ops/lif_linear/__init__.py +5 -0
  87. spikingjelly-2.1.0/ops/lif_linear/functional.py +312 -0
  88. spikingjelly-2.1.0/ops/lif_linear/kernels.cuh +166 -0
  89. spikingjelly-2.1.0/ops/lif_linear/native.cu +179 -0
  90. spikingjelly-2.1.0/ops/native_layout.cuh +219 -0
  91. spikingjelly-2.1.0/ops/native_loader.py +71 -0
  92. spikingjelly-2.1.0/ops/plif/__init__.py +19 -0
  93. spikingjelly-2.1.0/ops/plif/autograd.py +125 -0
  94. spikingjelly-2.1.0/ops/plif/cpu.py +96 -0
  95. spikingjelly-2.1.0/ops/plif/kernels.cuh +82 -0
  96. spikingjelly-2.1.0/ops/plif/native.cu +155 -0
  97. spikingjelly-2.1.0/ops/plif/native.py +5 -0
  98. spikingjelly-2.1.0/ops/plif/reference.py +87 -0
  99. spikingjelly-2.1.0/ops/plif/triton.py +322 -0
  100. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/neuron_kernel/plif.py → spikingjelly-2.1.0/ops/plif/triton_precision.py +211 -360
  101. spikingjelly-2.1.0/ops/projection.py +218 -0
  102. spikingjelly-2.1.0/ops/qif/__init__.py +19 -0
  103. spikingjelly-2.1.0/ops/qif/autograd.py +191 -0
  104. spikingjelly-2.1.0/ops/qif/cpu.py +102 -0
  105. spikingjelly-2.1.0/ops/qif/kernels.cuh +69 -0
  106. spikingjelly-2.1.0/ops/qif/native.cu +139 -0
  107. spikingjelly-2.1.0/ops/qif/native.py +5 -0
  108. spikingjelly-2.1.0/ops/qif/reference.py +111 -0
  109. spikingjelly-2.1.0/ops/qif/triton.py +314 -0
  110. spikingjelly-2.1.0/ops/reset.py +9 -0
  111. spikingjelly-2.1.0/ops/selection.py +290 -0
  112. spikingjelly-2.1.0/ops/spike_compress/__init__.py +26 -0
  113. spikingjelly-2.1.0/ops/spike_compress/cpu.py +34 -0
  114. spikingjelly-2.1.0/ops/spike_compress/triton.py +107 -0
  115. spikingjelly-2.1.0/ops/spike_compress/validation.py +32 -0
  116. spikingjelly-2.1.0/ops/spike_linear/__init__.py +1 -0
  117. spikingjelly-2.1.0/ops/spike_linear/kernels.cuh +259 -0
  118. spikingjelly-2.1.0/ops/spike_linear/native.cu +134 -0
  119. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/spike_linear.py → spikingjelly-2.1.0/ops/spike_linear/sparse.py +72 -462
  120. spikingjelly-2.1.0/ops/stbif/__init__.py +17 -0
  121. spikingjelly-2.1.0/ops/stbif/cpu.py +29 -0
  122. spikingjelly-2.1.0/ops/stbif/kernels.cuh +26 -0
  123. spikingjelly-2.1.0/ops/stbif/native.cu +72 -0
  124. spikingjelly-2.1.0/ops/stbif/native.py +11 -0
  125. spikingjelly-2.1.0/ops/stbif/reference.py +11 -0
  126. spikingjelly-2.1.0/ops/stbif/triton.py +109 -0
  127. spikingjelly-2.1.0/ops/stbif/validation.py +93 -0
  128. spikingjelly-2.1.0/ops/surrogate.py +75 -0
  129. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/surrogate_kernel.py → spikingjelly-2.1.0/ops/surrogate_dispatch.py +11 -17
  130. spikingjelly-2.1.0/ops/surrogate_runtime.py +50 -0
  131. spikingjelly-2.1.0/ops/tempotron/__init__.py +29 -0
  132. spikingjelly-2.1.0/ops/tempotron/cpu.py +91 -0
  133. spikingjelly-2.1.0/ops/tempotron/reference.py +116 -0
  134. spikingjelly-2.1.0/ops/tempotron/triton.py +315 -0
  135. spikingjelly-2.1.0/ops/tempotron/validation.py +101 -0
  136. spikingjelly-2.1.0/ops/torch2triton/__init__.py +1 -0
  137. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel → spikingjelly-2.1.0/ops}/torch2triton/graph2triton.py +71 -118
  138. spikingjelly-2.1.0/ops/torch2triton/torch2graph.py +150 -0
  139. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/neuron_kernel/utils.py → spikingjelly-2.1.0/ops/triton_layout.py +155 -9
  140. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/triton_utils.py → spikingjelly-2.1.0/ops/triton_runtime.py +28 -85
  141. spikingjelly-2.1.0/ops/triton_surrogate.py +29 -0
  142. spikingjelly-2.1.0/ops/validation.py +44 -0
  143. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/pyproject.toml +31 -12
  144. spikingjelly-2.1.0/setup.py +98 -0
  145. spikingjelly-2.1.0/spikingjelly/activation_based/_cuda_graph.py +111 -0
  146. spikingjelly-2.1.0/spikingjelly/activation_based/_neuron.py +17 -0
  147. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/examples/roberta_spikezip_qann_synthetic.py +4 -11
  148. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/qcfs.py +2 -13
  149. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/recipes/qwen2.py +22 -22
  150. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/recipes/spikezip_qann.py +14 -14
  151. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/base.py +14 -191
  152. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/distributed/__init__.py +4 -3
  153. spikingjelly-2.1.0/spikingjelly/activation_based/distributed/llm/__init__.py +42 -0
  154. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/distributed/llm/config.py +237 -12
  155. spikingjelly-2.1.0/spikingjelly/activation_based/distributed/llm/inference.py +601 -0
  156. spikingjelly-2.1.0/spikingjelly/activation_based/distributed/llm/metrics.py +61 -0
  157. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/distributed/llm/planning.py +5 -6
  158. spikingjelly-2.1.0/spikingjelly/activation_based/distributed/llm/sglang.py +153 -0
  159. spikingjelly-2.1.0/spikingjelly/activation_based/distributed/llm/sglang_export.py +526 -0
  160. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/distributed/llm/training.py +79 -62
  161. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/distributed/tensor_parallel/channel.py +6 -9
  162. spikingjelly-2.1.0/spikingjelly/activation_based/distributed/vision/__init__.py +44 -0
  163. spikingjelly-2.1.0/spikingjelly/activation_based/distributed/vision/config.py +1224 -0
  164. spikingjelly-2.1.0/spikingjelly/activation_based/distributed/vision/execution.py +157 -0
  165. spikingjelly-2.1.0/spikingjelly/activation_based/distributed/vision/inference.py +999 -0
  166. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/distributed/vision/training.py +282 -254
  167. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/encoding.py +34 -21
  168. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/classify_dvsg.py +1 -8
  169. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/common/train_classify.py +79 -34
  170. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/common/tv_ref_classify/sampler.py +3 -0
  171. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/conv_fashion_mnist.py +6 -13
  172. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DSQN → spikingjelly-2.1.0/spikingjelly/activation_based/examples/dsqn}/utils/model.py +0 -2
  173. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/lynxi_fmnist_inference.py +4 -4
  174. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/memopt/models.py +0 -6
  175. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/memopt/train.py +15 -8
  176. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples → spikingjelly-2.1.0/spikingjelly/activation_based/examples/plasticity}/mstdp.py +132 -118
  177. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples → spikingjelly-2.1.0/spikingjelly/activation_based/examples/plasticity}/mstdpet.py +142 -129
  178. spikingjelly-2.1.0/spikingjelly/activation_based/examples/plasticity/stdp_mnist.py +618 -0
  179. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples → spikingjelly-2.1.0/spikingjelly/activation_based/examples/plasticity}/stdp_trace.py +21 -13
  180. spikingjelly-2.1.0/spikingjelly/activation_based/examples/profiling/nsys_lif.py +76 -0
  181. spikingjelly-2.1.0/spikingjelly/activation_based/examples/profiling/nsys_multigpu.py +359 -0
  182. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/rsnn_sequential_fmnist.py +1 -9
  183. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/speech_commands.py +0 -10
  184. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/train_flexsn_compile.py +3 -6
  185. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/train_imagenet.py +6 -15
  186. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/functional/__init__.py +2 -1
  187. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/functional/conv_bn_fusion.py +2 -9
  188. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/functional/learning.py +125 -0
  189. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/functional/loss.py +88 -20
  190. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/functional/misc.py +2 -0
  191. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/functional/net_config.py +108 -158
  192. spikingjelly-2.1.0/spikingjelly/activation_based/functional/neuron.py +4395 -0
  193. spikingjelly-2.1.0/spikingjelly/activation_based/functional/spike.py +451 -0
  194. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/lava_exchange.py +54 -50
  195. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/layer/attention.py +239 -157
  196. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/layer/bn.py +6 -41
  197. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/layer/container.py +63 -1
  198. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/layer/dropout.py +168 -18
  199. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/layer/online_learning.py +16 -6
  200. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/layer/stateless_wrapper.py +2 -10
  201. spikingjelly-2.1.0/spikingjelly/activation_based/learning/__init__.py +19 -0
  202. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/functional → spikingjelly-2.1.0/spikingjelly/activation_based/learning}/online_learning.py +37 -10
  203. spikingjelly-2.1.0/spikingjelly/activation_based/learning/plasticity.py +1104 -0
  204. spikingjelly-2.1.0/spikingjelly/activation_based/memopt/__init__.py +20 -0
  205. spikingjelly-2.1.0/spikingjelly/activation_based/memopt/checkpointing.py +381 -0
  206. spikingjelly-2.1.0/spikingjelly/activation_based/memopt/compress.py +487 -0
  207. spikingjelly-2.1.0/spikingjelly/activation_based/memopt/pipeline.py +668 -0
  208. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/__init__.py +7 -1
  209. spikingjelly-2.1.0/spikingjelly/activation_based/model/masnn.py +753 -0
  210. spikingjelly-2.1.0/spikingjelly/activation_based/model/maxformer.py +558 -0
  211. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/ms_resnet.py +117 -51
  212. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/qkformer.py +105 -34
  213. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/sew_resnet.py +323 -2
  214. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/spike_dhs.py +31 -18
  215. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/spike_driven_transformer.py +73 -24
  216. spikingjelly-2.1.0/spikingjelly/activation_based/model/spikformer.py +1462 -0
  217. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/monitor.py +178 -299
  218. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/__init__.py +2 -0
  219. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/adapt.py +40 -87
  220. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/base_node.py +248 -55
  221. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/dsr.py +0 -30
  222. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/few_spike.py +108 -2
  223. spikingjelly-2.1.0/spikingjelly/activation_based/neuron/flexsn.py +753 -0
  224. spikingjelly-2.1.0/spikingjelly/activation_based/neuron/flexsn_hop.py +214 -0
  225. spikingjelly-2.1.0/spikingjelly/activation_based/neuron/flexsn_trace.py +60 -0
  226. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/ilif.py +14 -57
  227. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/integrate_and_fire.py +134 -336
  228. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/lif.py +38 -145
  229. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/lif_variants.py +339 -51
  230. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/mpbn.py +32 -31
  231. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/noisy.py +80 -3
  232. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/nonlinear_if.py +30 -126
  233. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/online_learning.py +28 -46
  234. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/plif.py +22 -83
  235. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/psn.py +47 -30
  236. spikingjelly-2.1.0/spikingjelly/activation_based/neuron/resonate.py +231 -0
  237. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/spikezip.py +37 -67
  238. spikingjelly-2.1.0/spikingjelly/activation_based/neuron/ternary.py +557 -0
  239. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/nir_exchange/from_nir.py +17 -2
  240. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/nir_exchange/to_nir.py +118 -7
  241. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/ac.py +1 -0
  242. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/analytical_energy.py +14 -20
  243. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/flop.py +144 -4
  244. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/memory_access.py +107 -3
  245. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/neuromc/core.py +66 -240
  246. spikingjelly-2.1.0/spikingjelly/activation_based/op_counter/neuromc/mapping.py +228 -0
  247. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/neuron_state.py +63 -16
  248. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/spikesim/core.py +1 -1
  249. spikingjelly-2.1.0/spikingjelly/activation_based/precision/__init__.py +8 -0
  250. spikingjelly-2.1.0/spikingjelly/activation_based/precision/api.py +330 -0
  251. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/precision/capability.py +44 -134
  252. spikingjelly-2.1.0/spikingjelly/activation_based/precision/config.py +188 -0
  253. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/precision/convert.py +60 -0
  254. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/precision/float8_attention.py +5 -5
  255. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/precision/float8_te.py +104 -11
  256. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/precision/policy.py +6 -4
  257. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/surrogate.py +50 -182
  258. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/configure.py +17 -74
  259. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/base.py +15 -6
  260. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/cifar10_dvs.py +56 -6
  261. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/dvs_lip.py +2 -1
  262. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/es_imagenet.py +3 -3
  263. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/hardvs.py +2 -1
  264. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/shd.py +60 -22
  265. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/utils.py +17 -8
  266. spikingjelly-2.1.0/spikingjelly/nsys.py +387 -0
  267. spikingjelly-2.1.0/spikingjelly/timing_based/encoding.py +207 -0
  268. spikingjelly-2.1.0/spikingjelly/timing_based/examples/__init__.py +0 -0
  269. spikingjelly-2.1.0/spikingjelly/timing_based/examples/cubic_conv_mnist.py +78 -0
  270. spikingjelly-2.1.0/spikingjelly/timing_based/examples/cubic_srm_mnist.py +79 -0
  271. spikingjelly-2.1.0/spikingjelly/timing_based/examples/srm_mnist.py +212 -0
  272. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/timing_based/examples/tempotron_mnist.py +77 -57
  273. spikingjelly-2.1.0/spikingjelly/timing_based/functional.py +1754 -0
  274. spikingjelly-2.1.0/spikingjelly/timing_based/neuron.py +644 -0
  275. spikingjelly-2.1.0/spikingjelly/timing_based/solver.py +331 -0
  276. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0/spikingjelly.egg-info}/PKG-INFO +57 -58
  277. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly.egg-info/SOURCES.txt +173 -82
  278. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly.egg-info/requires.txt +12 -11
  279. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/test/test_configure.py +5 -34
  280. spikingjelly-2.1.0/test/test_imports.py +55 -0
  281. spikingjelly-2.1.0/test/test_logger.py +212 -0
  282. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/test/test_visualizing.py +0 -65
  283. spikingjelly-2.0.0.dev2/LICENSE +0 -55
  284. spikingjelly-2.0.0.dev2/LICENSES/README.md +0 -91
  285. spikingjelly-2.0.0.dev2/LICENSES/translations/LICENSE.de +0 -160
  286. spikingjelly-2.0.0.dev2/LICENSES/translations/LICENSE.en +0 -142
  287. spikingjelly-2.0.0.dev2/LICENSES/translations/LICENSE.fr +0 -157
  288. spikingjelly-2.0.0.dev2/LICENSES/translations/LICENSE.hi +0 -141
  289. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/__init__.py +0 -38
  290. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/auto_cuda/__init__.py +0 -1
  291. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/auto_cuda/base.py +0 -1416
  292. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/auto_cuda/cfunction.py +0 -419
  293. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/auto_cuda/generator.py +0 -946
  294. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/cuda_utils.py +0 -469
  295. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/__init__.py +0 -1
  296. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/cuda_code.py +0 -27
  297. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/multi_step/__init__.py +0 -21
  298. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/multi_step/base.py +0 -682
  299. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/multi_step/eif.py +0 -721
  300. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/multi_step/integrate_and_fire.py +0 -253
  301. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/multi_step/izhikevich.py +0 -752
  302. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/multi_step/lif.py +0 -344
  303. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/multi_step/plif.py +0 -514
  304. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/multi_step/qif.py +0 -713
  305. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/multi_step/runtime.py +0 -84
  306. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/single_step/__init__.py +0 -1
  307. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/single_step/base.py +0 -254
  308. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/single_step/integrate_and_fire.py +0 -193
  309. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/single_step/lif.py +0 -275
  310. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_kernel/surrogate_registry.py +0 -44
  311. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/neuron_linear.py +0 -708
  312. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/spike_op.py +0 -708
  313. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/cuda_kernel/tensor_cache.py +0 -333
  314. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/distributed/llm/__init__.py +0 -20
  315. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/distributed/llm/inference.py +0 -276
  316. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/distributed/vision/__init__.py +0 -25
  317. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/distributed/vision/config.py +0 -396
  318. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/distributed/vision/sew_resnet.py +0 -221
  319. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/distributed/vision/spikformer.py +0 -404
  320. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/functional/neuron.py +0 -3112
  321. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/learning.py +0 -1434
  322. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/memopt/__init__.py +0 -9
  323. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/memopt/checkpointing.py +0 -609
  324. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/memopt/compress.py +0 -451
  325. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/memopt/pipeline.py +0 -1743
  326. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/model/maxformer.py +0 -382
  327. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/model/spikformer.py +0 -898
  328. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/neuron/flexsn.py +0 -1583
  329. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/precision/__init__.py +0 -52
  330. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/precision/api.py +0 -167
  331. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/precision/config.py +0 -46
  332. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/precision/float8_torchao.py +0 -146
  333. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/precision/runtime.py +0 -35
  334. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/__init__.py +0 -3
  335. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/compress.py +0 -221
  336. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/flexsn/__init__.py +0 -23
  337. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/flexsn/custom_ops.py +0 -1092
  338. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/flexsn/hop.py +0 -1890
  339. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/flexsn/kernel.py +0 -438
  340. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/flexsn/wrapper.py +0 -483
  341. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/neuron_kernel/__init__.py +0 -15
  342. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/neuron_kernel/activation_aware_if.py +0 -281
  343. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/neuron_kernel/ilif.py +0 -724
  344. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/neuron_kernel/stbif.py +0 -470
  345. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/torch2triton/__init__.py +0 -9
  346. spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/torch2triton/torch2graph.py +0 -270
  347. spikingjelly-2.0.0.dev2/spikingjelly/timing_based/encoding.py +0 -134
  348. spikingjelly-2.0.0.dev2/spikingjelly/timing_based/neuron.py +0 -192
  349. spikingjelly-2.0.0.dev2/test/test_dataset_builders.py +0 -295
  350. spikingjelly-2.0.0.dev2/test/test_dataset_utils.py +0 -197
  351. spikingjelly-2.0.0.dev2/test/test_logging_policy.py +0 -249
  352. /spikingjelly-2.0.0.dev2/spikingjelly/activation_based/triton_kernel/dummy.py → /spikingjelly-2.1.0/ops/triton_missing.py +0 -0
  353. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/setup.cfg +0 -0
  354. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/__init__.py +0 -0
  355. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/__init__.py +0 -0
  356. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/__init__.py +0 -0
  357. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/converter.py +0 -0
  358. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/delay.py +0 -0
  359. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/examples/__init__.py +0 -0
  360. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/examples/bert_sst2_transformer_td_equivalent.py +0 -0
  361. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/examples/cnn_mnist.py +0 -0
  362. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/examples/imagenet_resnet18_ltb.py +0 -0
  363. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/examples/imagenet_vit_sta.py +0 -0
  364. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/examples/resnet18_cifar10.py +0 -0
  365. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/modules.py +0 -0
  366. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/operators.py +0 -0
  367. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/recipes/__init__.py +0 -0
  368. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/recipes/base.py +0 -0
  369. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/recipes/local_threshold_balancing.py +0 -0
  370. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/recipes/rate_coding.py +0 -0
  371. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/recipes/sta_transformer.py +0 -0
  372. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/recipes/step_mode_adapters.py +0 -0
  373. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/recipes/transformer_td_equivalent.py +0 -0
  374. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/sample_models/__init__.py +0 -0
  375. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/sample_models/cifar10_resnet.py +0 -0
  376. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/sample_models/mnist_cnn.py +0 -0
  377. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/ann2snn/utils.py +0 -0
  378. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/distributed/llm/checkpoint.py +0 -0
  379. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/distributed/llm/temporal.py +0 -0
  380. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/distributed/tensor_parallel/__init__.py +0 -0
  381. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DSQN/utils → spikingjelly-2.1.0/spikingjelly/activation_based/examples}/__init__.py +0 -0
  382. /spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/A2C.py → /spikingjelly-2.1.0/spikingjelly/activation_based/examples/a2c.py +0 -0
  383. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/cifar10_r11_enabling_spikebased_backpropagation.py +0 -0
  384. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples → spikingjelly-2.1.0/spikingjelly/activation_based/examples/common}/__init__.py +0 -0
  385. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/common/multiprocessing_env.py +0 -0
  386. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/common/tv_ref_classify/__init__.py +0 -0
  387. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/common/tv_ref_classify/presets.py +0 -0
  388. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/common/tv_ref_classify/transforms.py +0 -0
  389. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/common/tv_ref_classify/utils.py +0 -0
  390. /spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DQN_state.py → /spikingjelly-2.1.0/spikingjelly/activation_based/examples/dqn_state.py +0 -0
  391. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DSQN → spikingjelly-2.1.0/spikingjelly/activation_based/examples/dsqn}/ptan/__init__.py +0 -0
  392. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DSQN → spikingjelly-2.1.0/spikingjelly/activation_based/examples/dsqn}/ptan/actions.py +0 -0
  393. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DSQN → spikingjelly-2.1.0/spikingjelly/activation_based/examples/dsqn}/ptan/agent.py +0 -0
  394. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DSQN → spikingjelly-2.1.0/spikingjelly/activation_based/examples/dsqn}/ptan/experience.py +0 -0
  395. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DSQN → spikingjelly-2.1.0/spikingjelly/activation_based/examples/dsqn}/train.py +0 -0
  396. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/common → spikingjelly-2.1.0/spikingjelly/activation_based/examples/dsqn/utils}/__init__.py +0 -0
  397. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DSQN → spikingjelly-2.1.0/spikingjelly/activation_based/examples/dsqn}/utils/atari_wrappers.py +0 -0
  398. {spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/DSQN → spikingjelly-2.1.0/spikingjelly/activation_based/examples/dsqn}/utils/common.py +0 -0
  399. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/ilc_san/core_cuda.py +0 -0
  400. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/ilc_san/hybrid_td3_cuda_norm.py +0 -0
  401. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/ilc_san/ilc_san.py +0 -0
  402. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/ilc_san/replay_buffer_norm.py +0 -0
  403. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/ilc_san/test_hybrid_td3_cpu.py +0 -0
  404. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/lava_mnist.py +0 -0
  405. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/lif_fc_mnist.py +0 -0
  406. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/memopt/data_module.py +0 -0
  407. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/memopt/lightning_callbacks.py +0 -0
  408. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/memopt/lightning_modules.py +0 -0
  409. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/memopt/loss.py +0 -0
  410. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/noisy_san/core_cuda.py +0 -0
  411. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/noisy_san/hybrid_td3_cuda_norm.py +0 -0
  412. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/noisy_san/noisy_san.py +0 -0
  413. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/noisy_san/replay_buffer_norm.py +0 -0
  414. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/noisy_san/test_hybrid_td3_cpu.py +0 -0
  415. {spikingjelly-2.0.0.dev2/spikingjelly/timing_based → spikingjelly-2.1.0/spikingjelly/activation_based/examples/plasticity}/__init__.py +0 -0
  416. /spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/PPO.py → /spikingjelly-2.1.0/spikingjelly/activation_based/examples/ppo.py +0 -0
  417. /spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/Spiking_A2C.py → /spikingjelly-2.1.0/spikingjelly/activation_based/examples/spiking_a2c.py +0 -0
  418. /spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/Spiking_DQN_state.py → /spikingjelly-2.1.0/spikingjelly/activation_based/examples/spiking_dqn_state.py +0 -0
  419. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/spiking_lstm_sequential_mnist.py +0 -0
  420. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/examples/spiking_lstm_text.py +0 -0
  421. /spikingjelly-2.0.0.dev2/spikingjelly/activation_based/examples/Spiking_PPO.py → /spikingjelly-2.1.0/spikingjelly/activation_based/examples/spiking_ppo.py +0 -0
  422. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/functional/forward.py +0 -0
  423. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/functional/layer.py +0 -0
  424. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/layer/__init__.py +0 -0
  425. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/layer/misc.py +0 -0
  426. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/lynxi_exchange.py +0 -0
  427. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/parametric_lif_net.py +0 -0
  428. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/snas_net.py +0 -0
  429. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/spiking_resnet.py +0 -0
  430. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/spiking_vgg.py +0 -0
  431. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/model/spiking_vggws_ottt.py +0 -0
  432. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/neuron/inter_layer_connection.py +0 -0
  433. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/nir_exchange/__init__.py +0 -0
  434. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/__init__.py +0 -0
  435. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/_sparse_memory.py +0 -0
  436. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/base.py +0 -0
  437. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/mac.py +0 -0
  438. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/neuromc/__init__.py +0 -0
  439. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/neuromc/config.py +0 -0
  440. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/neuromc/utils.py +0 -0
  441. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/neuromorphic_memory_access.py +0 -0
  442. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/simple_energy.py +0 -0
  443. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/spikesim/__init__.py +0 -0
  444. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/spikesim/config.py +0 -0
  445. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/spikesim/counter.py +0 -0
  446. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/spikesim/formulas.py +0 -0
  447. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/op_counter/synop.py +0 -0
  448. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/precision/float8_base.py +0 -0
  449. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/precision/float8_conv.py +0 -0
  450. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/profiler.py +0 -0
  451. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/quantize.py +0 -0
  452. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/activation_based/rnn.py +0 -0
  453. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/__init__.py +0 -0
  454. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/asl_dvs.py +0 -0
  455. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/bullying10k.py +0 -0
  456. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/dvs128_gesture.py +0 -0
  457. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/n_caltech101.py +0 -0
  458. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/n_mnist.py +0 -0
  459. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/nav_gesture.py +0 -0
  460. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/speechcommands.py +0 -0
  461. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/datasets/transform.py +0 -0
  462. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/logger.py +0 -0
  463. {spikingjelly-2.0.0.dev2/spikingjelly/timing_based/examples → spikingjelly-2.1.0/spikingjelly/timing_based}/__init__.py +0 -0
  464. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/visualizing/__init__.py +0 -0
  465. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/visualizing/_utils.py +0 -0
  466. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/visualizing/bar3d.py +0 -0
  467. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/visualizing/feature_map.py +0 -0
  468. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/visualizing/heatmap.py +0 -0
  469. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly/visualizing/spikes.py +0 -0
  470. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly.egg-info/dependency_links.txt +0 -0
  471. {spikingjelly-2.0.0.dev2 → spikingjelly-2.1.0}/spikingjelly.egg-info/top_level.txt +0 -0
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,185 @@
1
+ SpikingJelly third-party attributions
2
+
3
+ This file collects attributions and license terms for adapted third-party
4
+ material. SpikingJelly modifications remain attributable to their respective
5
+ authors. Source paths below are relative to spikingjelly/.
6
+
7
+ Each component's copyright notice above its license reference is retained
8
+ separately. Shared terms below apply to each named component with its own
9
+ notice; they do not change the license of other components. Apache-2.0's
10
+ full text is in the repository root LICENSE (../LICENSE from this file).
11
+
12
+ Torchvision (BSD-3-Clause)
13
+ Copyright (c) Soumith Chintala 2016,
14
+ All rights reserved.
15
+ License: BSD-3-Clause below
16
+ Adapted ResNet/VGG implementations:
17
+ activation_based/model/spiking_resnet.py
18
+ activation_based/model/sew_resnet.py
19
+ activation_based/model/spiking_vgg.py
20
+ activation_based/model/spiking_vggws_ottt.py
21
+ Adapted classification training utilities:
22
+ activation_based/examples/common/train_classify.py
23
+ activation_based/examples/common/tv_ref_classify/
24
+ Reference: https://github.com/pytorch/vision/tree/9b5a3fecc72434dbd65148723efe54b28b9728c9
25
+
26
+ DeiT (Apache-2.0)
27
+ Copyright 2020 - present, Facebook, Inc
28
+ Original samplers.py: Copyright (c) 2015-present, Facebook, Inc.
29
+ All rights reserved.
30
+ License: Apache-2.0; full text in ../LICENSE
31
+ activation_based/examples/common/tv_ref_classify/sampler.py: RASampler
32
+ Modified for SpikingJelly, including configurable augmentation repetitions.
33
+ Reference: https://github.com/facebookresearch/deit/tree/a2ffd162edc49b30f6ed8044cd10444bf2ae1299
34
+
35
+ Lava-DL (BSD-3-Clause)
36
+ Copyright (c) 2021, Intel Corporation
37
+ All rights reserved.
38
+ Original norm.py: Copyright (C) 2022 Intel Corporation
39
+ License: BSD-3-Clause below
40
+ activation_based/lava_exchange.py: BatchNorm2d
41
+ Reference: https://github.com/lava-nc/lava-dl/tree/a6927a2597b7b4dd483414b66855744051384796
42
+
43
+ Spikformer (MIT)
44
+ Copyright (c) 2022 Zhaokun Zhou
45
+ License: MIT terms below
46
+ activation_based/layer/attention.py: SpikingSelfAttention
47
+ Reference: https://github.com/ZK-Zhou/spikformer/tree/621268981827af47aa666c1b5f774de4281d90ad
48
+
49
+ MA-SNN (MIT)
50
+ Copyright (c) 2022 xyz837
51
+ License: MIT terms below
52
+ activation_based/layer/attention.py: MultiDimensionalAttention,
53
+ _AxisAttention and _SpatialAttention
54
+ Reference: https://github.com/MA-SNN/MA-SNN/tree/8f87a7476920279e4f45e014aed868b62f8ef001
55
+
56
+ flash-snn and Flash Linear Attention (MIT)
57
+ Copyright (c) 2025 Yifan Huang
58
+ Copyright (c) 2023-2025 Songlin Yang
59
+ License: MIT terms below
60
+ ../ops/triton_runtime.py: contiguous/device guard
61
+ and automatic mixed precision helpers
62
+ References:
63
+ https://github.com/AllenYolk/flash-snn/tree/e31d0c332536425bf6a3d5e4c5ff0dba44678552
64
+ https://github.com/fla-org/flash-linear-attention/tree/f7d95fa04fcb2df07390b1bf8b7d6b96ffb7a16a
65
+
66
+ Events-tfds (MIT, declared in upstream package metadata)
67
+ Upstream author: Dominic Jack
68
+ License: MIT terms below, based on the upstream package declaration.
69
+ The upstream snapshot supplies no complete LICENSE or copyright year.
70
+ No additional copyright owner or year is asserted.
71
+ datasets/cifar10_dvs.py: event decoding helpers
72
+ datasets/utils.py: load_ATIS_bin
73
+ Reference: https://github.com/jackd/events-tfds/tree/0e61bedf71c0c4be1d6c9a00a9f55850c7f29986
74
+
75
+ Event-Python (MIT, upstream source of the ATIS decoder)
76
+ Copyright (c) 2016 Garrick Orchard
77
+ License: MIT terms below
78
+ datasets/utils.py: load_ATIS_bin, through events-tfds
79
+ Reference: https://github.com/gorchard/event-Python/tree/78dd3b0a7fc508d551cecdbf93b959dc2d265765
80
+
81
+ Torchaudio (BSD-2-Clause)
82
+ Copyright (c) 2017 Facebook Inc. (Soumith Chintala),
83
+ All rights reserved.
84
+ License: BSD-2-Clause below
85
+ datasets/speechcommands.py: dataset loading
86
+ activation_based/examples/speech_commands.py: MelScaleDelta and create_fb_matrix
87
+ References:
88
+ https://github.com/pytorch/audio/tree/95d9f2d272b2814010db7fc803a7d4dc6cf0c3b4
89
+ https://github.com/pytorch/audio/tree/9d50acf3970d9f0d2cb903c176f7d9523ba51b6a
90
+
91
+ OpenAI Baselines (MIT)
92
+ Copyright (c) 2017 OpenAI (http://openai.com)
93
+ License: MIT terms below
94
+ activation_based/examples/common/multiprocessing_env.py
95
+ Reference: https://github.com/openai/baselines/tree/ea25b9e8b234e6ee1bca43083f8f3cf974143998
96
+
97
+ PTAN (MIT)
98
+ Copyright 2017- Maxim Lapan <max.lapan@gmail.com>
99
+ License: MIT terms below
100
+ activation_based/examples/dsqn/ptan/: agent, actions and experience utilities
101
+ Reference: https://github.com/Shmuma/ptan/tree/5258ad3322b917e3021e34b4f5895c85cda8b958
102
+
103
+ Enabling Spike-based Backpropagation (MIT)
104
+ Copyright (c) 2020 Chankyu Lee
105
+ License: MIT terms below
106
+ activation_based/examples/cifar10_r11_enabling_spikebased_backpropagation.py
107
+ Reference: https://github.com/chan8972/Enabling_Spikebased_Backpropagation/tree/46e18a7b0741d08f155435e2c62acac4bebe5b2f
108
+
109
+ LICENSE TERMS
110
+
111
+ ========================================================================
112
+ MIT
113
+ ========================================================================
114
+
115
+ Permission is hereby granted, free of charge, to any person obtaining a copy
116
+ of this software and associated documentation files (the "Software"), to deal
117
+ in the Software without restriction, including without limitation the rights
118
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
119
+ copies of the Software, and to permit persons to whom the Software is
120
+ furnished to do so, subject to the following conditions:
121
+
122
+ The above copyright notice and this permission notice shall be included in
123
+ all copies or substantial portions of the Software.
124
+
125
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
126
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
127
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
128
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
129
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
130
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
131
+ THE SOFTWARE.
132
+
133
+ ========================================================================
134
+ BSD-2-Clause
135
+ ========================================================================
136
+
137
+ Redistribution and use in source and binary forms, with or without
138
+ modification, are permitted provided that the following conditions are met:
139
+
140
+ * Redistributions of source code must retain the above copyright notice, this
141
+ list of conditions and the following disclaimer.
142
+
143
+ * Redistributions in binary form must reproduce the above copyright notice,
144
+ this list of conditions and the following disclaimer in the documentation
145
+ and/or other materials provided with the distribution.
146
+
147
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
148
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
149
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
150
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
151
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
152
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
153
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
154
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
155
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
156
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
157
+
158
+ ========================================================================
159
+ BSD-3-Clause
160
+ ========================================================================
161
+
162
+ Redistribution and use in source and binary forms, with or without
163
+ modification, are permitted provided that the following conditions are met:
164
+
165
+ 1. Redistributions of source code must retain the above copyright notice, this
166
+ list of conditions and the following disclaimer.
167
+
168
+ 2. Redistributions in binary form must reproduce the above copyright notice,
169
+ this list of conditions and the following disclaimer in the documentation
170
+ and/or other materials provided with the distribution.
171
+
172
+ 3. Neither the name of the copyright holder nor the names of its
173
+ contributors may be used to endorse or promote products derived from
174
+ this software without specific prior written permission.
175
+
176
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
177
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
178
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
179
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
180
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
181
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
182
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
183
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
184
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
185
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,2 @@
1
+ recursive-include ops *.py *.cu *.cuh
2
+ global-exclude *.so *.pyd _native_build.json
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spikingjelly
3
- Version: 2.0.0.dev2
3
+ Version: 2.1.0
4
4
  Summary: A deep learning framework for SNNs built on PyTorch.
5
5
  Author: PKU MLG, PCL, and other contributors
6
6
  Author-email: fwei@pku.edu.cn, chyq@pku.edu.cn, yfhuang@pku.edu.cn
@@ -14,11 +14,7 @@ Classifier: Operating System :: OS Independent
14
14
  Requires-Python: >=3.11
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- License-File: LICENSES/README.md
18
- License-File: LICENSES/translations/LICENSE.de
19
- License-File: LICENSES/translations/LICENSE.en
20
- License-File: LICENSES/translations/LICENSE.fr
21
- License-File: LICENSES/translations/LICENSE.hi
17
+ License-File: LICENSES/NOTICE
22
18
  Requires-Dist: torch>=2.6.0
23
19
  Requires-Dist: torchvision
24
20
  Requires-Dist: torchaudio
@@ -32,12 +28,8 @@ Requires-Dist: SciencePlots
32
28
  Requires-Dist: scipy
33
29
  Requires-Dist: tensorboard
34
30
  Requires-Dist: tqdm
35
- Provides-Extra: cupy11
36
- Requires-Dist: cupy-cuda11x; extra == "cupy11"
37
- Provides-Extra: cupy12
38
- Requires-Dist: cupy-cuda12x; extra == "cupy12"
39
31
  Provides-Extra: triton
40
- Requires-Dist: triton>=3.3.1; extra == "triton"
32
+ Requires-Dist: triton>=3.2.0; extra == "triton"
41
33
  Provides-Extra: nir
42
34
  Requires-Dist: nir<2,>=1.0.7; extra == "nir"
43
35
  Requires-Dist: nirtorch<2.7,>=2.6; extra == "nir"
@@ -46,10 +38,14 @@ Requires-Dist: lightning; extra == "lightning"
46
38
  Requires-Dist: jsonargparse[signatures]; extra == "lightning"
47
39
  Provides-Extra: megatron
48
40
  Requires-Dist: megatron-core==0.18.2; python_version >= "3.12" and extra == "megatron"
49
- Provides-Extra: fp8-torchao
50
- Requires-Dist: torchao<0.18,>=0.13; extra == "fp8-torchao"
51
- Provides-Extra: fp8-te
52
- Requires-Dist: transformer-engine[pytorch]<3,>=2.16; extra == "fp8-te"
41
+ Requires-Dist: psutil; python_version >= "3.12" and extra == "megatron"
42
+ Provides-Extra: sglang
43
+ Requires-Dist: flash-attn-4==4.0.0b19; sys_platform == "linux" and extra == "sglang"
44
+ Requires-Dist: sglang==0.5.17; sys_platform == "linux" and extra == "sglang"
45
+ Provides-Extra: sglang-export
46
+ Requires-Dist: safetensors; extra == "sglang-export"
47
+ Provides-Extra: fp8
48
+ Requires-Dist: transformer-engine[pytorch]<3,>=2.16; extra == "fp8"
53
49
  Provides-Extra: qwen
54
50
  Requires-Dist: transformers==5.13.0; extra == "qwen"
55
51
  Dynamic: license-file
@@ -73,7 +69,7 @@ Dynamic: license-file
73
69
  - [Installation](#installation)
74
70
  - [Quick Start](#quick-start)
75
71
  - [Core Capabilities](#core-capabilities)
76
- - [Backend Performance](#backend-performance)
72
+ - [Operator Execution](#operator-execution)
77
73
  - [Large-Scale SNN Systems](#large-scale-snn-systems)
78
74
  - [Datasets](#datasets)
79
75
  - [Interchange and Deployment](#interchange-and-deployment)
@@ -90,45 +86,33 @@ SpikingJelly is a PyTorch-native framework for spiking neural networks (SNNs), w
90
86
  - Beginner-friendly API
91
87
  - ANN2SNN conversion
92
88
  - Event-based datasets
93
- - Acceleration backends: `torch`, `cupy`, `triton`
89
+ - Automatic operator execution: Torch, Triton and optional native CUDA
94
90
  - Memory-efficient training, distributed execution, precision control
95
91
  - Hardware deployment and framework exchange
96
92
 
97
93
  ## Installation
98
94
 
99
- SpikingJelly is built on PyTorch. Install [PyTorch, torchvision, and torchaudio](https://pytorch.org/) first.
95
+ Use uv in an activated virtual environment: Python `>=3.11`, Torch `>=2.6`.
96
+ First install [PyTorch](https://pytorch.org/get-started/locally/).
100
97
 
101
- - Python `>=3.11`
102
- - PyTorch `>=2.6.0` (tested with `2.7.1`)
103
-
104
- Install the latest stable PyPI release:
105
-
106
- ```bash
107
- pip install spikingjelly
108
- ```
109
-
110
- Install V2 pre-releases from PyPI when they are published:
111
-
112
- ```bash
113
- pip install --pre spikingjelly
114
- ```
98
+ | Install | Command |
99
+ | --- | --- |
100
+ | PyPI release | `uv pip install spikingjelly` |
101
+ | PyPI pre-release | `uv pip install --pre spikingjelly` |
102
+ | Optional Triton (if missing) | `uv pip install "spikingjelly[triton]"` |
103
+ | Latest development source | `uv pip install git+https://github.com/fangwei123456/spikingjelly.git` |
115
104
 
116
- Install the latest development version from source:
105
+ Native CUDA (requires a toolchain; available after the corresponding V2 PyPI release):
117
106
 
118
107
  ```bash
119
- git clone https://github.com/fangwei123456/spikingjelly.git
120
- cd spikingjelly
121
- pip install .
108
+ SJ_BUILD_NATIVE_CUDA=1 uv pip install \
109
+ --no-build-isolation --no-binary spikingjelly \
110
+ --reinstall-package spikingjelly --no-cache "spikingjelly>=2.0.0"
122
111
  ```
123
112
 
124
- Optional dependencies:
125
-
126
- | Feature | Install |
127
- | --- | --- |
128
- | CuPy backend | `pip install cupy-cuda12x` or `pip install cupy-cuda11x` |
129
- | Triton backend | `pip install triton==3.3.1` |
130
- | NIR exchange | `pip install "spikingjelly[nir]"` (PyPI) or `pip install ".[nir]"` (source checkout) |
131
- | Lightning integration | `pip install lightning jsonargparse[signatures]` |
113
+ See the [installation guide](https://spikingjelly.readthedocs.io/zh_CN/latest/tutorials/en/install.html)
114
+ for prerequisites, decision diagrams, other extras and troubleshooting.
115
+ Unreleased changes require the development source.
132
116
 
133
117
  ## Quick Start
134
118
 
@@ -157,19 +141,25 @@ Next steps:
157
141
  | --- | --- |
158
142
  | SNN modeling | Activation-based SNN components: spiking neurons, surrogate gradients, stateful and stateless modules. Predefined SNN models. |
159
143
  | Training workflows | PyTorch-native training flows, online-learning utilities, and ANN2SNN conversion |
160
- | Performance | `torch`, `cupy`, and `triton` backends, FlexSN for customized neuron kernels, and mixed-precision training utilities (e.g., `fp8`) |
144
+ | Performance | automatic Torch/Triton/native CUDA execution, FlexSN for customized neuron kernels, and mixed-precision training utilities (e.g., `fp8`) |
161
145
  | Scaling | Memory-efficient training, and distributed training |
162
146
  | Datasets | Neuromorphic datasets, and data preprocessing pipelines |
163
147
  | Analysis | FLOPs / SynOps / memory-access profiling, and inference energy estimation |
164
148
  | Interchange and deployment | NIR, Lava, and Lynxi-oriented exchange interfaces for neuromorphic workflows |
165
149
 
166
- ### Backend Performance
150
+ ### Operator Execution
167
151
 
168
- Spiking neuron models run on `torch`, `cupy`, or `triton` backends. The backend is set at neuron creation and can be changed later. All backends are compatible with `torch.compile`.
152
+ Neuron execution is selected automatically from tensor device and execution path:
153
+ CPU uses Torch; CUDA eager prefers compatible native CUDA, while Inductor
154
+ expansion prefers Triton. CUDA Graph retains its pre-capture choice. No public
155
+ neuron backend argument and no CuPy dependency are required. Low-precision
156
+ state profiles can use Torch reference execution.
169
157
 
170
- Below: execution time comparison for multi-step LIF neurons on `torch` vs `cupy`. Triton is covered in the backend tutorials.
171
-
172
- <img src="./docs/source/_static/tutorials/11_cext_neuron_with_lbl/exe_time_fb.png" alt="Backend benchmark for multi-step LIF neurons" />
158
+ Pure Python wheels include Torch reference and optional Triton execution.
159
+ Optional native neuron, fused IF/LIF-Linear and packed/sparse projection builds
160
+ are described under [Installation](#installation). Missing extensions use Torch reference
161
+ for projections; fused no-intermediate-spike performance requires the extension.
162
+ Use ordinary Linear/Conv plus `memopt` instead of retired `SpikeLinear/SpikeConv`.
173
163
 
174
164
  ### Large-Scale SNN Systems
175
165
 
@@ -212,10 +202,12 @@ Export SpikingJelly models to neuromorphic hardware or other frameworks:
212
202
 
213
203
  **Development / release policy:**
214
204
 
215
- Starting from SpikingJelly V2, release versions follow PEP 440 compatible,
216
- SemVer-style `MAJOR.MINOR.PATCH` semantics. `MAJOR` marks compatibility
217
- generations, `MINOR` adds backward-compatible functionality, and `PATCH` fixes
218
- bugs. Python package pre-release spelling is used for V2 development releases,
205
+ Starting from SpikingJelly V2, release versions use PEP 440 compatible
206
+ `MAJOR.MINOR.PATCH` numbers. `MAJOR` marks compatibility generations; `MINOR`
207
+ may include interface changes that require migration, and `PATCH` provides
208
+ backward-compatible bug fixes. Check the changelog before upgrading a minor
209
+ version; pin `spikingjelly>=2.0,<2.1` to retain the 2.0 interfaces.
210
+ Python package pre-release spelling is used for V2 development releases,
219
211
  for example `2.0.0.dev0`, `2.0.0a1`, `2.0.0b1`, and `2.0.0rc1`.
220
212
 
221
213
  See [CHANGELOG.md](./CHANGELOG.md) for the V2 release changelog.
@@ -244,10 +236,9 @@ Historical documentation:
244
236
 
245
237
  ## License
246
238
 
247
- SpikingJelly is distributed under the Open-Intelligence Open Source License
248
- Version 1.0. See the [authoritative Chinese license](./LICENSE),
249
- [translations](./LICENSES/translations/), and the
250
- [usage and distribution guide](./LICENSES/README.md).
239
+ SpikingJelly's project license is [Apache-2.0](./LICENSE). Third-party
240
+ attributions and license terms are collected in [LICENSES/NOTICE](./LICENSES/NOTICE).
241
+ See the [license guide](./LICENSES/README.md) for scope and historical licenses.
251
242
 
252
243
  ## Acknowledgement
253
244
 
@@ -290,6 +281,14 @@ The main institutions behind SpikingJelly are [Multimedia Learning Group, Instit
290
281
  - [Issues and development discussion](https://github.com/fangwei123456/spikingjelly/issues)
291
282
  - [OpenI mirror](https://openi.pcl.ac.cn/OpenI/spikingjelly)
292
283
  - [Community Jupyter tutorials in Chinese](https://github.com/fangwei123456/spikingjelly/tree/8932ac0668fe19b3efd0afedb3ca454cd8c126d3/community_tutorials/jupyter/chinese)
284
+ - Also check out our friends at [btorch](https://github.com/Criticality-Cognitive-Computation-Lab/btorch), a PyTorch toolkit for computational neuroscience and biologically plausible modeling.
285
+
286
+ <a href="https://star-history.com/#fangwei123456/spikingjelly&amp;Date">
287
+ <picture>
288
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=fangwei123456/spikingjelly&amp;type=Date&amp;theme=dark" />
289
+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=fangwei123456/spikingjelly&amp;type=Date" />
290
+ </picture>
291
+ </a>
293
292
 
294
293
  ## Contributing
295
294