Skip to content

Vulkan validation errors after running model tests in OSS #5141

Closed

Description

@phoenix-meadowlark

I'm seeing errors like the following pop up when running models like MobileBertSquad and ResNet50:

python ../iree/integrations/tensorflow/e2e/mobile_bert_squad_test.py --target_backends=iree_vulkan
I0317 13:06:22.679272 140305521392512 test_util.py:2082] time(__main__.MobileBertSquadTest.test_serving_default): 13.95s
[       OK ] MobileBertSquadTest.test_serving_default
[ RUN      ] MobileBertSquadTest.test_session
[  SKIPPED ] MobileBertSquadTest.test_session
----------------------------------------------------------------------
Ran 2 tests in 13.974s

OK (skipped=1)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1050000000105, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkPipelineLayout 0x1050000000105[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x16c000000016c, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkPipelineLayout 0x16c000000016c[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x10f000000010f, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkPipelineLayout 0x10f000000010f[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1640000000164, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkPipelineLayout 0x1640000000164[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1070000000107, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkPipelineLayout 0x1070000000107[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1620000000162, type = VK_OBJECT_TYPE_PIPELINE_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkPipelineLayout 0x1620000000162[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)

E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1040000000104, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkDescriptorSetLayout 0x1040000000104[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1060000000106, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkDescriptorSetLayout 0x1060000000106[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x16b000000016b, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkDescriptorSetLayout 0x16b000000016b[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x10e000000010e, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkDescriptorSetLayout 0x10e000000010e[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1630000000163, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xcf41848[], VkDescriptorSetLayout 0x1630000000163[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)
E iree/iree/hal/vulkan/debug_reporter.cc:42] Validation Error: [ VUID-vkDestroyDevice-device-00378 ] Object 0: handle = 0xcf41848, type = VK_OBJECT_TYPE_DEVICE; Object 1: handle = 0x1610000000161, type = VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT; | MessageID = 0x71500fba | OBJ ERROR : For VkDevice 0xd98d368[], VkDescriptorSetLayout 0x1610000000161[] has not been destroyed. The Vulkan spec states: All child objects created on device must have been destroyed prior to destroying device (https://vulkan.lunarg.com/doc/view/1.2.141.0/linux/1.2-extensions/vkspec.html#VUID-vkDestroyDevice-device-00378)

These show up outside of the python bindings as well:

../iree-build/iree/tools/iree-run-mlir \
  --export-all \
  --iree-hal-target-backends=vulkan-spirv \
  --function-input=1x384xi32 \
  --function-input=1x384xi32 \
  --function-input=1x384xi32 \
  /tmp/iree/modules/MobileBertSquad/iree_input.mlir

The model is too big (189 MB) for me to share directly, but can be easily obtained via the python packages:

#!/usr/bin/zsh
# Run from within a clone of github.com/google/iree

# Create a virtual environment to keep things tidy.
python -m venv .venv/iree-install
source .venv/iree-install/bin/activate

# Ensure pip and TensorFlow have recent installation versions.
python -m pip install --upgrade pip
python -m pip install tf-nightly

# Install the compiler, runtime and all of the integration binaries. The last
# two binaries are optional.
python -m pip install \
  iree-compiler-snapshot \
  iree-runtime-snapshot \
  iree-tools-tf-snapshot \
  iree-tools-tflite-snapshot \
  iree-tools-xla-snapshot \
  -f https://github.com/google/iree/releases

Activity

  1. added
    bug 🐞
    hal/vulkan
    on Mar 17, 2021
  2. phoenix-meadowlark commented on Mar 17, 2021

    @phoenix-meadowlark
    ContributorAuthor

    I'm able to run single instances of these tests, but when I try to use ctest to run all of them is kills my VM and I need to do a full reboot. I'm not 100% sure that these errors point to the cause, but ctest --label-exclude "^driver=vulkan$" behaves as expected so it seems likely that they're related.

  3. ScottTodd commented on Mar 17, 2021

    @ScottTodd
    Member

    What OS / GPU / Vulkan version are you seeing these on?

  4. phoenix-meadowlark commented on Mar 17, 2021

    @phoenix-meadowlark
    ContributorAuthor
    cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux rodete"
    NAME="Debian GNU/Linux"
    ID=debian
    VERSION_CODENAME=rodete
    VERSION_ID=rodete

    No GPU
    VULKAN_SDK_VERSION=1.2.141.2
    Unsure how to check the swiftshader commit, but might be behind 84f5eeb6dd9b225f465f93737fa76aad7de355cf. Geoffrey mentioned seeing these errors too though.

  5. benvanik commented on Mar 30, 2021

    @benvanik
    Collaborator

    These leaks may be real - tracking them down now.

  6. self-assigned this
    on Mar 30, 2021
  7. benvanik commented on Mar 30, 2021

    @benvanik
    Collaborator

    Seems real - and something ASAN would catch too.

  8. added a commit that references this issue on Mar 30, 2021
    ca3d9bc
  9. added a commit that references this issue on Mar 30, 2021
    1c59bd1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug 🐞hal/vulkan

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions