Skip to content

Commit dc1e559

Browse files
committed
GPA 3.3 release
1 parent 49d4232 commit dc1e559

File tree

581 files changed

+189494
-131811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

581 files changed

+189494
-131811
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Doc/public
2929
*.so
3030
*.a
3131
*.pyc
32+
CMakeBuild*/
3233

3334
# Visual Studo 2015 cache/options directory
3435
.vs/

BUILD.md

Lines changed: 46 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -5,102 +5,91 @@
55
* [Windows Build Information](#windows-build-information)
66
* [Linux Build Information](#linux-build-information)
77
* [PublicCounterCompiler Tool](#publiccountercompiler-tool)
8-
* [Building the Documentation](#building-the-documentation)
98

109
## Cloning/Updating Dependent Repositories
1110
GPUPerfAPI no longer uses git submodules to reference dependent repositories. Instead, you need to follow these instructions in
1211
order to clone/update any dependent repositories.
1312

1413
#### Prerequisites
1514
* Python, which can be installed from https://www.python.org/
15+
* CMake 3.5.1 or newer
16+
* For Windows, this can be downloaded from https://cmake.org/download/
17+
* For Linux, this can be installed using: sudo apt-get install cmake
18+
* To build the documentation:
19+
* Install Sphinx:
20+
* `pip install Sphinx`
21+
* Install Sphinx Read The Docs theme:
22+
* `pip install sphinx-rtd-theme` (read the docs theme is not installed by default)
23+
* Install spelling checker (optional)
24+
* `pip install pyenchant`
25+
* `pip install sphinxcontrib-spelling`
1626

1727
#### Instructions
18-
* Simply execute the [UpdateCommon.py](Scripts/UpdateCommon.py) python script located in the [Scripts](Scripts) directory:
19-
* `python Scripts/UpdateCommon.py`
28+
* Simply execute the [PreBuild.py](PreBuild.py) python script located in the GPA directory:
29+
* `python PreBuild.py`
2030
* This script will clone any dependent repositories that are not present on the system. If any of the dependent repositories are already
2131
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
2232
this script everytime you pull new changes from GPA repository.
33+
* NOTE: For GPA 3.3 or newer, if you are updating an existing clone of the GPA repo from an earlier GPA release, you will first need to delete the Common/Lib/Ext/GoogleTest directory. Starting with GPA 3.3, GPA is now using a fork of the official GoogleTest repo. Failure to remove this directory will lead to git errors when running PreBuild.py or UpdateCommon.py.
2334
* This script will also download and execute the Vulkan™ SDK installer.
2435
* On Windows, running the installer may require elevation. If you've previously installed the required Vulkan version, UpdateCommon will simply copy the files form the default installation location into the correct place into the GPUPerfAPI directory tree.
2536
* UpdateCommon is set up to install the version of the Vulkan SDK which was used during development. If you want to use a newer version of the SDK, the following file will need to be updated:
2637
* [UpdateCommonMap.py](Scripts/UpdateCommonMap.py)
2738
* By default the build will expect the Vulkan SDK to be found in a directory pointed to by the `VULKAN_SDK` environment variable. This environment variable is automatically set by the Windows SDK installer, but you may need to set it manually after running the Linux SDK installer. The Linux SDK includes a script called `setup-env.sh` to aid in setting this environment variable:
2839
* `source ~/VulkanSDK/1.0.68.0/setup-env.sh` (adjust path as necessary)
40+
* This script also executes cmake to generate all required files to build GPA.
41+
* If you want to generate all cmake build files without trying to clone/pull dependent repos, you can add "--nofetch" to the PreBuild.py command line.
42+
* Additional switches that can be used with the PreBuild.py script:
43+
* `--vs=[2015,2017]`: Specify the Visual Studio version for which to generate projects. Default is 2017.
44+
* `--config=[debug,release]`: Specify the config for which to generate makefiles. Default is both. A specific config can only be specified on Linux. On Windows, both configs are always supported by the generated VS solution and project files.
45+
* `--platform=[x86,x64]`: Specify the platform for which to generate build files. Default is both.
46+
* `--clean`: Deletes CMakeBuild directory and regenerates all build files from scratch
47+
* `--internal`: Generates build files to build the internal version of GPA
48+
* `--skipdx11`: Does not generate build files for DX11 version of GPA (Windows only)
49+
* `--skipdx12`: Does not generate build files for DX12 version of GPA (Windows only)
50+
* `--skipvulkan`: Does not generate build files for Vulkan version of GPA
51+
* `--skipopengl`: Does not generate build files for OpenGL version of GPA
52+
* `--skipopencl`: Does not generate build files for OpenCL version of GPA
53+
* `--skiprocm`: Does not generate build files for ROCm version of GPA (Linux only)
54+
* `--skiptests`: Does not generate build files for unit tests
55+
* `--skipdocs`: Does not generate build files for documentation
56+
* `--cmakecmd="CMD"`: Override the "cmake" command with "CMD"
2957

3058
## Windows Build Information
3159

3260
##### Prerequisites
33-
* Microsoft Visual Studio 2015 Community Edition or higher + Update 3 or Microsoft Visual Studio 2017
61+
* Microsoft Visual Studio 2017
3462
* Windows 10 SDK Version 10.0.10586.0 from https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk
3563
* You can override the version of the Windows 10 SDK used by modifying Common/Lib/Ext/Windows-Kits/Global-WindowsSDK.props
3664
* Microsoft .NET 4.6.2 SDK from https://www.microsoft.com/en-us/download/details.aspx?id=53321
3765

3866
##### Build Instructions
39-
* Load Build\VS2015\GPUPerfAPI.sln into Visual Studio 2015
40-
* If you are using VS2017, you should load Build\VS2017\GPUPerfAPI.sln instead
41-
* Build the 64-bit and/or 32-bit configuration
42-
* After a successful build, the GPUPerfAPI binaries can be found in `GPA\Output\$(Configuration)\bin` (for example GPA\Output\Release\bin)
67+
* Load CMakeBuild\x64\GPUPerfAPI.sln into Visual Studio to build the 64-bit version of GPA
68+
* Load CMakeBuild\x86\GPUPerfAPI.sln into Visual Studio to build the 32-bit version of GPA
69+
* After a successful build, the GPUPerfAPI binaries can be found in `GPA\Output\$(Configuration)` (for example GPA\Output\Release)
4370

4471
#### Additional Information
45-
* The Visual Studio solution includes a Documentation project that allows you to generate the HTML-based source code documentation using Doxygen. In order
46-
to build that project, you'll need to modify [Build/VS2015/Documentation.vcxproj](Build/VS2015/Documentation.vcxproj) or [Build/VS2017/Documentation.vcxproj](Build/VS2017/Documentation.vcxproj)
47-
to update the paths to the doxygen executable.
4872
* 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
4973
the build number. The version and build numbers can be manually updated by modifying the [GPAVersion.h](Src/GPUPerfAPI-Common/GPAVersion.h) file.
50-
* Information on building the Internal version:
51-
* To generate the internal version, two environment variables are required to be set prior to building in Visual Studio:
52-
* AMDT_BUILD=AMDT_INTERNAL
53-
* AMDT_BUILD_SUFFIX=-Internal
54-
* Each binary filename will have a "-Internal" suffix (for example GPUPerfAPIDX11-x64-Internal.dll)
74+
* When building the internal version (using the --internal switch when calling PreBuild.py), each binary filename will have a "-Internal" suffix (for example GPUPerfAPIDX11-x64-Internal.dll)
5575

5676
## Linux Build Information
5777

5878
##### Prerequisites
5979
* Install the Mesa common development package: sudo apt-get install mesa-common-dev
6080
* For 32-bit builds, install the multilib packages: sudo apt-get install gcc-multilib g++-multilib
81+
* In order to build the ROCm/HSA version of GPA, you will need all or part of the ROCm stack installed
82+
* Follow the ROCm installation instructions to install either rocm-dkms or rocm-dev: https://rocm.github.io/ROCmInstall.html
83+
* In addition, please make sure that the optional ROCm package "rocprofiler-dev" is installed:
84+
* Ubuntu: sudo apt install rocprofiler-dev
85+
* CentOS: sudo yum install rocprofiler-dev
6186

6287
##### Build Instructions
63-
* cd into the Build/Linux directory
64-
* Execute `./build.sh`
65-
* By default this performs a from-scratch build of the release versions of GPUPerfAPI, both 32-bit and 64-bit binaries.
66-
* The following arguments can be passed to build.sh to alter the build:
67-
* `debug`: performs a debug build
68-
* `skip32bitbuild`: skips building the 32-bit binaries
69-
* `skipopengl`: skips building the OpenGL version of GPUPerfAPI
70-
* `skipopencl`: skips building the OpenCL version of GPUPerfAPI
71-
* `skiphsa`: skips building the ROCm/HSA version of GPUPerfAPI
72-
* `skipvulkan`: skips building the Vulkan version of GPUPerfAPI
73-
* `doc`: builds the documentation
74-
* `quick` or `incremental`: performs an incremental build (as opposed to a from-scratch build)
75-
* `buildinternal`: builds the internal versions of GPUPerfAPI
76-
* `hsadir`: overrides the location of the ROCm/HSA header files (by default they are expected to be in /opt/rocm/hsa)
77-
* `gtestlibdir`: overrides the location of the GoogleTest libraries (by default they are expected to be in Common/Lib/Ext/GoogleTest/1-7/lib/gcc5/x64. There is also a gcc4.x-compatible version in Common/Lib/Ext/GoogleTest/1-7/lib/x64 for use when building on a system with gcc 4.x)
78-
* `gtestlibdir32`: overrides the location of the 32-bit GoogleTest libraries (by default they are expected to be in Common/Lib/Ext/GoogleTest/1-7/lib/gcc5/x86. There is also a gcc4.x-compatible version in Common/Lib/Ext/GoogleTest/1-7/lib/x86 for use when building on a system with gcc 4.x)
79-
* `vksdkdir`: overrides the location of the Vulkan SDK. If not specified, the build will use a `VULKAN_SDK` environment variable to determine where to look for the Vulkan SDK.
80-
* After a successful build, the GPUPerfAPI binaries can be found in Output/bin.
81-
* Example build command line (builds the debug versions of the binaries, skipping the HSA library):
82-
* ./build.sh debug skiphsa
83-
* 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:
84-
* `\<default\>`: makes the 64-bit release version
85-
* `x86`: makes the 32-bit release version
86-
* `Dbg`: makes the 64-bit debug version
87-
* `Dbgx86`: makes the 32-bit debug version
88-
* `Internal`: makes the 64-bit release Internal version
89-
* `Internalx86`: makes the 32-bit release Internal version
90-
* `DbgInternal`: makes the 64-bit debug Internal version
91-
* `DbgInternalx86`: makes the 32-bit debug Internal version
92-
* `Make` is supported in the following directories (those marked with (*) are required to be built before the others, as they produce static libraries used by the others):
93-
* DeviceInfo (*)
94-
* GPUPerfAPI (*)
95-
* GPUPerfAPI-Common (*)
96-
* GPUPerfAPICounterGenerator (*)
97-
* GPUPerfAPICounters
98-
* GPUPerfAPICL
99-
* GPUPerfAPIGL
100-
* GPUPerfAPIHSA
101-
* GPUPerfAPIVk
102-
* When using `make` to build the ROCM/HSA version of GPUPerfAPI, by default the HSA headers are expected to be in /opt/rocm/hsa. You can override this by specifying "HSA_DIR=<dir>" on the make command line:
103-
* Example: make Dbg HSA_DIR=/home/user/hsa_dir
88+
* Execute "make" in the CMakeBuild/x64/debug to build the 64-bit debug version of GPA
89+
* Execute "make" in the CMakeBuild/x64/release to build the 64-bit release version of GPA
90+
* Execute "make" in the CMakeBuild/x86/debug to build the 32-bit debug version of GPA
91+
* Execute "make" in the CMakeBuild/x86/release to build the 32-bit release version of GPA
92+
* After a successful build, the GPUPerfAPI binaries can be found in `GPA/Output/$(Configuration)` (for example GPA/Output/release)
10493
* When building the internal version, each binary filename will also have a "-Internal" suffix (for example libGPUPerfAPIGL-Internal.so)
10594

10695
## PublicCounterCompiler Tool
@@ -136,22 +125,3 @@ Counter formulas are expressed in a Reverse Polish Notation and are made up the
136125
* hardware params: The supported hardware params are "num_shader_engines". "num_simds", "su_clock_prim", "num_prim_pipes", and "TS_FREQ"
137126

138127
For more details, see the "EvaluateExpression" function in the [GPAPublicCounters.cpp](Src/GPUPerfAPICounterGenerator/GPAPublicCounters.cpp) file.
139-
140-
## Building the Documentation
141-
142-
##### Prerequisites
143-
* A working python installation is required
144-
* Install Sphinx:
145-
* `pip install Sphinx`
146-
* Install Sphinx Read The Docs theme:
147-
* `pip install sphinx-rtd-theme` (read the docs theme is not installed by default)
148-
* Install spelling checker (optional)
149-
* `pip install pyenchant`
150-
* `pip install sphinxcontrib-spelling`
151-
152-
##### Building
153-
* Once you have Sphinx installed, simply run the following command from the "docs" subdirectory:
154-
* `make html`
155-
* To run the spelling checker:
156-
* edit conf.py and uncomment the line adding in the `sphinxcontrib.spelling` extension
157-
* `make spelling`

Build/Linux/Common.mk

Lines changed: 0 additions & 83 deletions
This file was deleted.

Build/Linux/CommonTargets.mk

Lines changed: 0 additions & 108 deletions
This file was deleted.

0 commit comments

Comments
 (0)