Search found 110 matches

by v923z
Thu Oct 03, 2019 5:12 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

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

Chuck, Here are the code sizes of -O2 and -Os build options. text data bss dec hex filename 463704 40 28052 491796 78114 build-PYBV11_O2/firmware.elf 424484 40 28052 452576 6e7e0 build-PYBV11/firmware.elf You are probably compiling other modules into the firmware, because my size with the -O2 switch...
by v923z
Thu Oct 03, 2019 3:34 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

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

@v923z : Thanks for the info. BTW, using our build settings (gcc version 8.2.0, -O2) the test gave 1.8ms on PYBV11. O2 results in bigger code size but it makes sense to use it if there is some spare flash available. Good to know. I have used the standard settings, beyond passing the USER_C_MODULES ...
by v923z
Thu Oct 03, 2019 2:00 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

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

v923z wrote : I think there is a misunderstanding stemming from this post: chuckbook wrote : ↑ Fri Sep 27, 2019 1:13 pm Very impressive! Thanks for sharing this. 1k FFT (SP) in ~0.8ms on PYBD, not bad. In the original post, I quoted a measurement of 1.948 ms, and claimed that the FFT could be gotte...
by v923z
Thu Oct 03, 2019 10:11 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

Re: FFT speed

Peter, On the other hand, the assembly code worked with 16-bit integers, didn't it? Which in itself is not necessarily a drawback, given that the results of the ADC are also integers. That was a very old version. It used 32 bit integers, and dated to a time when the inline assembler didn't support f...
by v923z
Wed Oct 02, 2019 1:35 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

Re: FFT speed

I'm astounded by these figures. I've just run my assembler solution on Pyboard D at 214MHz. A 1K DFT takes 3.5ms (on SF2W or SF6W). I never pretended my code was optimised, but the fact that a modern compiler running the same algorithm beats it by a factor of four is a revelation. Peter, @chuckbook...
by v923z
Thu Sep 26, 2019 5:39 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

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

I think stijn's suggestion with the macros is going to be OK. Especially useful was the observation that the for loop should be the innermost statement. I believe, with that one can save a lot of time. Moreover, with the macro, one can get rid of the ndarray_get_float_value() function call, which sh...
by v923z
Thu Sep 26, 2019 2:16 pm
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

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

The other places where the same loop gets repeated for each typecode and operation is where C++ templates would really shine.. Personally I'd first investigate how to do that because I know it would shorten the code tremendously, but in C I'm not sure and YMMV. Probably a macro like ... Thanks, I t...
by v923z
Thu Sep 26, 2019 9:29 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

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

Agree with Damien: in order not to hinder adoption it should match numpy as closely as possible. In fact if you see it feasible, you could add the tests in the same way the MicroPython tests themselves are written (and hence also using it's run-tests): for supported features, write valid numpy code...
by v923z
Thu Sep 26, 2019 9:15 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

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

... @pythoncoder would surely like to know if an FFT costs a king's ransom. No, it doesn't. In fact, a 1024-point float transform can be gotten in less than 2 ms on the pyboard... I'm astounded. When I find time I'll study your code: are you using a better algorithm than my Cooley-Tukey code? Peter...
by v923z
Thu Sep 26, 2019 6:27 am
Forum: Development of MicroPython
Topic: ulab, or what you will - numpy on bare metal
Replies: 62
Views: 4842

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

Hi all, First, thanks a lot for the encouraging words. Second, yesterday I uploaded the announcement in such a hurry that I managed to hide a couple of mistakes in the code examples. You have probably figured this out already, but in any case, uint8, float, etc., and functions should be preceded by ...