Skip to content

add runner android build ci #2733

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

Closed
wants to merge 16 commits into from
Closed

add runner android build ci #2733

wants to merge 16 commits into from

Conversation

cccclai
Copy link
Contributor

@cccclai cccclai commented Mar 28, 2024

As title, add a new CI to cover cross compile android build for llama runner

Copy link

pytorch-bot bot commented Mar 28, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/2733

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 2a24105 with merge base 694d841 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 28, 2024
@cccclai cccclai marked this pull request as draft March 28, 2024 01:18
ANDROID_NDK=/opt/ndk
BUCK2=$(which buck2)
FLATC=$(which flatc) ANDROID_ABI=arm64-v8a
cmake -DBUCK2="$BUCK" -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK"/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 -DCMAKE_INSTALL_PREFIX=cmake-android-out -DCMAKE_BUILD_TYPE=Release -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON -DEXECUTORCH_ENABLE_LOGGING=1 -DEXECUTORCH_BUILD_XNNPACK=ON -DPYTHON_EXECUTABLE=python -DEXECUTORCH_BUILD_OPTIMIZED=ON -DXNNPACK_ENABLE_ARM_BF16=OFF -Bcmake-android-out .
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit format one option per line? Just too hard to read / parse - something like this

Suggested change
cmake -DBUCK2="$BUCK" -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK"/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 -DCMAKE_INSTALL_PREFIX=cmake-android-out -DCMAKE_BUILD_TYPE=Release -DEXECUTORCH_BUILD_EXTENSION_MODULE=ON -DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON -DEXECUTORCH_ENABLE_LOGGING=1 -DEXECUTORCH_BUILD_XNNPACK=ON -DPYTHON_EXECUTABLE=python -DEXECUTORCH_BUILD_OPTIMIZED=ON -DXNNPACK_ENABLE_ARM_BF16=OFF -Bcmake-android-out .
cmake \
-DBUCK2="$BUCK" \
-DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK"/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=arm64-v8a \
-DANDROID_PLATFORM=android-23 \
-DCMAKE_INSTALL_PREFIX=cmake-android-out \
-DCMAKE_BUILD_TYPE=Release \
-DEXECUTORCH_BUILD_EXTENSION_MODULE=ON \
-DEXECUTORCH_BUILD_EXTENSION_DATA_LOADER=ON \
-DEXECUTORCH_ENABLE_LOGGING=1 \
-DEXECUTORCH_BUILD_XNNPACK=ON \
-DPYTHON_EXECUTABLE=python \
-DEXECUTORCH_BUILD_OPTIMIZED=ON \
-DXNNPACK_ENABLE_ARM_BF16=OFF \
-Bcmake-android-out .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have to disable BF16? Which version of the NDK we have for the CI job?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r26c, I ran into error with DXNNPACK_ENABLE_ARM_BF16=OFF, maybe can try removing it later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I didnt have to do this. I would suggest try removing it

}

build_llama_runner() {
echo "Exporting MobilenetV2"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Running MV2? :p
  • Update BUCK2 path
  • why hardcode -j16?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was just copying my local command...will updated

@cccclai cccclai marked this pull request as ready for review March 29, 2024 04:52
@facebook-github-bot
Copy link
Contributor

@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cccclai
Copy link
Contributor Author

cccclai commented Mar 29, 2024

@facebook-github-bot
Copy link
Contributor

@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@cccclai merged this pull request in f799c0e.

dbort pushed a commit to dbort/executorch that referenced this pull request Mar 30, 2024
Summary:
As title, add a new CI to cover cross compile android build for llama runner

Pull Request resolved: pytorch#2733

Reviewed By: kimishpatel

Differential Revision: D55512563

Pulled By: cccclai

fbshipit-source-id: a9089abc2acfac4f61750933a86facae639f1b8e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants