Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Pycom firmwares with single/double precision and ulab module

    Scheduled Pinned Locked Moved Firmware
    10 Posts 5 Posters 241 Views 6 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rcolisteteR Offline
      rcolistete
      last edited by rcolistete

      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).

      My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

      ph.robadelP 1 Reply Last reply Reply Quote 3
      • ph.robadelP Offline
        ph.robadel @rcolistete
        last edited by

        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.

        1 Reply Last reply Reply Quote 2
        • C Offline
          Clemens
          last edited by

          Is there a firmware version with ulab and I2S support? ;-) See https://forum.pycom.io/topic/997/support-for-i2s-interface/2?_=1598400307290

          rcolisteteR 1 Reply Last reply Reply Quote 1
          • rcolisteteR Offline
            rcolistete @Clemens
            last edited by rcolistete

            @Clemens Not yet, but I can verify if the I2S code can be merged without much work. Is there a PR ?

            My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

            C E 2 Replies Last reply Reply Quote 0
            • C Offline
              Clemens @rcolistete
              last edited by Clemens

              @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

              1 Reply Last reply Reply Quote 1
              • C Offline
                Clemens
                last edited by Clemens

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • E Offline
                  eapefan @rcolistete
                  last edited by

                  @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.

                  E rcolisteteR 2 Replies Last reply Reply Quote 0
                  • E Offline
                    eapefan @eapefan
                    last edited by

                    @Clemens did you solve the issue with I2S support and ulab?

                    1 Reply Last reply Reply Quote 0
                    • rcolisteteR Offline
                      rcolistete @eapefan
                      last edited by

                      @eapefan Not yet, it is in my TO-DO list...

                      My "MicroPython Samples". My "MicroPython Firmwares" with many options (double precision, ulab, etc).

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        Jean Ferreira
                        last edited by Jean Ferreira

                        @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

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • First post
                          Last post

                        Pycom on Twitter

                        Pycom