Skip to content

xla_ops/pad.mlir test fail for vulkan backend on Android #2531

Closed

Description

@hanhanW

This could be root cause of #2345, although it's passing on Desktop GPU and SwiftShader. The first time I saw the convolution issue was to extract padding attributes from conv op, thus I'll start with looking into this bug before #2345.

Activity

  1. added
    bug 🐞
    codegen
    platform/android 🤖
    on Jul 15, 2020
  2. self-assigned this
    on Jul 15, 2020
  3. hanhanW commented on Jul 15, 2020

    @hanhanW
    ContributorAuthor

    Log:

    107: I ../iree/tools/vm_util.cc:305] Creating driver and device for 'vulkan'...
    107: I ../iree/hal/vulkan/vulkan_driver.cc:295] Created Vulkan Device: Mali-G76
    107: [==========] Running 2 tests from 1 test suite.
    107: [----------] Global test environment set-up.
    107: [----------] 2 tests from module
    107: [ RUN      ] module.pad_test
    107: E ../iree/base/api_util.h:29] INTERNAL: VK_ERROR_DEVICE_LOST
    107: E ../iree/base/api_util.h:29] INTERNAL: while executing hal.ex.submit_and_wait
    107: ../iree/modules/check/check_module_main.cc:72: Failure
    107: Expected equality of these values:
    107:   IREE_STATUS_OK
    107:     Which is: 0
    107:   ((iree_status_code_t)(iree_vm_invoke(context_, function_, nullptr, nullptr, nullptr, iree_allocator_t { 0, iree_allocator_system_allocat
    e, iree_allocator_system_free }) & IREE_STATUS_CODE_MASK))
    107:     Which is: 13
    107: [  FAILED  ] module.pad_test, where GetParam() = 1 (30 ms)
    107: [ RUN      ] module.pad_no_op
    107: E ../iree/base/api_util.h:29] INTERNAL: VK_ERROR_DEVICE_LOST
    107: ../iree/modules/check/check_module_main.cc:72: Failure
    107: Expected equality of these values:
    107:   IREE_STATUS_OK
    107:     Which is: 0
    107:   ((iree_status_code_t)(iree_vm_invoke(context_, function_, nullptr, nullptr, nullptr, iree_allocator_t { 0, iree_allocator_system_allocat
    e, iree_allocator_system_free }) & IREE_STATUS_CODE_MASK))
    107:     Which is: 13
    107: E ../iree/base/api_util.h:29] INTERNAL: while executing hal.ex.submit_and_wait
    107: [  FAILED  ] module.pad_no_op, where GetParam() = 3 (21 ms)
    

    Don't have ideas for this yet. Tag @ScottTodd and @antiagainst for visibility.

  4. hanhanW commented on Jul 15, 2020

    @hanhanW
    ContributorAuthor

    To repro:

    $ ctest -V -R iree/test/e2e/xla_ops:check_vulkan-spirv_vulkan_pad.mlir_on_android_device
  5. added
    hal/vulkan
    codegen/spirv
    on Jul 20, 2020
  6. hanhanW commented on Jul 21, 2020

    @hanhanW
    ContributorAuthor

    There is out-of-bound accessing in pad op, because we lower it to indexed_generic op. The output buffer is larger than the input buffer, so the loop will iterate over the whole output buffer and it will also use the same index to access the input buffer.

    The fix would be lowering the pad op to linalg.fill + subview + linalg.copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug 🐞codegencodegen/spirvhal/vulkanplatform/android 🤖

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions