Uploaded image for project: 'The Virtual Brain'
  1. The Virtual Brain
  2. TVB-2063

Evaluate numba package for use in simulator

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5
    • Component/s: TVB-Simulator
    • Labels:
      None

      Description

      Numba is a jit compiler for numerical Python code which uses LLVM (Apple - sponsored compiler infrastructure, also used by Julia) to provide native speed for naïve for loop numerical operations on arrays.

      The performance is competitive with hand written C++ while being written (and debuggable) in Python. Being able to use Numba would likely avoid the need for compiled extension codes to accelerate the simulator. Mihai 's history speedup for example would no longer require a Cython extension but instead Numba dep.

      License is BSD.

      The main issue is that the package is not trivial to install: while it's provided with conda, pip install requires llvm etc. It also adds LLVM shared libraries which are several MB or more.

      The bottom line is that we could likely avoid c or c++ extensions with such a dependency with the added cost of larger distribution. If more specific benchmarking on performance and added library size would be useful, I can do that.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marmaduke.woodman Marmaduke Woodman
                Reporter:
                marmaduke.woodman Marmaduke Woodman
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours
                  4h