Browse Source

Added Vulkan Vision, a framework for fine-grained analysis of Vulkan pipeline execution on the GPU published at CGO 2021. Analysis includes AI workloads through the compute pipeline.

Vulkan Vision inserts dynamic instrumentation to gain unprecedented execution trace information of vulkan applications. For example, the execution trace can be used to determine the hotness of various regions of a compute shader. In addition, the runtime SIMD utilization can be cross-referenced with the hotness to find optimization candidates. Vulkan Vision was accepted to the Code Generation and Optimization 2021 conference
tags/v1.2.0-rc1
davidpankratz 4 years ago
parent
commit
5414baa006
8 changed files with 7211 additions and 0 deletions
  1. +5
    -0
      README.md
  2. +74
    -0
      build/scripts/build_vulkan_vision_linux.sh
  3. +71
    -0
      build/scripts/build_vulkan_vision_windows.bat
  4. +25
    -0
      ecosystem_tools/VulkanVision/README.md
  5. +3188
    -0
      ecosystem_tools/VulkanVision/st-patches/0001-spirv-opt-Add-auto-inst-passes.patch
  6. +1
    -0
      ecosystem_tools/VulkanVision/st-patches/vvision-st.diff
  7. +3846
    -0
      ecosystem_tools/VulkanVision/vv-patches/0001-layers-Added-auto-inst-layers.patch
  8. +1
    -0
      ecosystem_tools/VulkanVision/vv-patches/vvision-vv.diff

+ 5
- 0
README.md View File

