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
Additional switches that can be used with the pre_build.py script:
56
57
--vs=[2022]: Specify the Visual Studio version for which to generate projects. Default is 2022.
57
-
--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.
58
+
--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.
58
59
--clean: Delete cmake-generated directories created by this script
59
60
--skipdx11: Does not generate build files for DX11 version of GPA (Windows only)
60
61
--skipdx12: Does not generate build files for DX12 version of GPA (Windows only)
NOTE: The PublicCounterCompiler Tool requires using the `Visual Studio` generator due to `C#` usage!
117
118
118
-
The PublicCounterCompiler Tool is a C# utility that will generate C++ code to define the public (or derived) counters.
119
-
It takes as input text files contained in the [public_counter_compiler_input_files](source/public_counter_compiler_input_files) directory and
120
-
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)
121
-
and [docs](docs) directories.
122
-
123
-
There are three ways to execute the tool:
124
-
* With no parameters - the user interface opens with no fields prepopulated.
125
-
* With two parameters - the user interface opens with the two main fields prepopulated. Note that pressing the "Compile Public Counters" button will load the correct input files and generate the output files in the correct location.
126
-
* Param 1: **API** - the API to compile counters for (e.g. GL, CL, DX11, DX12, VK, etc.)
127
-
* Param 2: **HW generation** - the generation to compile counters for (ex: Gfx9, Gfx10, Gfx11 etc.)
128
-
* With six or seven parameters - the user interface does not open and will generate the C++ files using the specified input and output file locations.
129
-
* Param 1: **Counter names file** - text file containing hardware counter names and type (CounterNames[API][GEN].txt)
130
-
* Param 2: **Public counter definition file** - text file defining how the public counters are calculated (PublicCounterDefinitions\*.txt)
131
-
* Param 3: **Output Dir** - the directory to generate the output in (e.g. the path to the GPUPerfAPICounterGenerator directory)
132
-
* Param 4: **Test output Dir** - the directory to generate the test output in (e.g. the path to the GPUPerfAPIUnitTests/counters directory)
133
-
* Param 5: **API** - the API to take the counter names from (e.g. DX12)
134
-
* Param 6: **GPU** - the GPU to take the counter names from (e.g. Gfx11)
135
-
* Param 7: **GPU ASIC** - the subversion of GPU to take the counter names from (optional)
136
-
137
-
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.
119
+
The PublicCounterCompiler Tool is a C# CLI utility that generates C++ code to define the public (or derived) counters.
120
+
It reads counter definition files from [source/codegen](source/codegen) and outputs files to
and [documentation/sphinx/source](documentation/sphinx/source).
124
+
125
+
```sh
126
+
# Generate the C++ code
127
+
PublicCounterCompiler
128
+
129
+
# Get command line options for more granular control
130
+
PublicCounterCompiler --help
131
+
```
132
+
133
+
See the `public_counter_definitions_*.txt` files in [source/codegen](source/codegen). These contain all the counter definitions.
138
134
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.
139
135
140
136
Counter formulas are expressed in a Reverse Polish Notation and are made up the following elements:
Copy file name to clipboardExpand all lines: NOTICES.txt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -11,14 +11,14 @@ The above copyright notice and this permission notice (including the next paragr
11
11
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
12
12
13
13
AMD copyrighted code (BSD-2-Clause)
14
-
Copyright (c) 2012 Advanced Micro Devices, Inc. All rights reserved.
14
+
Copyright Advanced Micro Devices, Inc. All rights reserved.
15
15
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
16
16
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
17
17
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
18
18
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.
19
19
20
20
AMD copyrighted code (MIT)
21
-
Copyright (c) 2016-2018 Advanced Micro Devices, Inc. All rights reserved.
21
+
Copyright Advanced Micro Devices, Inc. All rights reserved.
22
22
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
23
23
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
24
24
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0 commit comments