Search found 168 matches

by v923z
Mon Nov 04, 2019 6:11 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

I gave your pybd_sf6 firmware a try and the speed gains are indeed spectacular (I'm mixing different sound tracks in real time at 16kHz; ulab really shines). :D I did notice that with this firmware I lost the ability to use DAC.write_timed in DAC.NORMAL mode. When I run the code below on the latest...
by v923z
Mon Nov 04, 2019 6:00 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

By changing all occurrences of sinf, and sqrtf to sin, and sqrt, I managed to compile the firmware for PYBD: https://github.com/v923z/micropython-ul ... s/tag/0.23. I can't test the results, so I can only hope that it works for you. But then the compilation fails for the pyboard.v.1.1. There must b...
by v923z
Fri Nov 01, 2019 3:16 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

If I may, I have a feature request. Would it be possible to implement the __mod__ operator (%)? Sometimes it is really useful to do something like the following to efficiently cycle over an array: from ulab import linspace a = linspace(1,3,num=3) k = linspace(1,10,num=10,dtype='int') print(a[k%3]) ...
by v923z
Fri Nov 01, 2019 1:57 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

Hi all, I would suggest changing all occurrences of "float" to "mp_float_t", that will allow it to compile for all targets with the FP precision supported/configured by the target. Done. I have also uploaded compiled firmware for pybv11, and pybd_sf6 to https://github.com/v923z/micropython-ulab/rele...
by v923z
Fri Nov 01, 2019 11:48 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

The PYBD_SF6 uses double precision float, and only provides the double precision math functions (eg sin, cos, not sinf, cosf). I see in your ulab code that you use "float" exclusively as the FP data type (at the C level). Is this a restriction or can it also work with double? I think one must consi...
by v923z
Thu Oct 31, 2019 11:29 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

If I may suggest: I suspect many "regular" numpy users out there would find it very useful to have access to precompiled firmwares for all three pyboard-D models. By changing all occurrences of sinf, and sqrtf to sin, and sqrt, I managed to compile the firmware for PYBD: https://github.com/v923z/mi...
by v923z
Thu Oct 31, 2019 11:09 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

make BOARD=PYBD_SF6 CROSS_COMPILE=/usr/local/bin/arm-none-eabi- I get the following error: make: *** No rule to make target `lib/mbedtls/library/aes.c', needed by `build-PYBD_SF6/genhdr/qstr.i.last'. Stop. I have just tried to compile for the PYBD board (though, I have none), and while I get the st...
by v923z
Thu Oct 31, 2019 10:43 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

I am trying to compile ulab for the PYBD_SF6 on macOS following instructions found at https://github.com/v923z/micropython-ulab/blob/master/docs/source/ulab.rst . When I run make BOARD=PYBD_SF6 CROSS_COMPILE=/usr/local/bin/arm-none-eabi- I get the following error: make: *** No rule to make target `...
by v923z
Thu Oct 31, 2019 10:31 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

Jim, Am I correct in saying that for the reversed case, you simply swap the operands, and call the same function again? Yes, runtime.c will do this when none of the previous options have worked and it would otherwise raise TypeError. It changes the op from FOO to REVERSE_FOO and calls your binary op...
by v923z
Wed Oct 30, 2019 8:54 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 108
Views: 94148

Re: ulab, or what you will - numpy on bare metal

I see this ;libiary has featured on Hackster.io https://www.hackster.io/news/zoltan-voros-ulab-brings-numpy-style-fast-math-to-micropython-in-just-25kb-of-compiled-code-aa52a81cd269?fbclid=IwAR2ESld_uyybmrVrRXXd5CmU5DF27v7eSp79zRYhlfRHImNl99oOo5q-u1I It must have leaked from hackaday.com, or perhap...