lcompilers / lpython

Python compiler
https://lpython.org/
Other
1.5k stars 157 forks source link

LPython on ARM (v7 and/or v8 arch) #2774

Open beyonlo opened 1 month ago

beyonlo commented 1 month ago

Hello, this is an amazing project!

How is going on the roadmap to support LPython on ARM arch? I would like so much to use LPython on RaspberryPi 3, 4 and 5 (with Linux), that use ARM v7 and v8 processors.

In this site https://lpython.org/ shows that the ARM arch support is under development, but do not talk about the actual stage, plans/roadmap, and if the ARM (v7, or v8, or both) will be/or is supported. Would be great if anyone could explain better about that.

Thank you!

image

Vipul-Cariappa commented 1 month ago

I have a RaspberryPi 3. I can try compiling and using it there. I believe we do support the M series Mac books. So, we do support ARM to some extent. About ARM on Linux, some testing would be required.

Microsoft is also pushing Windows on ARM, and we will also need an ARM version of LPython on Windows.

@certik, any thoughts?

Vipul-Cariappa commented 1 month ago

From a quick search; It looks like conda-forge does not support Windows on ARM as of now, and it might not be possible to use LPython on Windows ARM machines, until conda-forge supports Windows on ARM, as we completely depend on conda for development and build process.

Reference: https://conda-forge.org/docs/maintainer/conda_forge_yml/#provider (Hope this is the correct reference)

certik commented 1 month ago

Right now we test Windows/x86, Linux/x86 and Apple/x86/arm. Things should work on Linux/arm as well, but we don't test it at the CI.

@beyonlo go ahead and try it, and if something fails, report a bug.

beyonlo commented 1 month ago

Hello @Vipul-Cariappa

I have a RaspberryPi 3. I can try compiling and using it there.

That will be nice!! Thank you

beyonlo commented 1 month ago

Hello @certik

Right now we test Windows/x86, Linux/x86 and Apple/x86/arm. Things should work on Linux/arm as well, but we don't test it at the CI.

Just a note. Please, correct me if I'm wrong, but it is valid in my view that it is important not just for work, but if it works good, with good performance in ARM like as in x86, I mean, maybe there are optimizations done for x86 that can be different than ARM. ARM became a very used arch, in some places more used than x86.

@beyonlo go ahead and try it, and if something fails, report a bug.

Unfortunately I have no ARM processors. My intention is only to buy one raspberry if LPython works fine on ARM, because I will use ARM just if LPython works fine on it. But if there is no other way, I will buy one to test.

Thank you so much!

Vipul-Cariappa commented 1 month ago

Hi @beyonlo, looks like my raspberry pi is broken. I had not used it for a year. It is stuck on a boot loop. I tried multiple OSes (ubuntu ARM server and Raspberry Pi OS), and SD cards, but could not get it running.