Geoffrey Martin-Noble | 7eadb26 | 2020-10-08 16:43:37 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Geoffrey Martin-Noble | 552d3f8 | 2021-05-25 17:56:09 -0700 | [diff] [blame] | 3 | # Copyright 2020 The IREE Authors |
Geoffrey Martin-Noble | 7eadb26 | 2020-10-08 16:43:37 -0700 | [diff] [blame] | 4 | # |
Geoffrey Martin-Noble | 552d3f8 | 2021-05-25 17:56:09 -0700 | [diff] [blame] | 5 | # Licensed under the Apache License v2.0 with LLVM Exceptions. |
| 6 | # See https://llvm.org/LICENSE.txt for license information. |
| 7 | # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Geoffrey Martin-Noble | 7eadb26 | 2020-10-08 16:43:37 -0700 | [diff] [blame] | 8 | |
| 9 | # For use within a IREE bazel-swiftshader docker image on a Kokoro VM. |
| 10 | # Log some information about the environment, initialize the submodules and then |
| 11 | # run the bazel integrations tests. |
| 12 | |
Geoffrey Martin-Noble | 7eadb26 | 2020-10-08 16:43:37 -0700 | [diff] [blame] | 13 | set -x |
| 14 | |
| 15 | # Print Vulkan related information: SDK version and GPU ICD version |
| 16 | vulkaninfo 2> /tmp/vulkaninfo.stderr 1> /tmp/vulkaninfo.stdout |
| 17 | VULKAN_INSTANCE="$(grep "Vulkan Instance" /tmp/vulkaninfo.stdout)" |
| 18 | VK_PHYSICAL_DEVICE_PROPERTIES="$(grep -A7 "VkPhysicalDeviceProperties" /tmp/vulkaninfo.stdout)" |
| 19 | |
| 20 | if [[ -z "${VULKAN_INSTANCE?}" ]] || [[ -z "${VK_PHYSICAL_DEVICE_PROPERTIES?}" ]]; then |
| 21 | echo "Vulkan not found!" |
| 22 | cat /tmp/vulkaninfo.stdout |
| 23 | cat /tmp/vulkaninfo.stderr |
| 24 | exit 1 |
| 25 | fi |
| 26 | |
| 27 | echo "${VULKAN_INSTANCE?}" |
| 28 | echo "${VK_PHYSICAL_DEVICE_PROPERTIES?}" |