Skip to content

Commit b35dd8c

Browse files
committed
Update readme and build files. Also add a readme to Common dir that describes what to do if the Common dir is missing dependencies
Change-Id: Ie523179c14cdd6ce345d9666fa2e37602a9d9bc3
1 parent f338456 commit b35dd8c

File tree

3 files changed

+67
-42
lines changed

3 files changed

+67
-42
lines changed

BUILD.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,24 @@
11
# GPUPerfAPI Build Instructions
22
---
33
## Table of Contents
4+
* [Cloning/Updating Dependent Repositories](#DependentRepos)
45
* [Windows Build Information](#Windows)
56
* [Linux Build Information](#Linux)
67
* [PublicCounterCompiler Tool](#PublicCounterCompiler)
78

9+
<A Name="DependentRepos">
10+
## Cloning/Updating Dependent Repositories
11+
GPUPerfAPI no longer uses git submodules to reference dependent repositories. Instead, you need to follow these instructions in
12+
order to clone/update any dependent repositories.
13+
#### Prerequisites
14+
* This step requires that python be installed on the system. Python can be installed from https://www.python.org/
15+
#### Instructions
16+
* Simply execute the [UpdateCommon.py](Utils/UpdateCommon.py) python script located in the [Utils](Utils) directory:
17+
* __python Utils/UpdateCommon.py__
18+
This script will clone any dependent repositories that are not present on the system. If any of the dependent repositories are already
19+
present on the system, this script will instead do a "git pull" on those repositories to ensure that they are up to date. Please re-run
20+
this script everytime you pull new changes from GPA repository.
21+
822
<A Name="Windows">
923
## Windows Build Information
1024

@@ -16,19 +30,18 @@
1630
##### Build Instructions
1731
* Load Build\VS2015\GPUPerfAPI.sln into Visual Studio
1832
* Build the 64-bit and/or 32-bit configuration
19-
* After a successful build, the GPUPerfAPI binaries can be found in __Build\VS2015\\$(Configuration)-$(Platform)__ (for example Build\VS2015\Release-x64)
33+
* After a successful build, the GPUPerfAPI binaries can be found in __GPA\Output\\$(Configuration)\bin__ (for example GPA\Output\Release\bin)
2034

2135
#### Additional Information
2236
* The Visual Studio solution includes a Documentation project that allows you to generate the HTML-based source code documentation using Doxygen. In order
23-
to build that project, you'll need to modify [Documentation.vcxproj](GPUPerfAPI/Build/VS2015/Documentation.vcxproj) and modify the paths to the doxygen executable.
37+
to build that project, you'll need to modify [Documentation.vcxproj](Build/VS2015/Documentation.vcxproj) and modify the paths to the doxygen executable.
2438
* The Windows projects each include a .rc file that embeds the VERSIONINFO resource into the final binary. Internally within AMD, a Jenkins build system will dynamically update
25-
the build number. The version and build numbers can be manually updated by modifying the [GPAVersion.h](GPUPerfAPI/GPUPerfAPI-Common/GPAVersion.h) file.
39+
the build number. The version and build numbers can be manually updated by modifying the [GPAVersion.h](Src/GPUPerfAPI-Common/GPAVersion.h) file.
2640
* Information on building the Internal version:
2741
* To generate the internal version, two environment variables are required to be set prior to building in Visual Studio:
28-
* GDT_BUILD=GDT_INTERNAL
29-
* GDT_BUILD_SUFFIX=-Internal
30-
* The output location of the binaries will be __Build\VS2015\\$(Configuration)-$(Platform)-Internal__ (for example Build\VS2015\Release-x64-Internal)
31-
* Each binary filename will also have a "-Internal" suffix (for example GPUPerfAPIDX11-x64-Internal.dll)
42+
* AMDT_BUILD=AMDT_INTERNAL
43+
* AMDT_BUILD_SUFFIX=-Internal
44+
* Each binary filename will have a "-Internal" suffix (for example GPUPerfAPIDX11-x64-Internal.dll)
3245

3346
<A Name="Linux">
3447
## Linux Build Information
@@ -47,7 +60,7 @@
4760
* __quick__ or __incremental__: performs an incremental build (as opposed to a from-scratch build)
4861
* __buildinternal__: builds the internal versions of GPUPerfAPI
4962
* __hsadir__: overrides the location of the ROCm/HSA header files (by default they are expected to be in /opt/rocm/hsa)
50-
* After a successful build, the GPUPerfAPI binaries can be found in their respective source file directories. For instance, the binaries for the OpenGL version of GPUPerfAPI (libGPUPerfAPIGL.so) can be found in the GPUPerfAPIGL subdirectory.
63+
* After a successful build, the GPUPerfAPI binaries can be found in their respective source file directories. For instance, the binaries for the OpenGL version of GPUPerfAPI (libGPUPerfAPIGL.so) can be found in the Src/GPUPerfAPIGL subdirectory.
5164
* Example build command line (builds the debug versions of the binaries, skipping the HSA library):
5265
* ./build.sh debug skiphsa
5366
* In addition to using the build.sh build script to build all of GPUPerfAPI, you can also build a single API library by executing __make__ in that library's directory. This is useful when making localized changes in a single version of GPUPerfAPI. When using __make__, the following default targets are supported:
@@ -76,8 +89,8 @@
7689
## PublicCounterCompiler Tool
7790

7891
The PublicCounterCompiler Tool is a utility, written in C#, that will generate C++ code to define the public (or derived) counters.
79-
It takes as input text files contained in the [PublicCounterCompilerInputFiles](GPUPerfAPI/PublicCounterCompilerInputFiles) directory and
80-
outputs files in the [GPUPerfAPICounterGenerator](GPUPerfAPI/GPUPerfAPICounterGenerator) and [GPUPerfAPIUnitTests](GPUPerfAPI/GPUPerfAPIUnitTests) directories.
92+
It takes as input text files contained in the [PublicCounterCompilerInputFiles](Src/PublicCounterCompilerInputFiles) directory and
93+
outputs files in the [GPUPerfAPICounterGenerator](Src/GPUPerfAPICounterGenerator) and [GPUPerfAPIUnitTests](Src/GPUPerfAPIUnitTests) directories.
8194

8295
There are three ways to execute the tool:
8396
* With no parameters - it opens the user interface with no fields prepopulated
@@ -91,7 +104,7 @@ There are three ways to execute the tool:
91104
* Param 4: Test output Dir - the directory to generate the test output in (Ex: the path to the GPUPerfAPIUnitTests/counters directory)
92105
* Param 5: Active section label - the label to take the counter names from (ex: dx11gfx6)
93106

94-
See the various PublicCounterDefinitions\*.txt files in the [PublicCounterCompilerInputFiles](GPUPerfAPI/PublicCounterCompilerInputFiles) directory. These contain all the counter definitions.
107+
See the various PublicCounterDefinitions\*.txt files in the [PublicCounterCompilerInputFiles](Src/PublicCounterCompilerInputFiles) directory. These contain all the counter definitions.
95108
Each counter is given a name, a description, a type, an optional usage type, a list of hardware counters required and a formula applied to the values of the hardware counters to calculate the value of the counter.
96109

97110
Counter formulas are expressed in a Reverse Polish Notation and are made up the following elements:
@@ -101,5 +114,5 @@ Counter formulas are expressed in a Reverse Polish Notation and are made up the
101114
* functions: The supported functions are: min, max, sum, and ifnotzero. "max and "sum" have variants that work on multiple items at once (i.e. sum16, sum63, etc.)
102115
* hardware params: The supported hardware params are "num_shader_engines". "num_simds", "su_clock_prim", "num_prim_pipes", and "TS_FREQ"
103116

104-
For more details, see the "EvaluateExpression" function in the [GPAPublicCounters.cpp](GPUPerfAPI/GPUPerfAPICounterGenerator/GPAPublicCounters.cpp) file.
117+
For more details, see the "EvaluateExpression" function in the [GPAPublicCounters.cpp](Src/GPUPerfAPICounterGenerator/GPAPublicCounters.cpp) file.
105118

Common/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
If the only subdirectory in this Common directory is Common/Lib/AMD/GPUPerfAPI, then you have probably forgotten to execute the
2+
[UpdateCommon.py](../Utils/UpdateCommon.py) script in the [Utils](../Utils) directory.
3+
Please see the instructions in [BUILD.md](../BUILD.md#DependentRepos)

README.md

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ is used by both CodeXL and GPU PerfStudio.
1414
* [Source Code Directory Layout](#Source)
1515
* ["Public" vs "Internal" Versions](#PublicInternal)
1616
* [Building the Source Code](BUILD.md)
17-
* [GPUPerfAPI User Guide](GPUPerfAPI/doc/GPUPerfAPI-UserGuide.pdf)
17+
* [GPUPerfAPI User Guide](Doc/GPUPerfAPI-UserGuide.pdf)
1818
* [License](LICENSE)
1919
* [Historical Release Notes](#HistoricalNotes)
2020

@@ -30,50 +30,47 @@ is used by both CodeXL and GPU PerfStudio.
3030

3131
<A NAME="WhatsNew">
3232
## What's New
33-
* Version 2.20 (5/12/16)
33+
* Version 2.21 (12/21/16)
3434
* Add support for additional GPUs and APUs.
35-
* Initial Public release of ROCm/HSA support
36-
* Alpha/Prototype for DirectX12 (no hardware-based performance counter support)
37-
* Removed support for pre-GCN-based devices
38-
* Improve accuracy of the various *VALUBusy and *SALUBusy counters (all APIs)
39-
* OpenGL: Fixed possibly wrong GPUTime values for some applications
40-
* OpenGL: Add support for open source OpenGL driver
41-
* OpenGL: Fix value of TexUnitBusy counter for 3rd generation GCN hardware
42-
* DirectX 11: Fix incorrect type returned for D3DGPUTime counter
43-
* DirectX 11: Fix PSVALUBusy counter on 2nd and 3rd generation GCN hardware
44-
* DirectX 11: A separate DLL (GPUPerfAPIDXGetAMDDeviceInfo\*.dll) is required in order to support certain multi-GPU configurations. This DLL will need to be deployed alongside GPUPerfAPIDX11\*.dll on multi-GPU systems. See the [User Guide](GPUPerfAPI/doc/GPUPerfAPI-UserGuide.pdf) for more information.
35+
* ROCm/HSA: Support for ROCm 1.3 and ROCm 1.4
36+
* OpenGL: Fixed an issue with GPU/APU detection with newer Radeon Crimson drivers
4537

4638
<A NAME="System">
4739
## System Requirements
4840
* An AMD Radeon GCN-based GPU or APU
49-
* Radeon Software Crimson Edition 16.2.1 or later (Driver Packaging Version 16.15 or later).
41+
* Radeon Software Crimson Edition 16.2.1 or later (Driver Packaging Version 16.40 or later).
5042
* Pre-GCN-based GPUs or APUs are no longer supported by GPUPerfAPI. Please use an older version ([2.17](http://developer.amd.com/tools-and-sdks/graphics-development/gpuperfapi/)) with older hardware.
5143
* Windows 7, 8.1, and 10
5244
* Ubuntu (14.04 and later) and RHEL (7 and later) distributions
5345

5446
<A NAME="Cloning">
5547
## Cloning the Repository
5648
To clone the GPA repository, execute the following git commands
57-
* git clone --recursive https://github.com/GPUOpen-Tools/GPA.git
49+
* git clone https://github.com/GPUOpen-Tools/GPA.git
50+
After cloning the repository, please run the following python script to retrieve the required dependencies (see [BUILD.md](BUILD.md) for more information):
51+
* python Utils/UpdateCommon.py
52+
UpdateCommon has replaced the use of git submodules in the GPA repository
5853

5954
<A NAME="Source">
6055
## Source Code Directory Layout
61-
* [Build](GPUPerfAPI/Build) -- contains both Linux and Windows build-related files
62-
* [DeviceInfo](GPUPerfAPI/DeviceInfo) -- builds a lib containing the Common/Src/DeviceInfo code (Linux only)
63-
* [doc](GPUPerfAPI/doc) -- contains User Guide and Doxygen configuration files
64-
* [GPUPerfAPICL](GPUPerfAPI/GPUPerfAPICL) - contains the source for the OpenCL™ version of GPUPerfAPI
65-
* [GPUPerfAPI-Common](GPUPerfAPI/GPUPerfAPI-Common) -- contains source code for a Common library shared by all versions of GPUPerfAPI
66-
* [GPUPerfAPICounterGenerator](GPUPerfAPI/GPUPerfAPICounterGenerator) - contains the source code for a Common library providing all counter data
67-
* [GPUPerfAPICounters](GPUPerfAPI/GPUPerfAPICounters) - contains the source code for a library that can be used to query counters without an active GPUPerfAPI context
68-
* [GPUPerfAPIDX](GPUPerfAPI/GPUPerfAPIDX) - contains source code shared by the DirectX versions of GPUPerfAPI
69-
* [GPUPerfAPIDX11](GPUPerfAPI/GPUPerfAPIDX11) - contains the source for the DirectX11 version of GPUPerfAPI
70-
* [GPUPerfAPIDX12](GPUPerfAPI/GPUPerfAPIDX12) - contains the source for the DirectX12 version of GPUPerfAPI (prototype/alpha)
71-
* [GPUPerfAPIGL](GPUPerfAPI/GPUPerfAPIGL) - contains the source for the OpenGL version of GPUPerfAPI
72-
* [GPUPerfAPIGLES](GPUPerfAPI/GPUPerfAPIGLES) - contains the source for the OpenGLES version of GPUPerfAPI
73-
* [GPUPerfAPIHSA](GPUPerfAPI/GPUPerfAPIHSA) - contains the source for the ROCm/HSA version of GPUPerfAPI
74-
* [GPUPerfAPIUnitTests](GPUPerfAPI/GPUPerfAPIUnitTests) - contains a small set of unit tests for GPUPerfAPI
75-
* [PublicCounterCompiler](GPUPerfAPI/PublicCounterCompiler) - source code for a tool to generate C++ code for public counters from text files defining the counters.
76-
* [PublicCounterCompilerInputFiles](GPUPerfAPI/PublicCounterCompilerInputFiles) - input files that can be fed as input to the PublicCounterCompiler tool
56+
* [Build]Build) -- contains both Linux and Windows build-related files
57+
* [Common](Common) -- Common libs, header and source code not found in other repositories
58+
* [Doc](Doc) -- contains User Guide and Doxygen configuration files
59+
* [DeviceInfo](Src/DeviceInfo) -- builds a lib containing the Common/Src/DeviceInfo code (Linux only)
60+
* [GPUPerfAPI-Common](Src/GPUPerfAPI-Common) -- contains source code for a Common library shared by all versions of GPUPerfAPI
61+
* [GPUPerfAPICL](Src/GPUPerfAPICL) - contains the source for the OpenCL™ version of GPUPerfAPI
62+
* [GPUPerfAPICounterGenerator](Src/GPUPerfAPICounterGenerator) - contains the source code for a Common library providing all counter data
63+
* [GPUPerfAPICounters](Src/GPUPerfAPICounters) - contains the source code for a library that can be used to query counters without an active GPUPerfAPI context
64+
* [GPUPerfAPIDX](Src/GPUPerfAPIDX) - contains source code shared by the DirectX versions of GPUPerfAPI
65+
* [GPUPerfAPIDX11](Src/GPUPerfAPIDX11) - contains the source for the DirectX11 version of GPUPerfAPI
66+
* [GPUPerfAPIDX12](Src/GPUPerfAPIDX12) - contains the source for the DirectX12 version of GPUPerfAPI (prototype/alpha)
67+
* [GPUPerfAPIGL](Src/GPUPerfAPIGL) - contains the source for the OpenGL version of GPUPerfAPI
68+
* [GPUPerfAPIGLES](Src/GPUPerfAPIGLES) - contains the source for the OpenGLES version of GPUPerfAPI
69+
* [GPUPerfAPIHSA](Src/GPUPerfAPIHSA) - contains the source for the ROCm/HSA version of GPUPerfAPI
70+
* [GPUPerfAPIUnitTests](Src/GPUPerfAPIUnitTests) - contains a small set of unit tests for GPUPerfAPI
71+
* [PublicCounterCompiler](Src/PublicCounterCompiler) - source code for a tool to generate C++ code for public counters from text files defining the counters.
72+
* [PublicCounterCompilerInputFiles](Src/PublicCounterCompilerInputFiles) - input files that can be fed as input to the PublicCounterCompiler tool
73+
* [Utils](Utils) -- scripts to use to clone/update dependent repositories
7774

7875
<A NAME="PublicInternal">
7976
## "Public" vs "Internal" Versions
@@ -90,5 +87,17 @@ no longer actually Internal-to-AMD can be a bit confusing, and we will aim to ch
9087

9188
<A NAME="HistoricalNotes">
9289
## Historical Release Notes
90+
* Version 2.20 (5/12/16)
91+
* Add support for additional GPUs and APUs.
92+
* Initial Public release of ROCm/HSA support
93+
* Alpha/Prototype for DirectX12 (no hardware-based performance counter support)
94+
* Removed support for pre-GCN-based devices
95+
* Improve accuracy of the various *VALUBusy and *SALUBusy counters (all APIs)
96+
* OpenGL: Fixed possibly wrong GPUTime values for some applications
97+
* OpenGL: Add support for open source OpenGL driver
98+
* OpenGL: Fix value of TexUnitBusy counter for 3rd generation GCN hardware
99+
* DirectX 11: Fix incorrect type returned for D3DGPUTime counter
100+
* DirectX 11: Fix PSVALUBusy counter on 2nd and 3rd generation GCN hardware
101+
* DirectX 11: A separate DLL (GPUPerfAPIDXGetAMDDeviceInfo\*.dll) is required in order to support certain multi-GPU configurations. This DLL will need to be deployed alongside GPUPerfAPIDX11\*.dll on multi-GPU systems. See the [User Guide](Doc/GPUPerfAPI-UserGuide.pdf) for more information.
93102
* [Version 2.17](http://developer.amd.com/tools-and-sdks/graphics-development/gpuperfapi/)
94103
* [Earlier Releases](http://developer.amd.com/tools-and-sdks/graphics-development/gpuperfapi/gpuperfapi-historical-release-notes/)

0 commit comments

Comments
 (0)