Pycom firmwares with single/double precision and ulab module
-
ulab, a NumPy-like array manipulation library, is a native (in C) external/user module and it needs to be included in the firmware to work.
So I've built Pycom MicroPython firmwares from source code with more options than the official Pycom firmwares, see my
Pycom MicroPython firmwares repository, which includes :- 24 firmwares without ulab, in combinations of 6 xxPy boards, Pybytes or not, single/double precision for float point numbers;
- 21 firmwares with ulab, in combinations of 6 xxPy boards, Pybytes or not, single/double precision for float point numbers. 3 LoPy/SiPy/WiPy firmwares with ulab and Pybytes combinations are not possible due to the small firmware partition size of these boards.
These firmwares with ulab have 'MICROPY_PY_REVERSE_SPECIAL_METHODS' enabled to allow '1 + np.arange(10)', for example.
Pycom MicroPython firmwares with ulab were not simple at all : some backporting was needed from MicroPython v1.12 to Pycom MicroPython (currently based in v1.11).
-
@rcolistete this is really great work - I've been tempted to try a ulab port to pycom chips but didn't think I'd have the technical depth.
What is your plan to keep updating these? Alternatively are you able to share source code and marked changes (especially micropython v1.12 back port) to allow me to continue doing this custom build with ulab and dp?
The reason I ask is that Firmware Release v1.20.2.r2 has some LTE fixes I need so I'm hoping to apply this to the latest firmware
-
@eapefan Not yet, it is in my TO-DO list...
-
@Clemens did you solve the issue with I2S support and ulab?
-
@rcolistete any update on the firmware with ulab and I2S support? As Clemens I'm interested in having them both for Fipy, especially need the fft.
-
This post is deleted!
-
@rcolistete You may have a look at https://github.com/pycom/pycom-micropython-sigfox/pull/368 or https://github.com/daq-tools/pycom-micropython/commit/21ebf6ee4881caf5869720f219c2f083840d6113
-
@Clemens Not yet, but I can verify if the I2S code can be merged without much work. Is there a PR ?
-
Is there a firmware version with ulab and I2S support? ;-) See https://forum.pycom.io/topic/997/support-for-i2s-interface/2?_=1598400307290
-
ulab Samples is a repository with links, examples, benchmarks, etc, about ulab module, a NumPy-like array manipulation library for MicroPython and CircuitPython.
Most interesting is the ulab FFT benchmark for 1024 points, where you can see, among other boards, the performance of LoPy v1 and LoPy4 in single precision (SP/FP32) and double precision (DP/FP64). It would be similar to other ESP32 boards with mainline MicroPython v1.12 if the clock could be increased from 160 to 240 MHz. Notice that the performance of LoPy4 is 26% worse than LoPy v1 because the 4 MB of external PSRAM/SPIRAM (using QSPI bus) is slower than the 520 kB of internal RAM.
So it would be very useful to have Pycom MicroPython firmwares supporting 'machine.freq()' able to select the main clock frequency, like 40, 80, 160 and 240 MHz.