Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vulkan in termux #584

Open
liuw1535 opened this issue Feb 2, 2025 · 2 comments
Open

vulkan in termux #584

liuw1535 opened this issue Feb 2, 2025 · 2 comments

Comments

@liuw1535
Copy link

liuw1535 commented Feb 2, 2025

Image
I am unable to use Vulkan on Snapdragon 870 Android devices. Here is my construction process:
Due to the lack of glslc, I deployed shaderc first, and the build command is:

cmake -GNinja \
-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-24 \
-DSHADERC_SKIP_TESTS=ON \
..
ninja

Afterwards, copy the compiled glslc to/data/data/com. termux/files/usr/bin/
Now that glslc has been obtained, use the instructions in sd.cpp to build:

cmake .. -DSD_VULKAN=ON
cmake --build . --config Release

Finally, the SD binary file was obtained, but it cannot be used.
The above content is machine translation

@vmobilis
Copy link
Contributor

vmobilis commented Feb 3, 2025

@liuw1535, hello, try latest master of ggml, I used ggml/475e012 commit, it seems to work. (Sort of 🙃, Vulkan version is 4 times slower than CPU for me, don't know why).
Though I built with Clang from Termux, not from NDK.
(And since I don't have Adreno, I used "vulkan-loader-android" package).

Full image.

@vmobilis
Copy link
Contributor

vmobilis commented Feb 12, 2025

@liuw1535, out of curiosity, have you managed to run it? Maybe it also depends on version of "glslc" Vulkan compiler, I used this version of shaderc: google/shaderc@f5d626f .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants