RGA CLI is an offline compiler and a performance analysis tool for DirectX shaders, OpenGL shaders, Vulkan shaders and OpenCL kernels. Using this product, you can compile source code for a variety of AMD GPUs and APUs, independent from the GPU/APU that is physically installed on your system, and generate AMD ISA disassembly, intermediate language disassembly, performance statistics and static analysis reports for each target platform.
RGA CLI replaces CodeXL Analyzer CLI, and maintains backward compatibility. All of the commands and functionality that used to be supported by CodeXL Analyzer CLI are still being supported by RGA. For a quick overview of those features, see http://gpuopen.com/up-and-running-with-codexl-analyzer-cli/
This product can be used to produce the following output:
- Build errors and warnings
- AMD ISA, AMDIL and HSAIL disassembly
- DX ASM for D3D shaders
- Compiled binaries
- Performance statistics
- Live register analysis (for more info about this feature, please see http://gpuopen.com/live-vgpr-analysis-radeon-gpu-analyzer/)
The supported platforms are:
- D3D11
- OpenGL
- OpenCL
- Vulkan - GLSL input
- Vulkan - SPIR-V binary input
- Vulkan - SPIR-V textual input
- Windows: 7, 8.1 or 10, 64-bit. Visual Studio 2015.
- Linux: Ubuntu 14.04, Red Hat 6.4 or later. Build with gcc 4.7.2 or later.
The Radeon Software Crimson Edition or AMD Catalyst release must be installed to run this tool.
There are two ways to build RGA on Windows:
-
Using the RadeonGPUAnalyzer.sln file that can be found under Build\VS2015. Before using the solution file, run the UpdateCommon.py script, which fetches the solution's dependencies.
-
Using CMake. To generate the solution and project files for an x86 build, use:
cmake.exe –DCMAKE_BUILD_TYPE=Release (or: Debug)
To generate the files for an x64 build, use:
cmake.exe -G "Visual Studio 14 2015 Win64" –DCMAKE_BUILD_TYPE=Release (or: Debug)
Before starting, run the UpdateCommon.py script, which fetches the solution's dependencies.
Note that after switching CMake build configurations, you might need to delete the old files that were previously generated by CMake. Therefore, it is recommended to work with separate output directories, one for each build configuration.
- One time setup:
- sudo apt-get install libboost-all-dev
- sudo apt-get install gcc-multilib g++-multilib
- sudo apt-get install libglu1-mesa-dev mesa-common-dev libgtk2.0-dev
- sudo apt-get install zlib1g-dev libx11-dev:i386
- Build:
-
run: UpdateCommon.py
-
run: cmake –DCMAKE_BUILD_TYPE=Release (or: Debug)
It is recommended to create a directory to hold all build files, and launch cmake from that directory.
For example:
- cd to the RGA repo directory
- mkdir _build
- cd _build
- cmake –DCMAKE_BUILD_TYPE=Release ../
-
run: make
-
Install compiler 4.7.2
- sudo wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -P /etc/yum.repos.d
- sudo sh -c 'echo "enabled=1" >> /etc/yum.repos.d/devtools-1.1.repo'
- sudo yum install devtoolset-1.1
- wget http://people.centos.org/tru/devtools-1.1/6/i386/RPMS/devtoolset-1.1-libstdc++-devel-4.7.2-5.el6.i686.rpm
- sudo yum install devtoolset-1.1-libstdc++-devel-4.7.2-5.el6.i686.rpm
- sudo ln -s /opt/centos/devtoolset-1.1/root/usr/bin/* /usr/local/bin/
- hash -r
- gcc --version (verify that version 4.7.2 is displayed) Install zlib
- yum install zlib-devel
Install glibc
- yum -y install glibc-devel.i686 glibc-devel
Building RGA
- run: UpdateCommon.py
- run: cmake –DCMAKE_BUILD_TYPE=Release (or: Debug)
- run: make
Run the rga executable.
- Usage:
-
General: rga -h
-
DirectX: rga -s hlsl -h
Note: RGA's HLSL mode requires Microsoft's D3D Compiler DLL in runtime. If you copy the relevant D3D Compiler DLL to the relevant (x64 or x86) subdirectory under the executable's directory, RGA will use that DLL in runtime. The default D3D compiler that RGA public releases ship with is d3dcompiler_47.dll.
-
OpenGL: rga -s opengl -h
-
OpenCL: rga -s cl -h
-
Vulkan - glsl: rga -s vulkan -h
-
Vulkan - SPIR-V binary input: rga -s vulkan-spv -h
-
Vulkan - SPIRV-V textual input: rga -s vulkan-spv-txt -h
-
For support, please visit the RGA repository github page: https://github.com/GPUOpen-Tools/RGA
Radeon GPU Analyzer is licensed under the MIT license. See LICENSE file for full license information.
Boost
Copyright Beman Dawes, 2003.
TinyXML
TinyXML is released under the zlib license Files: * Copyright: 2000-2007, Lee Thomason, 2002-2004, Yves Berquin Files: tinystr.* Copyright: 2000-2007, Lee Thomason, 2002-2004, Yves Berquin, 2005, Tyge Lovset
glew
The OpenGL Extension Wrangler Library Copyright (C) 2002-2007, Milan Ikits <milan ikits@ieee org> Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo@debian org> Copyright (C) 2002, Lev Povalahev All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OpenCL
Copyright (c) 2008-2015 The Khronos Group Inc.
RSA Data Security, Inc.
Copyright (C) 1990, RSA Data Security, Inc. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message Digest Algorithm" in all material mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this documentation and/or software.
Glslang Copyright (C) 2002-2005 3Dlabs Inc. Ltd. Copyright (C) 2012-2013 LunarG, Inc.