@@ -16,6 +16,7 @@
- [Community](#community)
- [Governance](#governance)
- [Communication](#communication)
- [Vulkan Vision](#vulkan-vision)
- [Contributing](#contributing)
- [Release Notes](#release-notes)
- [License](#license)
@@ -156,6 +157,10 @@ Check out how MindSpore Open Governance [works](https://gitee.com/mindspore/comm
- Video Conferencing: TBD
- Mailing-list: <https://mailweb.mindspore.cn/postorius/lists>

## Vulkan Vision

Vulkan Vision(V-Vision) provides an unprecedented level of detail into the execution of Vulkan applications through dynamic instrumentation. V-Vision supports analyzing AI workloads implemented using the a compute pipeline as well as traditional raster and ray-tracing Vulkan applications. To use V-Vision please refer to the [build instructions](https://gitee.com/mindspore/mindspore/ecosystem_tools/VulkanVision/README.md).

## Contributing

Welcome contributions. See our [Contributor Wiki](https://gitee.com/mindspore/mindspore/blob/master/CONTRIBUTING.md) for more details.


+ 74
- 0
build/scripts/build_vulkan_vision_linux.sh View File

@@ -0,0 +1,74 @@
#!/bin/bash
# Copyright 2021 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

start_dir=$(pwd)
cd "$(dirname "$0")"/../../ecosystem_tools/VulkanVision

if [[ ! -d "SPIRV-Tools" ]]
then
echo "Cloning SPIRV-Tools"
git clone https://github.com/KhronosGroup/SPIRV-Tools
cp st-patches/*.patch SPIRV-Tools
cd SPIRV-Tools
git checkout 17ffa89097b26efeb323e6963220326b5ffb2baf
# These are the current stable changes and can be updated with new releases
git apply 0001-spirv-opt-Add-auto-inst-passes.patch
rm *.patch
cd ..
fi

if [[ ! -d "Vulkan-ValidationLayers" ]]
then
echo "Cloning Vulkan-ValidationLayers"
git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers
cp vv-patches/*.patch Vulkan-ValidationLayers
cd Vulkan-ValidationLayers
git checkout aa076dae88e282d7b6cada4f900b2fa7dac8ed08
# These are the current stable changes and can be updated with new releases
git apply 0001-layers-Added-auto-inst-layers.patch
rm *.patch
cd ..
fi


build_dir=$(pwd)

echo "Building SPIRV-Tools"
cd SPIRV-Tools
git clone https://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
cd external/spirv-headers
git checkout f027d53ded7e230e008d37c8b47ede7cd308e19d
cd ../..
git clone https://github.com/google/effcee.git external/effcee
git clone https://github.com/google/re2.git external/re2
mkdir build
cd build
mkdir install
cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=install ..
cmake --build . --target install --config Release -- -j 4
cd $build_dir

echo "Building Vulkan-ValidationLayers"
cd Vulkan-ValidationLayers
mkdir build
cd build
mkdir install
python ../scripts/update_deps.py --config release
cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=install -DSPIRV_TOOLS_INSTALL_DIR=$build_dir/SPIRV-Tools/build/install -C helper.cmake ..
cmake --build . --target install --config Release -- -j 4

echo "Build completed at $build_dir"!

cd $start_dir

+ 71
- 0
build/scripts/build_vulkan_vision_windows.bat View File

@@ -0,0 +1,71 @@
@echo off
REM Copyright 2021 Huawei Technologies Co., Ltd.
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.

set start_dir=%cd%
cd %~dp0..\..\ecosystem_tools\VulkanVision

IF NOT EXIST SPIRV-Tools (
echo Cloning SPIRV-Tools
git clone https://github.com/KhronosGroup/SPIRV-Tools
copy st-patches\*.patch SPIRV-Tools
cd SPIRV-Tools
git checkout 17ffa89097b26efeb323e6963220326b5ffb2baf
REM These are the current stable changes and can be updated with new releases
git apply 0001-spirv-opt-Add-auto-inst-passes.patch
del *.patch
cd ..
)

IF NOT EXIST Vulkan-ValidationLayers (
echo Cloning Vulkan-ValidationLayers
git clone https://github.com/KhronosGroup/Vulkan-ValidationLayers
copy vv-patches\*.patch Vulkan-ValidationLayers
cd Vulkan-ValidationLayers
git checkout aa076dae88e282d7b6cada4f900b2fa7dac8ed08
REM These are the current stable changes and can be updated with new releases
git apply 0001-layers-Added-auto-inst-layers.patch
del *.patch
cd ..
)

set build_dir=%cd%

echo Building SPIRV-Tools
cd SPIRV-Tools
git clone https://github.com/KhronosGroup/SPIRV-Headers.git external\spirv-headers
cd external\spirv-headers
git checkout f027d53ded7e230e008d37c8b47ede7cd308e19d
cd ..\..
git clone https://github.com/google/effcee.git external\effcee
git clone https://github.com/google/re2.git external\re2
mkdir build
cd build
mkdir install
cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=install ..
cmake --build . --target install --config Release
cd %build_dir%

echo Building Vulkan-ValidationLayers
cd Vulkan-ValidationLayers
mkdir build
cd build
mkdir install
python ../scripts/update_deps.py --config release
cmake -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=install -DSPIRV_TOOLS_INSTALL_DIR=%cd%/../../SPIRV-Tools/build/install -C helper.cmake ..
cmake --build . --target install --config Release

echo Build completed at %build_dir%!

cd %start_dir%

+ 25
- 0
ecosystem_tools/VulkanVision/README.md View File

@@ -0,0 +1,25 @@
# Vulkan Vision

If Vulkan Vision is useful to you, please cite "Vulkan Vision: Ray Tracing Workload Characterization using Automatic Graphics Instrumentation".

Vulkan Vision is released as patches on the Khronos Group [Vulkan-ValidationLayers](https://github.com/KhronosGroup/Vulkan-ValidationLayers) and [SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Tools) repositories.

To generate a vvision build:

## Windows

```bat
..\..\build\scripts\build_vulkan_vision_windows.bat
```

## Linux

```bash
../../build/scripts/build_vulkan_vision_linux.sh
```

The completed build will be at `mindinsight/ecosystem_tools/VulkanVision/Vulkan-ValidationLayers/build/install`

V-Vision Documentation will be at `mindinsight/ecosystem_tools/VulkanVision/Vulkan-ValidationLayers/docs/auto_instrument.md`

Documentation for enabling and using Vulkan Validation layers can be found [here](https://vulkan.lunarg.com/doc/sdk/1.2.162.0/windows/layer_configuration.html)

+ 3188
- 0
ecosystem_tools/VulkanVision/st-patches/0001-spirv-opt-Add-auto-inst-passes.patch
File diff suppressed because it is too large
View File


+ 1
- 0
ecosystem_tools/VulkanVision/st-patches/vvision-st.diff View File

@@ -0,0 +1 @@
0001-spirv-opt-Add-auto-inst-passes.patch

+ 3846
- 0
ecosystem_tools/VulkanVision/vv-patches/0001-layers-Added-auto-inst-layers.patch
File diff suppressed because it is too large
View File


+ 1
- 0
ecosystem_tools/VulkanVision/vv-patches/vvision-vv.diff View File

@@ -0,0 +1 @@
0001-layers-Added-auto-inst-layers.patch

Loading…
Cancel
Save