You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: BUILD.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,22 +25,22 @@ order to clone/update any dependent repositories.
25
25
*`pip install sphinxcontrib-spelling`
26
26
27
27
#### Instructions
28
-
* Simply execute the [PreBuild.py](PreBuild.py) python script located in the GPA directory:
29
-
*`python PreBuild.py`
28
+
* Simply execute the [pre_build.py](build/pre_build.py) python script located in the GPA directory:
29
+
*`python build/pre_build.py`
30
30
* This script will clone any dependent repositories that are not present on the system. If any of the dependent repositories are already
31
31
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
32
32
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 a GPA release prior than 3.3, 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.
33
+
* NOTE: For GPA 3.3 or newer, if you are updating an existing clone of the GPA repo from a GPA release prior than 3.3, 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 [pre_build.py](build/pre_build.py) or [fetch_dependencies.py](scripts/fetch_dependencies.py).
34
34
* This script will also download and execute the Vulkan� SDK installer.
35
35
* 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.
36
36
* 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:
* 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:
39
39
*`source ~/VulkanSDK/1.0.68.0/setup-env.sh` (adjust path as necessary)
40
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.
41
+
* If you want to generate all cmake build files without trying to clone/pull dependent repos, you can add "--nofetch" to the [pre_build.py](build/pre_build.py) command line.
42
+
* Additional switches that can be used with the [pre_build.py](build/pre_build.py) script:
43
+
*`--vs=[2015,2017,2019]`: Specify the Visual Studio version for which to generate projects. Default is 2017.
44
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
45
*`--platform=[x86,x64]`: Specify the platform for which to generate build files. Default is both.
46
46
*`--clean`: Deletes CMakeBuild directory and regenerates all build files from scratch
@@ -63,14 +63,14 @@ this script everytime you pull new changes from GPA repository.
63
63
* Microsoft .NET 4.6.2 SDK from https://www.microsoft.com/en-us/download/details.aspx?id=53321
64
64
65
65
##### Build Instructions
66
-
* Load CMakeBuild\x64\GPUPerfAPI.sln into Visual Studio to build the 64-bit version of GPA
67
-
* Load CMakeBuild\x86\GPUPerfAPI.sln into Visual Studio to build the 32-bit version of GPA
66
+
* Load cmake_bld\x64\GPUPerfAPI.sln into Visual Studio to build the 64-bit version of GPA
67
+
* Load cmake_bld\x86\GPUPerfAPI.sln into Visual Studio to build the 32-bit version of GPA
68
68
* After a successful build, the GPUPerfAPI binaries can be found in `GPA\Output\$(Configuration)` (for example GPA\Output\Release)
69
69
70
70
#### Additional Information
71
71
* 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
72
-
the build number. The version and build numbers can be manually updated by modifying the [GPAVersion.h](Src/GPUPerfAPI-Common/GPAVersion.h) file.
73
-
* 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)
72
+
the build number. The version and build numbers can be manually updated by modifying the [gpa_version.h](source/gpu_perf_api_common/gpa_version.h) file.
73
+
* When building the internal version (using the --internal switch when calling [pre_build.py](build/pre_build.py), each binary filename will have a "-Internal" suffix (for example GPUPerfAPIDX11-x64-Internal.dll)
74
74
75
75
## Linux Build Information
76
76
@@ -79,18 +79,18 @@ this script everytime you pull new changes from GPA repository.
79
79
* For 32-bit builds, install the multilib packages: sudo apt-get install gcc-multilib g++-multilib
80
80
81
81
##### Build Instructions
82
-
* Execute "make" in the CMakeBuild/x64/debug to build the 64-bit debug version of GPA
83
-
* Execute "make" in the CMakeBuild/x64/release to build the 64-bit release version of GPA
84
-
* Execute "make" in the CMakeBuild/x86/debug to build the 32-bit debug version of GPA
85
-
* Execute "make" in the CMakeBuild/x86/release to build the 32-bit release version of GPA
82
+
* Execute "make" in the cmake_bld/x64/debug to build the 64-bit debug version of GPA
83
+
* Execute "make" in the cmake_bld/x64/release to build the 64-bit release version of GPA
84
+
* Execute "make" in the cmake_bld/x86/debug to build the 32-bit debug version of GPA
85
+
* Execute "make" in the cmake_bld/x86/release to build the 32-bit release version of GPA
86
86
* After a successful build, the GPUPerfAPI binaries can be found in `GPA/Output/$(Configuration)` (for example GPA/Output/release)
87
87
* When building the internal version, each binary filename will also have a "-Internal" suffix (for example libGPUPerfAPIGL-Internal.so)
88
88
89
89
## PublicCounterCompiler Tool
90
90
91
91
The PublicCounterCompiler Tool is a utility, written in C#, that will generate C++ code to define the public (or derived) counters.
92
-
It takes as input text files contained in the [PublicCounterCompilerInputFiles](Src/PublicCounterCompilerInputFiles) directory and
93
-
outputs files in the [GPUPerfAPICounterGenerator](Src/AutoGenerated/GPUPerfAPICounterGenerator), [GPUPerfAPIUnitTests](Src/AutoGenerated/GPUPerfAPIUnitTests)
92
+
It takes as input text files contained in the [public_counter_compiler_input_files](source/public_counter_compiler_input_files) directory and
93
+
outputs files in the [gpu_perf_api_counter_generator](source/auto_generated/gpu_perf_api_counter_generator), [gpu_perf_api_unit_tests](source/auto_generated/gpu_perf_api_unit_tests)
94
94
and [docs](docs) directories.
95
95
96
96
There are three ways to execute the tool:
@@ -107,7 +107,7 @@ There are three ways to execute the tool:
107
107
* Param 6: GPU - the GPU to take the counter names from (ex: Gfx9)
108
108
* Param 7: GPU ASIC - (optional) the subversion of GPU to take the counter names from
109
109
110
-
See the various PublicCounterDefinitions/*.txt files in the [PublicCounterCompilerInputFiles](Src/PublicCounterCompilerInputFiles) directory. These contain all the counter definitions.
110
+
See the various `public_counter_definitions_*.txt` files in the [public_counter_compiler_input_files](source/public_counter_compiler_input_files) directory. These contain all the counter definitions.
111
111
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.
112
112
113
113
Counter formulas are expressed in a Reverse Polish Notation and are made up the following elements:
@@ -118,4 +118,4 @@ Counter formulas are expressed in a Reverse Polish Notation and are made up the
118
118
* functions: The supported functions are: min, max, sum, ifnotzero, and vcomparemax4. "max and "sum" have variants that work on multiple items at once (i.e. sum16, sum64, etc.)
119
119
* hardware params: The supported hardware params are "num_shader_engines". "num_simds", "su_clock_prim", "num_prim_pipes", and "TS_FREQ"
120
120
121
-
For more details, see the "EvaluateExpression" function in the [GPADerivedCounters.cpp](Src/GPUPerfAPICounterGenerator/GPADerivedCounters.cpp) file.
121
+
For more details, see the "EvaluateExpression" function in the [gpa_derived_counter.cc](source/gpu_perf_api_counter_generator/gpa_derived_counter.cc) file.
After cloning the repository, please run the following python script to retrieve the required dependencies and generate the build files (see [BUILD.md](BUILD.md) for more information):
55
55
* python PreBuild.py
56
56
57
57
## Source Code Directory Layout
58
-
*[CMakeModules](CMakeModules) -- Common modules used in the CMake build system
59
-
*[docs](docs) -- contains documentation sources and a Doxygen configuration file
60
-
*[Src/AutoGenerated](Src/AutoGenerated) -- contains auto-generated source code used when building GPUPerfAPI
61
-
*[Src/Examples](Src/Examples) -- contains the source code for a DirectX 12, DirectX 11, Vulkan and OpenGL sample which use GPUPerfAPI
62
-
*[Src/GPUPerfAPI-Common](Src/GPUPerfAPI-Common) -- contains source code for a Common library shared by all versions of GPUPerfAPI
63
-
*[Src/GPUPerfAPICL](Src/GPUPerfAPICL) -- contains the source for the OpenCL™ version of GPUPerfAPI
64
-
*[Src/GPUPerfAPICounterGenerator](Src/GPUPerfAPICounterGenerator) -- contains the source code for a Common library providing all counter data
65
-
*[Src/GPUPerfAPICounters](Src/GPUPerfAPICounters) -- contains the source code for a library that can be used to query counters without an active GPUPerfAPI context
66
-
*[Src/GPUPerfAPIDX](Src/GPUPerfAPIDX) -- contains source code shared by the DirectX versions of GPUPerfAPI
67
-
*[Src/GPUPerfAPIDX11](Src/GPUPerfAPIDX11) -- contains the source for the DirectX11 version of GPUPerfAPI
68
-
*[Src/GPUPerfAPIDX12](Src/GPUPerfAPIDX12) -- contains the source for the DirectX12 version of GPUPerfAPI
69
-
*[Src/GPUPerfAPIGL](Src/GPUPerfAPIGL) -- contains the source for the OpenGL version of GPUPerfAPI
70
-
*[Src/GPUPerfAPIUnitTests](Src/GPUPerfAPIUnitTests) -- contains a small set of unit tests for GPUPerfAPI
71
-
*[Src/GPUPerfAPIVk](Src/GPUPerfAPIVk) -- contains the source for the Vulkan version of GPUPerfAPI
72
-
*[Src/PublicCounterCompiler](Src/PublicCounterCompiler) -- source code for a tool to generate C++ code for public counters from text files defining the counters.
73
-
*[Src/PublicCounterCompilerInputFiles](Src/PublicCounterCompilerInputFiles) -- input files that can be fed as input to the PublicCounterCompiler tool
74
-
*[Scripts](Scripts) -- scripts to use to clone/update dependent repositories
58
+
*[build](build) -- contains build scripts and cmake build modules
59
+
*[docs](docs) -- contains sphinx documentation sources and a Doxygen configuration file
60
+
*[include](include) -- contains GPUPerfAPI public headers
61
+
*[scripts](scripts) -- scripts to use to clone/update dependent repositories
62
+
*[source/auto_generated](source/auto_generated) -- contains auto-generated source code used when building GPUPerfAPI
63
+
*[source/examples](source/examples) -- contains the source code for a DirectX 12, DirectX 11, Vulkan and OpenGL sample which use GPUPerfAPI
64
+
*[source/gpu_perf_api_common](source/gpu_perf_api_common) -- contains source code for a Common library shared by all versions of GPUPerfAPI
65
+
*[source/gpu_perf_api_cl](source/gpu_perf_api_cl) -- contains the source for the OpenCL™ version of GPUPerfAPI
66
+
*[source/gpu_perf_api_counter_generator](source/gpu_perf_api_counter_generator) -- contains the source code for a Common library providing all counter data
67
+
*[source/gpu_perf_api_counters](source/gpu_perf_api_counters) -- contains the source code for a library that can be used to query counters without an active GPUPerfAPI context
68
+
*[source/gpu_perf_api_dx](source/gpu_perf_api_dx) -- contains source code shared by the DirectX versions of GPUPerfAPI
69
+
*[source/gpu_perf_api_dx11](source/gpu_perf_api_dx11) -- contains the source for the DirectX11 version of GPUPerfAPI
70
+
*[source/gpu_perf_api_dx12](source/gpu_perf_api_dx12) -- contains the source for the DirectX12 version of GPUPerfAPI
71
+
*[source/gpu_perf_api_gl](source/gpu_perf_api_gl) -- contains the source for the OpenGL version of GPUPerfAPI
72
+
*[source/gpu_perf_api_unit_tests](source/gpu_perf_api_unit_tests) -- contains a small set of unit tests for GPUPerfAPI
73
+
*[source/gpu_perf_api_vk](source/gpu_perf_api_vk) -- contains the source for the Vulkan version of GPUPerfAPI
74
+
*[source/public_counter_compiler](source/public_counter_compiler) -- source code for a tool to generate C++ code for public counters from text files defining the counters.
75
+
*[source/public_counter_compiler_input_files](source/public_counter_compiler_input_files) -- input files that can be fed as input to the PublicCounterCompiler tool
75
76
76
77
## Documentation
77
-
The documentation for GPUPerfAPI can be found in each [GitHub release](https://github.com/GPUOpen-Tools/GPA/releases). In the release .zip file or .tgz file, there
78
+
The documentation for GPUPerfAPI can be found in each [GitHub release](https://github.com/GPUOpen-Tools/gpu_performance_api/releases). In the release .zip file or .tgz file, there
78
79
will be a "docs" directory. Simply open the index.html file in a web browser to view the documentation.
79
80
80
81
The documentation is hosted publicly at: http://gpuperfapi.readthedocs.io/en/latest/
0 commit comments