diff --git a/.github/workflows/xtensa.yml b/.github/workflows/xtensa.yml index b2fea50fb1c06e01334ffbbd13a57aa81f56adda..351173484b8699dc5320d4de530cccb0848c569c 100644 --- a/.github/workflows/xtensa.yml +++ b/.github/workflows/xtensa.yml @@ -55,22 +55,37 @@ jobs: echo ${{ secrets.TFLM_BOT_PACKAGE_READ_TOKEN }} | docker login ghcr.io -u tflm-bot --password-stdin docker run --rm -v `pwd`:/opt/tflite-micro ghcr.io/tflm-bot/xtensa:0.1 /opt/tflite-micro/tensorflow/lite/micro/tools/ci_build/test_xtensa_hifi5.sh + vision_p6_presubmit: + runs-on: ubuntu-latest + + if: | + github.event_name == 'workflow_dispatch' || + (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:run')) + + name: Vision P6 Build (presubmit) + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + - run: | + echo ${{ secrets.TFLM_BOT_PACKAGE_READ_TOKEN }} | docker login ghcr.io -u tflm-bot --password-stdin + docker run --rm -v `pwd`:/opt/tflite-micro ghcr.io/tflm-bot/xtensa:0.1 /opt/tflite-micro/tensorflow/lite/micro/tools/ci_build/test_xtensa_vision_p6.sh + vision_p6_unit_tests: runs-on: ubuntu-latest if: | github.event_name == 'workflow_dispatch' || - (github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'ci:run')) || (github.event_name == 'schedule' && github.repository == 'tensorflow/tflite-micro') - name: Vision P6 Unit Tests (presubmit) + name: Vision P6 Unit Tests (nightly) steps: - uses: actions/checkout@v2 with: ref: ${{ github.event.pull_request.head.sha }} - run: | echo ${{ secrets.TFLM_BOT_PACKAGE_READ_TOKEN }} | docker login ghcr.io -u tflm-bot --password-stdin - docker run --rm -v `pwd`:/opt/tflite-micro ghcr.io/tflm-bot/xtensa:0.1 /opt/tflite-micro/tensorflow/lite/micro/tools/ci_build/test_xtensa_vision_p6.sh + docker run --rm -v `pwd`:/opt/tflite-micro ghcr.io/tflm-bot/xtensa:0.1 /opt/tflite-micro/tensorflow/lite/micro/tools/ci_build/test_xtensa_vision_p6.sh RUN_TESTS hifi_3z_unit_tests: runs-on: ubuntu-latest diff --git a/tensorflow/lite/micro/tools/ci_build/test_xtensa_vision_p6.sh b/tensorflow/lite/micro/tools/ci_build/test_xtensa_vision_p6.sh index 3baa000139c56aa369c731055d45f49dcd054aed..6741977ac73de2662bac79d58e0c2f9270ce5004 100755 --- a/tensorflow/lite/micro/tools/ci_build/test_xtensa_vision_p6.sh +++ b/tensorflow/lite/micro/tools/ci_build/test_xtensa_vision_p6.sh @@ -28,9 +28,22 @@ readable_run make -f tensorflow/lite/micro/tools/make/Makefile clean # TODO(b/143904317): downloading first to allow for parallel builds. readable_run make -f tensorflow/lite/micro/tools/make/Makefile third_party_downloads -readable_run make -f tensorflow/lite/micro/tools/make/Makefile \ - TARGET=xtensa \ - TARGET_ARCH=vision_p6 \ - OPTIMIZED_KERNEL_DIR=xtensa \ - XTENSA_CORE=P6_200528 \ - test -j$(nproc) +# Since we currently do not have optimized kernel implemetations for vision_p6, +# running the tests (in particular person_detection_int8) takes a very long +# time. So, we have changed the default for this script to only perform a build +# and added an option to run all the tests when that is feasible. +if [[ ${1} == "RUN_TESTS" ]]; then + readable_run make -f tensorflow/lite/micro/tools/make/Makefile \ + TARGET=xtensa \ + TARGET_ARCH=vision_p6 \ + OPTIMIZED_KERNEL_DIR=xtensa \ + XTENSA_CORE=P6_200528 \ + test -j$(nproc) +else + readable_run make -f tensorflow/lite/micro/tools/make/Makefile \ + TARGET=xtensa \ + TARGET_ARCH=vision_p6 \ + OPTIMIZED_KERNEL_DIR=xtensa \ + XTENSA_CORE=P6_200528 \ + build -j$(nproc) +fi