Skip to content

Commit 6faa062

Browse files
committed
GPA 3.9 updates
1 parent 3642849 commit 6faa062

File tree

43 files changed

+354
-247
lines changed

Some content is hidden

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

43 files changed

+354
-247
lines changed

NOTICES.txt

Lines changed: 165 additions & 30 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,13 @@ Prebuilt binaries can be downloaded from the Releases page: https://github.com/G
3131
* Provides access to some raw hardware counters. See [Raw Hardware Counters](#raw-hardware-counters) for more information.
3232

3333
## What's New
34-
* Version 3.8 (04/01/21)
35-
* Add support for additional GPUs and APUs, including AMD Radeon™ RX 6700 series GPUs.
36-
* Code has been updated to adhere to Google C++ Style Guide.
37-
* New public headers have been added.
38-
* Old headers are deprecated and will emit compile-time message.
39-
* Projects loading GPA will need to be recompiled, but no code changes are required unless moving to the new headers.
40-
* Improvements made to sample applications.
41-
* Updated documentation for new codestyle (and https://github.com/GPUOpen-Tools/gpu_performance_api/issues/56)
42-
* Support for the --internal flag to has been removed from the build script.
34+
* Version 3.9 (07/27/21)
35+
* Add support for additional GPUs and APUs.
36+
* Improvements made to the sample applications.
4337

4438
## System Requirements
4539
* An AMD Radeon GPU or APU based on Graphics IP version 8 and newer.
46-
* Windows: Radeon Software Adrenaline 2020 Edition 20.11.2 or later (Driver Packaging Version 20.45 or later).
40+
* Windows: Radeon Software Adrenalin 2020 Edition 20.11.2 or later (Driver Packaging Version 20.45 or later).
4741
* Linux: Radeon Software for Linux Revision 20.45 or later.
4842
* Radeon GPUs or APUs based on Graphics IP version 6 and 7 are no longer supported by GPUPerfAPI. Please use an older version ([3.3](https://github.com/GPUOpen-Tools/gpu_performance_api/releases/tag/v3.3)) with older hardware.
4943
* Windows 7, 8.1, and 10.
@@ -90,8 +84,8 @@ This version allows you to access the raw hardware counters by simply specifying
9084
### Ubuntu 20.04 LTS Vulkan ICD Issue
9185
On Ubuntu 20.04 LTS, Vulkan ICD may not be set to use AMD Vulkan ICD. In this case, it needs to be explicitly set to use AMD Vulkan ICD before using the GPA. It can be done by setting the ```VK_ICD_FILENAMES``` environment variable to ```/etc/vulkan/icd.d/amd_icd64.json```.
9286

93-
### OpenGL Fetchsize Counter on Radeon RX 6000
94-
FetchSize counter will show an error when enabled on Radeon RX 6000 Series GPU using OpenGL.
87+
### OpenGL FetchSize Counter on Radeon RX 6000 Series GPUs
88+
FetchSize counter will show an error when enabled on Radeon RX 6000 Series GPUs using OpenGL.
9589

9690
### Adjusting Linux Clock Mode
9791
Adjusting the GPU clock mode on Linux is accomplished by writing to: ```/sys/class/drm/card\<N\>/device/power_dpm_force_performance_level```, where \<N\> is the index of the card in question.
@@ -103,12 +97,16 @@ By default this file is only modifiable by root, so the application being profil
10397
* Setting the GPU clock mode is not working correctly for <b>Radeon 5700 Series GPUs</b>, potentially leading to some inconsistencies in counter values from one run to the next.
10498

10599
### DirectX11 Performance Counter Accuracy For Select Counters and GPUs
106-
The following performance counter values may not be accurate for DirectX 11 applications running on a Radeon 5700, and 6000 Series GPU.
100+
The following performance counter values may not be accurate for DirectX 11 applications running on a Radeon 5700, and 6000 Series GPUs:
107101
* VALUInstCount, SALUInstCount, VALUBusy, SALUBusy for all shader stages: These values should be representative of performance, but may not be 100% accurate.
108102
* Most of the ComputeShader counters (all except the MemUnit and WriteUnit counters): These values should be representative of performance, but may not be 100% accurate.
109103

110-
### OpenGL Performance Counter Accuracy For Radeon 7500
111-
The following performance counter values may not be accurate for OpenGL applications running on a Radeon 5700 Series GPU.
104+
### OpenCL Performance Counter Accuracy For Radeon 6000 Series GPUs
105+
The following performance counter values may not be accurate for OpenCL applications running on Radeon 6000 Series GPUs:
106+
* Wavefronts, VALUInsts, SALUInsts, SALUBusy, VALUUtilization: These values should be representative of performance, but may not be 100% accurate.
107+
108+
### OpenGL Performance Counter Accuracy For Radeon 5700 Series GPUs
109+
The following performance counter values may not be accurate for OpenGL applications running on a Radeon 5700 Series GPUs:
112110
* Most of the ComputeShader counters (all except the MemUnit and WriteUnit counters): These values should be representative of performance, but may not be 100% accurate.
113111

114112
### Variability in Deterministic Counters For Select GPUs
@@ -119,7 +117,6 @@ Performance counters which should be deterministic are showing variability on Ra
119117
Profiling bundles in DirectX12 and Vulkan is not working properly. It is recommended to remove those GPA Samples from your application, or move the calls out of the bundle for profiling.
120118

121119
## Style and Format Change
122-
123120
The source code of this product is being reformatted to follow the Google C++ Style Guide https://google.github.io/styleguide/cppguide.html.
124121
In the interim you may encounter a mix of both an older C++ coding style, as well as the newer Google C++ Style.
125122
Please refer to the _clang-format file in the root directory of the product for additional style information.

ReleaseNotes.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# GPU Performance API Release Notes
22
---
33

4+
## Version 3.9 (07/27/21)
5+
* Add support for additional GPUs and APUs.
6+
* Improvements made to the sample applications.
7+
48
## Version 3.8 (04/01/21)
59
* Add support for additional GPUs and APUs, including AMD Radeon™ RX 6700 series GPUs.
610
* Code has been updated to adhere to Google C++ Style Guide.
@@ -234,4 +238,4 @@
234238
* Supports OpenCL™ on ATI Radeon 4000 and 5000 series.
235239
* Provides derived counters based on raw HW performance counters.
236240
* Manages memory automatically – no allocations required.
237-
* Requires ATI Catalyst driver 10.1 or later.
241+
* Requires ATI Catalyst driver 10.1 or later.

build/cmake_modules/defs.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## Copyright (c) 2018-2020 Advanced Micro Devices, Inc. All rights reserved.
1+
## Copyright (c) 2018-2021 Advanced Micro Devices, Inc. All rights reserved.
22
cmake_minimum_required(VERSION 3.5.1)
33

44
## Define the GPA version
55
set(GPA_MAJOR_VERSION 3)
6-
set(GPA_MINOR_VERSION 8)
6+
set(GPA_MINOR_VERSION 9)
77
set(GPA_UPDATE_VERSION 0)
88

99
if(NOT DEFINED GPA_BUILD_NUMBER)

docs/doxygen/DoxyfilePublic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ PROJECT_NAME = "GPU Perf API"
3131
# This could be handy for archiving the generated documentation or
3232
# if some version control system is used.
3333

34-
PROJECT_NUMBER = 2.11
34+
PROJECT_NUMBER = 3.9
3535

3636
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
3737
# base path where the generated documentation will be put.

docs/sphinx/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@
6161
# built documents.
6262
#
6363
# The short X.Y version.
64-
version = u'3.8'
64+
version = u'3.9'
6565
# The full version, including alpha/beta/rc tags.
66-
release = u'3.8'
66+
release = u'3.9'
6767

6868
# The language for content autogenerated by Sphinx. Refer to documentation
6969
# for a list of supported languages.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/usr/bin/python3
2+
##=============================================================================
3+
## Copyright (c) 2019-2021 Advanced Micro Devices, Inc. All rights reserved.
4+
## \author AMD Developer Tools Team
5+
## \file
6+
## \brief Script to change the file permission for device clock setting on Android
7+
##=============================================================================
8+
#
9+
import argparse
10+
import os.path
11+
import sys
12+
import subprocess
13+
import platform
14+
15+
parser = argparse.ArgumentParser(description="Changes the file permission for device clock setting on Android")
16+
parser.add_argument("-t", "--target", required=True, help="IP address of Android device")
17+
parser.add_argument("-d", "--device", help="adb device ID, as seen in 'adb devices'. This or -i must be specified when multiple devices are available.")
18+
parser.add_argument("-i", "--infer", action="store", metavar="PORT", nargs="?", const="5555", help="Specify this when using ADB over TCP/IP, to infer the -d argument from the -t one. This option saves you from having to specify the device IP address twice. Port 5555 is used if no port is specified. This or -d must be specified when multiple devices are available.")
19+
args = parser.parse_args()
20+
21+
# Check that we have adb in PATH, that it sees a device and the device is
22+
# in a usable state
23+
proc = subprocess.Popen(["adb", "--help"], stdout=subprocess.DEVNULL)
24+
proc.communicate()
25+
if proc.returncode != 0:
26+
sys.stderr.write("Error: adb not in PATH\n")
27+
exit(1)
28+
29+
proc = subprocess.Popen(["adb", "devices"], stdout=subprocess.PIPE)
30+
output = proc.communicate()[0].decode()
31+
if proc.returncode != 0:
32+
sys.stderr.write("Error: unexpected error querying adb devices\n")
33+
exit(1)
34+
35+
lines = output.strip().splitlines()
36+
if lines[0] != "List of devices attached":
37+
sys.stderr.write("Error: unexpected output from 'adb devices'\n")
38+
exit(1)
39+
40+
if len(lines) > 2 and not (args.device or args.infer):
41+
sys.stderr.write("Error: Multiple Android devices available; must specify one with -d or -i\n")
42+
for line in lines[1:]:
43+
sys.stderr.write(" {}\n".format(line))
44+
exit(1)
45+
46+
device = args.device
47+
if device is None and args.infer:
48+
device = args.target + ":" + args.infer
49+
50+
if device is None:
51+
proc = subprocess.Popen(["adb", "get-serialno"], stdout=subprocess.PIPE)
52+
device = proc.communicate()[0].decode().strip()
53+
54+
proc = subprocess.Popen(["adb", "-s", device, "get-state"], stdout=subprocess.PIPE)
55+
output = proc.communicate()[0].decode().strip()
56+
if proc.returncode != 0:
57+
# No need for explicit message; adb already reported device not found
58+
exit(1)
59+
if output != "device":
60+
sys.stderr.write("Error: adb device is not in a usable state\n")
61+
exit(1)
62+
63+
# sysfs permission needs to be changed:
64+
subprocess.call(["adb", "-s", device, "shell", "su", "root", "chmod", "766", "/sys/class/drm/card0/device/power_dpm_force_performance_level"])

scripts/enable_set_device_clock_android.sh

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

scripts/gpa_packaging.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def CreatePackage(self, archive_output_dir, build_artifacts_dir, sphinx_docs_dir
195195
if android == True:
196196
_android_device_connect_script_file = os.path.normpath(os.path.join(self._gpa_root_dir, "scripts", self._android_device_connect_script))
197197
_android_device_connect_script_file_in_archive = os.path.normpath(os.path.join(gpa_archive_root_name, self._android_device_connect_script))
198+
198199
GpaUtils.WriteFileToArchive(gpa_archive_handle, _android_device_connect_script_file,
199200
_android_device_connect_script_file_in_archive)
200201

@@ -257,7 +258,7 @@ def __init__(self):
257258
"LICENSE"]
258259

259260
_version_file="source/gpu_perf_api_common/gpa_version.h"
260-
_android_device_connect_script = "enable_set_device_clock_android.sh"
261+
_android_device_connect_script = "enable_set_device_clock_android.py"
261262
_major_version=0
262263
_minor_version=0
263264
_update_version=0

source/auto_generated/gpu_perf_api_counter_generator/gpa_hw_counter.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
55
set(HW_COUNTER_HEADERS
66
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx10.h
77
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx103.h
8-
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx103_gfx1031.h
8+
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx103_gfx1031_gfx1032.h
99
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx8.h
1010
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx8_baffin.h
1111
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx8_carrizo.h
@@ -21,7 +21,7 @@ ${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx9_placeholder4.h)
2121
set(HW_COUNTER_SRC
2222
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx10.cc
2323
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx103.cc
24-
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx103_gfx1031.cc
24+
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx103_gfx1031_gfx1032.cc
2525
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx8.cc
2626
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx8_baffin.cc
2727
${CMAKE_CURRENT_LIST_DIR}/gpa_hw_counter_gfx8_carrizo.cc

source/auto_generated/gpu_perf_api_counter_generator/gpa_hw_counter_gfx103_gfx1031.cc renamed to source/auto_generated/gpu_perf_api_counter_generator/gpa_hw_counter_gfx103_gfx1031_gfx1032.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// Copyright (c) 2010-2021 Advanced Micro Devices, Inc. All rights reserved.
33
/// @author AMD Developer Tools Team
44
/// @file
5-
/// @brief Hardware counter info for GFX103_GFX1031.
5+
/// @brief Hardware counter info for GFX103_GFX1031_GFX1032.
66
//==============================================================================
77

88
// This file is autogenerated by the ConvertHWEnums project.
@@ -12,11 +12,11 @@
1212
#include <set>
1313

1414
#include "gpu_perf_api_counter_generator/gpa_counter.h"
15-
#include "auto_generated/gpu_perf_api_counter_generator/gpa_hw_counter_gfx103_gfx1031.h"
15+
#include "auto_generated/gpu_perf_api_counter_generator/gpa_hw_counter_gfx103_gfx1031_gfx1032.h"
1616
#include "gpu_performance_api/gpu_perf_api_types.h"
17-
namespace counter_gfx103_gfx1031
17+
namespace counter_gfx103_gfx1031_gfx1032
1818
{
19-
GpaHardwareCounterDesc kGcrCountersGfx103_gfx1031[] = {
19+
GpaHardwareCounterDesc kGcrCountersGfx103_gfx1031_gfx1032[] = {
2020
{0, GPA_HIDE_NAME("GCR_000"), GPA_HIDE_NAME("GCR"), GPA_HIDE_NAME("Counter 0 from group GCR"), kGpaDataTypeUint64, 0, GPA_UINT64_MAX},
2121
{1, GPA_HIDE_NAME("GCR_001"), GPA_HIDE_NAME("GCR"), GPA_HIDE_NAME("Counter 1 from group GCR"), kGpaDataTypeUint64, 0, GPA_UINT64_MAX},
2222
{2, GPA_HIDE_NAME("GCR_002"), GPA_HIDE_NAME("GCR"), GPA_HIDE_NAME("Counter 2 from group GCR"), kGpaDataTypeUint64, 0, GPA_UINT64_MAX},
@@ -128,6 +128,6 @@ namespace counter_gfx103_gfx1031
128128
{108, GPA_HIDE_NAME("GCR_108"), GPA_HIDE_NAME("GCR"), GPA_HIDE_NAME("Counter 108 from group GCR"), kGpaDataTypeUint64, 0, GPA_UINT64_MAX},
129129
{109, GPA_HIDE_NAME("GCR_109"), GPA_HIDE_NAME("GCR"), GPA_HIDE_NAME("Counter 109 from group GCR"), kGpaDataTypeUint64, 0, GPA_UINT64_MAX},
130130
};
131-
} // counter_gfx103_gfx1031
131+
} // counter_gfx103_gfx1031_gfx1032
132132

133133
// clang-format on

0 commit comments

Comments
 (0)