Skip to content

Android check tests for dylib-llvm-aot are failing #4090

Closed

Description

@ScottTodd

Blocking #3928

Sample buildkite run: https://buildkite.com/iree/iree-android-arm64-v8a/builds/3249

Summary:

The following tests FAILED:
--
  | 34 - iree/modules/check/test/check_dylib-llvm-aot_dylib_success.mlir_on_android_device (Failed)
  | 40 - iree/test/e2e/llvm_specific/check_llvm-aot-conv_img2col_conv.mlir_on_android_device (Failed)
  | 41 - iree/test/e2e/llvm_specific/check_llvm-aot-exponential_fast_exponential.mlir_on_android_device (Failed)
  | 50 - iree/test/e2e/structural/check_dylib-llvm-aot_dylib_slice_add.mlir_on_android_device (Failed)
  | 153 - iree/test/e2e/xla_ops/check_dylib-llvm-aot_dylib_abs.mlir_on_android_device (Failed)
  | 154 - iree/test/e2e/xla_ops/check_dylib-llvm-aot_dylib_add.mlir_on_android_device (Failed)
...

Specific error message:

+ adb shell 'cd /data/local/tmp && LD_LIBRARY_PATH=/data/local/tmp  iree/test/e2e/xla_ops/check_dylib-llvm-aot_dylib_while.mlir/iree-check-module --driver=dylib iree/test/e2e/xla_ops/check_dylib-llvm-aot_dylib_while.mlir/check_dylib-llvm-aot_dylib_while.mlir_module.module'
--
  | I ../iree/tools/utils/vm_util.cc:227] Creating driver and device for 'dylib'...
  | [==========] Running 1 test from 1 test suite.
  | [----------] Global test environment set-up.
  | [----------] 1 test from module
  | [ RUN      ] module.while
  | ../iree/modules/check/iree-check-module-main.cc:65: Failure
  | Value of: iree_vm_context_create_with_modules( instance_, modules_.data(), modules_.size(), iree_allocator_system(), &context_)
  | Expected: is OK
  | Actual: 0x7258e1120e (of type void*), which is not OK
  | [  FAILED  ] module.while, where GetParam() = 2 (1 ms)
  | [----------] 1 test from module (1 ms total)

We should be able to disable by setting IREE_LLVMAOT_DISABLE somewhere in our build/test scripts / Buildkite workflows / VM images.

Fixing may require setting the appropriate Android target triple as part of https://github.com/google/iree/blob/main/build_tools/cmake/iree_check_test.cmake

Activity

  1. added
    bug 🐞
    platform/android 🤖
    compiler/tools
    on Dec 4, 2020
  2. ScottTodd commented on Dec 4, 2020

    @ScottTodd
    MemberAuthor

    cc @GMNGeoffrey @asaadaldien @hanhanW
    If someone more familiar with our Android test infra and cross compilation on Linux could help with a workaround (or investigating the root cause), that would be appreciated. You can send pull requests based off of the scotttodd-llvmaot-config branch.

  3. asaadaldien commented on Dec 4, 2020

    @asaadaldien
    Contributor

    I think we need to set android target triple here some where here for iree--translation to use
    https://github.com/google/iree/blob/main/build_tools/cmake/iree_check_test.cmake#L98
    I will look into that, These tests are also failing locally right ?

  4. asaadaldien commented on Dec 7, 2020

    @asaadaldien
    Contributor

    I pushed a commit that made tests passes locally on scotttodd-llvmaot-config branch.

  5. ScottTodd commented on Dec 7, 2020

    @ScottTodd
    MemberAuthor

    I pushed a commit that made tests passes locally on scotttodd-llvmaot-config branch.

    Thanks! That looks about right to me, but it doesn't quite work on our Buildkite CI:

    https://buildkite.com/iree/iree-android-arm64-v8a/builds/3262#d95a9a46-5b89-4298-993b-96f66340c9f7

    [665/843] Generating check_dylib-llvm-aot_dylib_success.mlir_module.module
    
    FAILED: iree/modules/check/test/check_dylib-llvm-aot_dylib_success.mlir_module.module 
    
    cd /usr/src/github/iree/build/iree/modules/check/test && /usr/src/github/iree/build/host/bin/iree-translate -iree-mlir-to-vm-bytecode-module --iree-hal-target-backends=dylib-llvm-aot --iree-llvm-target-triple=aarch64-none-linux-android30 /usr/src/github/iree/iree/modules/check/test/success.mlir -o check_dylib-llvm-aot_dylib_success.mlir_module.module
    
    /usr/bin/ld: unrecognized -a option `tic-libstdc++'
    
    Linking failed; command line returned exit code 256:
    
    
    
    /usr/bin/ld -shared -o /tmp/success_linked_llvm_aot-e81837.so -static-libstdc++ /tmp/success_linked_llvm_aot-e81837.obj
    
    
    
    /usr/src/github/iree/iree/modules/check/test/success.mlir:0:0: error: failed to link executable and generate target dylib using linker toolchain /usr/bin/ld
    
    /usr/src/github/iree/iree/modules/check/test/success.mlir:0:0: error: failed to serialize op to target backend dylib*
    

    🤔

  6. asaadaldien commented on Dec 7, 2020

    @asaadaldien
    Contributor
  7. hanhanW commented on Dec 7, 2020

    @hanhanW
    Contributor
  8. ScottTodd commented on Dec 9, 2020

    @ScottTodd
    MemberAuthor

    Fixed!

  9. added
    infrastructure
    on May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐞compiler/toolsinfrastructureplatform/android 🤖

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions