build Android arm64-v8a wheel - #10
Conversation
|
my bad, for some reason gh didnt trigger actions on this branch on my fork? run succeeded on an another branch tho. |
|
there is another problem though The workaround is to explicitly install for android_25_arm64_v8a using --platform. it's not too bad, but still annoying, and there doesn’t seem to be a clean fix without lowering Mesa’s API or using a Python package built for API 25+. |
|
Neat. Does it work just as a compiler in tinygrad (ie. As for the the API version thing, if it requires significant patches to mesa to use version 24 it's probably fine to require |
|
so I spent some time analyzing the Android API requirement. Mesa’s API 25 minimum is basically an internal Meson configuration. it prevents configuring Mesa with a lower but the current Mesa 25.2.7 tinymesa build would not load on API 25. tinymesa builds Mesa outside Android’s full AOSP build system, using the NDK. the public NDK does not include private Android platform libraries like see here, line 3 adds https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-25.2.7/src/android_stub/meson.build#L1-20 the dummy implementations themselves are here: https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-25.2.7/src/android_stub/cutils_stub.cpp#L6-31
I didnt test on an actual API 24/25 device, which is almost a decade old at this point, so this is based on the ELF and platform ABI rather than a runtime test. based on that, I dont think it will load. API 30 is the first platform version that satisfies this particular Mesa 25.2.7 artifact’s runtime symbol dependencies. see here, the API 30 arm64 ABI dump lists TL;DR: Mesa’s API 25 minimum is only a Meson configuration floor, not an IR3 requirement or a guarantee that the resulting library runs on API 25. The current Mesa 25.2.7 tinymesa artifact still depends on private Android there are three paths now:
see here, : https://gitlab.freedesktop.org/mesa/mesa/-/blob/mesa-26.2.1/docs/relnotes/26.2.0.rst#L6007-6011 Mesa 26.2 still has an internal API 25 Meson floor, though, so an API 24 wheel would still need the one-line floor change. |
|
Got it. Sounds like we should target API 30 for now and then worry about updating to mesa 26.2 separately. I'm assuming that pytest run with NULL:IR3:a630 passing is doing that? |
|
yep, that’s the NULL:IR3:a630 compiler-only path. I’ve bumped the Android build/wheel to API 30 for now and added the explicit Termux pip install instructions to the README. |
00813a8 to
968d616
Compare


Adds an Android arm64-v8a build for libtinymesa.so.
NAK and libtinymesa_cpu.so are omitted to keep the Android build simple and avoid cross-compiling LLVM (its very annoying).
This keeps the Android wheel focused on the Adreno use case for now; broader compiler/CPU support can be added separately if needed.