chungheng / neural

Python implementation of a collection of neuron and synapse models
2 stars 1 forks source link

JIT Input argument dimensionality check #26

Open TK-21st opened 2 years ago

TK-21st commented 2 years ago

In numba codegen, the dimensionality of the input variable is not checked. This leads to issues when the kernel is defined to process in an element wise manner but the input is multi-dimensional. Should we enforce the number of input arguments to the same as the model's num?

  1. input 1 -> model num: Rely on broadcasting
  2. input num -> model num: index
TK-21st commented 2 years ago

CPU side execution is partly addressed by a overload function hack source.

Note that this does not work for GPU target yet.