Skip to content

Commit

Permalink
GPA 3.11 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
PLohrmannAMD committed Apr 25, 2022
1 parent 1d7ea33 commit eb82bc7
Show file tree
Hide file tree
Showing 438 changed files with 107,451 additions and 1,221 deletions.
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,13 @@ compile_commands.json
# Build results
[Oo]utput/
[Dd]ebug/
!Common/Lib/**/[Dd]ebug
[Dd]ebugPublic/
[Rr]elease/
!Common/Lib/**/[Rr]elease
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
!Common/Lib/**/[Bb]in
[Oo]bj/
[Ll]og/
Doc/public
Expand Down Expand Up @@ -59,10 +56,8 @@ artifacts/
*.ilk
*.meta
*.obj
!Common/Lib/**/*.obj
*.pch
*.pdb
!Common/Lib/**/*.pdb
*.pgc
*.pgd
*.rsp
Expand Down Expand Up @@ -152,7 +147,7 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
Expand Down Expand Up @@ -252,4 +247,6 @@ _Pvt_Extensions

# Documentation build files
docs/build
.doctrees/

external/**
3 changes: 2 additions & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ order to clone/update any dependent repositories.
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
this script everytime you pull new changes from GPA repository.
* 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).
* NOTE: For GPA 3.11 and newer, the Common/ directory has been removed, and the external/Lib/Ext/GoogleTest will first need to be deleted instead.
* This script will also download and execute the Vulkan� SDK installer.
* On Windows, running the installer may require elevation. If you've previously installed the required Vulkan version, fetch_dependencies.py will simply copy the files from the default installation location into the correct place into the GPUPerfAPI directory tree.
* fetch_dependencies.py 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:
Expand Down Expand Up @@ -58,7 +59,7 @@ this script everytime you pull new changes from GPA repository.
##### Prerequisites
* Microsoft Visual Studio 2017
* Windows 10 SDK Version 10.0.10586.0 from https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk
* You can override the version of the Windows 10 SDK used by modifying Common/Lib/Ext/Windows-Kits/Global-WindowsSDK.props
* You can override the version of the Windows 10 SDK used by modifying external/Lib/Ext/Windows-Kits/Global-WindowsSDK.props
* Microsoft .NET 4.6.2 SDK from https://www.microsoft.com/en-us/download/details.aspx?id=53321

##### Build Instructions
Expand Down
68 changes: 9 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,65 +31,16 @@ Prebuilt binaries can be downloaded from the Releases page: https://github.com/G
* Provides access to some raw hardware counters. See [Raw Hardware Counters](#raw-hardware-counters) for more information.

## What's New
## Version 3.10 (01/25/22)
### Version 3.11 (04/25/22)
* Add support for additional GPUs and APUs.
* Redefined derived counters on GCN (Vega), RDNA, and RDNA2 hardware.
* New pipeline-based counters to better match hardware behavior.
* GCN (Polaris) hardware:
* Added: CSThreadGroupSize.
* Fixed: CSThreads, CSFlatVMemInsts, HiZTilesAccepted, HiZTilesAcceptedCount, PreZQuadsCulled, PreZQuadsCulledCount, PreZQuadsSurvivingCount.
* GCN (Radeon Vega Series) hardware:
* Removed: VSBusy, VSBusyCycles, VSTime, HSBusy, HSBusyCycles, HSTime, DSBusy, DSBusyCycles, DSTime.
* Added: VsGsBusy, VsGsBusyCycles, VsGsTime, PreTessellationBusy, PreTessellationBusyCycles, PreTessellationTime, PostTessellationBusy, PostTessellationBusyCycles, PostTessellationTime.
* Removed: VertexShader group (VSVerticesIn, VSVALUInstCount, VSSALUInstCount, VSVALUBusy, VSVALUBusyCycles, VSSALUBusy, VSSALUBusyCycles).
* Added: VertexGeometry group (VsGsVALUInstCount, VsGsSALUInstCount, VsGsVALUBusy, VsGsVALUBusyCycles, VsGsSALUBusy, VsGsSALUBusyCycles).
* Represents combined data from vertex and geometry shaders in a VS-PS or VS-GS-PS pipeline.
* Removed: HullShader group (HSPatches, HSVALUInstCount, HSSALUInstCount, HSVALUBusy, HSVALUBusyCycles, HSSALUBusy, HSSALUBusyCycles).
* Added: PreTessellation group (PreTessVALUInstCount, PreTessSALUInstCount, PreTessVALUBusy, PreTessVALUBusyCycles, PreTessSALUBusy, PreTessSALUBusyCycles).
* Represents combined data from vertex and hull shaders in a VS-HS-DS-PS or VS-HS-DS-GS-PS pipeline.
* Removed: DomainShader group (DSVerticesIn, DSVALUInstCount, DSSALUInstCount, DSVALUBusy, DSVALUBusyCycles, DSSALUBusy, DSSALUBusyCycles).
* Removed: GeometryShader group (GSPrimsIn, GSVerticesOut, GSVALUInstCount, GSSALUInstCount, GSVALUBusy, GSVALUBusyCycles, GSSALUBusy, GSSALUBusyCycles).
* Added: PostTessellation group (PostTessVALUInstCount, PostTessSALUInstCount, PostTessVALUBusy, PostTessVALUBusyCycles, PostTessSALUBusy, PostTessSALUBusyCycles).
* Represents combined data from domain and geometry shaders in a VS-HS-DS-PS or VS-HS-DS-GS-PS pipeline.
* Added: CSThreadGroupSize.
* Fixed: PSBusy, PSBusyCycles, PSTime, CSBusy, CSBusyCycles, CSTime, CSThreads, CSFlatVMemInsts, HiZTilesAccepted, HiZTilesAcceptedCount, HiZTilesRejectedCount, HiZQuadsCulled, HiZQuadsCulledCount, HiZQuadsAcceptedCount, PreZQuadsCulled, PreZQuadsCulledCount, PreZQuadsSurvivingCount.
* RDNA (Radeon RX 5000 Series) hardware:
* Removed: VSBusy, VSBusyCycles, VSTime, HSBusy, HSBusyCycles, HSTime, DSBusy, DSBusyCycles, DSTime.
* Added: VsGsBusy, VsGsBusyCycles, VsGsTime, PreTessellationBusy, PreTessellationBusyCycles, PreTessellationTime, PostTessellationBusy, PostTessellationBusyCycles, PostTessellationTime.
* Removed: VertexShader group (VSVerticesIn, VSVALUInstCount, VSSALUInstCount, VSVALUBusy, VSVALUBusyCycles, VSSALUBusy, VSSALUBusyCycles).
* Added: VertexGeometry group (VsGsVALUInstCount, VsGsSALUInstCount, VsGsVALUBusy, VsGsVALUBusyCycles, VsGsSALUBusy, VsGsSALUBusyCycles).
* Represents combined data from vertex and geometry shaders in a VS-PS or VS-GS-PS pipeline.
* Removed: HullShader group (HSPatches, HSVALUInstCount, HSSALUInstCount, HSVALUBusy, HSVALUBusyCycles, HSSALUBusy, HSSALUBusyCycles).
* Added: PreTessellation group (PreTessVALUInstCount, PreTessSALUInstCount, PreTessVALUBusy, PreTessVALUBusyCycles, PreTessSALUBusy, PreTessSALUBusyCycles).
* Represents combined data from vertex and hull shaders in a VS-HS-DS-PS or VS-HS-DS-GS-PS pipeline.
* Removed: DomainShader group (DSVerticesIn, DSVALUInstCount, DSSALUInstCount, DSVALUBusy, DSVALUBusyCycles, DSSALUBusy, DSSALUBusyCycles).
* Removed: GeometryShader group (GSPrimsIn, GSVerticesOut, GSVALUInstCount, GSSALUInstCount, GSVALUBusy, GSVALUBusyCycles, GSSALUBusy, GSSALUBusyCycles).
* Added: PostTessellation group (PostTessVALUInstCount, PostTessSALUInstCount, PostTessVALUBusy, PostTessVALUBusyCycles, PostTessSALUBusy, PostTessSALUBusyCycles).
* Represents combined data from domain and geometry shaders in a VS-HS-DS-PS or VS-HS-DS-GS-PS pipeline.
* Removed: PrimitivesIn.
* Added: CSThreadGroupSize.
* Fixed: PSBusy, PSBusyCycles, PSTime, CSBusy, CSBusyCycles, CSTime, CSThreads, HiZTilesAccepted, HiZTilesAcceptedCount, HiZTilesRejectedCount, PreZQuadsCulled, PreZQuadsCulledCount, PreZQuadsSurvivingCount.
* RDNA2 (Radeon RX 6000 Series) hardware:
* Removed: VSBusy, VSBusyCycles, VSTime, HSBusy, HSBusyCycles, HSTime, DSBusy, DSBusyCycles, DSTime.
* Removed: VertexShader group, HullShader group, DomainShader group, GeometryShader group.
* Removed: PrimitivesIn, PSVALUInstCount, PSSALUInstCount, PSVALUBusy, PSVALUBusyCycles, PSSALUBusy, PSSALUBusyCycles.
* Removed: CSVALUInsts, CSVALUUtilization, CSSALUInsts, CSVFetchInsts, CSSFetchInsts, CSVWriteInsts, CSVALUBusy, CSVALUBusyCycles, CSSALUBusy, CSSALUBusyCycles.
* Added: CSThreadGroupSize
* Fixed: CSThreads, HiZTilesAccepted, HiZTilesAcceptedCount, HiZTilesRejectedCount, PreZQuadsCulled, PreZQuadsCulledCount, PreZQuadsSurvivingCount.
* Integrated clang-tidy and clang-format into cmake build options.
* New entrypoint added: GpaGetDeviceGeneration. Binary backwards compatibility is maintained.
* OpenGL on Linux: Fixed hardware detection on MESA drivers.
* OpenGL: Fixed hardware detection accuracy.
* Setting GPA_OVERRIDE_LOG_LEVEL env var to an integer equal to a GpaLoggingType enum can be used to increase or decrease logging output.
* DX11:
* Fixed Adrenalin driver version detection.
* Fixed setting the number of shader arrays based on client hardware.
* Improvements made to the sample applications:
* Extensive counter validation in DX12.
* Sample apps can now confirm successful validation tests.
* Sample apps now support passing in a counter file to specify which counters to enable.
* Consolidated parameter parsing logic in sample apps.
* In Vulkan and DX12 samples, the return code now indicates the number of errors that were reported.
* Counter updates for RDNA2 (Radeon RX 6000 Series) hardware:
* Added ray tracing counters for Vulkan: RayTriTests, RayBoxTests, TotalRayTests, and RayTestsPerWave.
* Fixed values incorrectly reported by counters PSExportStalls and PSExportStallCycles.
* On all hardware: renamed counter "DepthStencilTestBusyCount" to "DepthStencilTestBusyCycles" for consistency with other similar counters.
* Added support for Ninja compiler.
* Improved error reporting.
* Improved counter validation.
* Disabled support for Mesa driver. We hope to re-enable it in a future release.

## System Requirements
* An AMD Radeon GPU or APU based on Graphics IP version 8 and newer.
Expand Down Expand Up @@ -153,7 +104,6 @@ There are some counters that are returning unexpected results on specific hardwa
* AMD Radeon RX 6800, DX12: HiZ and PreZ counters may consistently report 33% higher than expected.
* AMD Radeon RX 6800, DX11: CSThreadGroups may consistently report 33% higher than expected.
* AMD Radeon RX 6700M, DX11: CSLDSBankConflict and CSLDSBankConflictCycles may consistently report as much as 30x higher than expected.
* AMD Radeon RX 5000 Series, DX12: ScalarCacheHitCount may consistently report 0.
* AMD Radeon RX 480, DX12: CulledPrims and PSPixelsOut may inconsistently report higher than expected.

### Counter Validation Errors in D3D12ColorCube Sample App
Expand Down
12 changes: 12 additions & 0 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# GPU Performance API Release Notes
---

## Version 3.11 (04/25/22)
* Add support for additional GPUs and APUs.
* Counter updates for RDNA2 (Radeon RX 6000 Series) hardware:
* Added ray tracing counters for Vulkan: RayTriTests, RayBoxTests, TotalRayTests, and RayTestsPerWave.
* Fixed values incorrectly reported by counters PSExportStalls and PSExportStallCycles.
* On all hardware: renamed counter "DepthStencilTestBusyCount" to "DepthStencilTestBusyCycles" for consistency with other similar counters.
* External dependent repositories are now cloned into an "external/" subdirectory within the gpu_performance_api repository.
* Added support for Ninja compiler.
* Improved error reporting.
* Improved counter validation.
* Disabled support for Mesa driver. We hope to re-enable it in a future release.

## Version 3.10 (01/25/22)
* Add support for additional GPUs and APUs.
* Redefined derived counters on GCN (Vega), RDNA, and RDNA2 hardware.
Expand Down
22 changes: 12 additions & 10 deletions build/cmake_modules/defs.cmake
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
## Copyright (c) 2018-2021 Advanced Micro Devices, Inc. All rights reserved.
## Copyright (c) 2018-2022 Advanced Micro Devices, Inc. All rights reserved.
cmake_minimum_required(VERSION 3.5.1)

## Define the GPA version
set(GPA_MAJOR_VERSION 3)
set(GPA_MINOR_VERSION 10)
set(GPA_MINOR_VERSION 11)
set(GPA_UPDATE_VERSION 0)

if(NOT DEFINED GPA_BUILD_NUMBER)
set(GPA_BUILD_NUMBER 0)
endif()

if(NOT DEFINED GPA_ROOT)
set(GPA_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
set(GPA_ROOT ${CMAKE_CURRENT_LIST_DIR}/../..)
endif()

if(NOT DEFINED GPA_OUTPUT_DIR)
set(GPA_OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/output)
set(GPA_OUTPUT_DIR ${GPA_ROOT}/output)
endif()

## Set the Common Directories
set(COMMON_DIR "${CMAKE_SOURCE_DIR}/../Common")
set(COMMON_DIR "${GPA_ROOT}/external")
set(COMMON_DIR_LIB "${COMMON_DIR}/Lib")
set(COMMON_DIR_SRC "${COMMON_DIR}/Src")
set(GPA_PUBLIC_HEADER_REL_PATH "include")
Expand Down Expand Up @@ -69,15 +69,17 @@ set(GPA_SRC_GL_TRIANGLE_REL_PATH "source/examples/ope
set(GPA_SRC_GL_TRIANGLE "${GPA_ROOT}/${GPA_SRC_GL_TRIANGLE_REL_PATH}")
set(GPA_SRC_D3D11_TRIANGLE_REL_PATH "source/examples/dx11/dx11_triangle")
set(GPA_SRC_D3D11_TRIANGLE "${GPA_ROOT}/${GPA_SRC_D3D11_TRIANGLE_REL_PATH}")
set(GPA_SRC_THIRD_PARTY_REL_PATH "source/third_party")
set(GPA_SRC_THIRD_PARTY "${GPA_ROOT}/${GPA_SRC_THIRD_PARTY_REL_PATH}")

set(GOOGLETEST_DIR ${COMMON_DIR_LIB}/Ext/GoogleTest)

## List of common cmake files
set(CMAKE_COMMON_SRC_GLOBAL_CMAKE_MODULE ${COMMON_DIR_SRC}/CMakeModules/Global-Common.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_INTERNAL ${COMMON_DIR_SRC}/CMakeModules/Global-Internal.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_CMAKE_MODULE ${GPA_SRC_THIRD_PARTY}/CMakeModules/Global-Common.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_INTERNAL ${GPA_SRC_THIRD_PARTY}/CMakeModules/Global-Internal.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_ADL_UTIL ${COMMON_DIR_SRC}/ADLUtil/Global-ADLUtil.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_AMD_DX_EXT ${COMMON_DIR_SRC}/AmdDxExt/Global-AmdDxExt.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_AMD_VK_EXT ${COMMON_DIR_SRC}/AmdVkExt/Global-AmdVkExt.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_AMD_DX_EXT ${GPA_SRC_THIRD_PARTY}/AmdDxExt/Global-AmdDxExt.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_AMD_VK_EXT ${GPA_SRC_THIRD_PARTY}/AmdVkExt/Global-AmdVkExt.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_DEVICE_INFO ${COMMON_DIR_SRC}/DeviceInfo/Global-DeviceInfo.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_DYNAMIC_LIBRARY_MODULE ${COMMON_DIR_SRC}/DynamicLibraryModule/Global-DynamicLibraryModule.cmake)
set(CMAKE_COMMON_SRC_GLOBAL_TSINGLETON ${COMMON_DIR_SRC}/TSingleton/Global-TSingleton.cmake)
Expand All @@ -86,7 +88,7 @@ set(CMAKE_COMMON_LIB_GLOBAL_AMD_ADL ${COMMON_DIR_LIB}/AM
set(CMAKE_COMMON_LIB_GLOBAL_AMD_OPENCL_NO_LIB ${COMMON_DIR_LIB}/AMD/APPSDK/Global-OpenCL-NoLib.cmake)
set(CMAKE_COMMON_LIB_GLOBAL_AMD_OPENCL ${COMMON_DIR_LIB}/AMD/APPSDK/Global-OpenCL.cmake)
set(CMAKE_COMMON_LIB_GLOBAL_EXT_OPENGL ${COMMON_DIR_LIB}/Ext/OpenGL/Global-OpenGL.cmake)
set(CMAKE_COMMON_LIB_GLOBAL_EXT_VULKAN ${COMMON_DIR_LIB}/Ext/Vulkan/Global-Vulkan.cmake)
set(CMAKE_COMMON_LIB_GLOBAL_EXT_VULKAN ${GPA_SRC_THIRD_PARTY}/Vulkan/Global-Vulkan.cmake)
set(CMAKE_COMMON_LIB_GLOBAL_EXT_WINDOWS_SDK ${COMMON_DIR_LIB}/Ext/Windows-Kits/Global-WindowsSDK.cmake)

## Options controlling the behavior of clang tools
Expand Down
6 changes: 3 additions & 3 deletions build/cmake_modules/gpa_version.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Copyright (c) 2020-2021 Advanced Micro Devices, Inc. All rights reserved.
## Copyright (c) 2020-2022 Advanced Micro Devices, Inc. All rights reserved.
cmake_minimum_required(VERSION 3.5.1)

include(${CMAKE_CURRENT_LIST_DIR}/defs.cmake)
Expand All @@ -20,7 +20,7 @@ set(GPA_VERSION_HEADER_FILE_CONTENT "//=========================================
// Make sure to increment GPA_FUNCTION_TABLE_MAJOR_VERSION_NUMBER anytime GPA_MAJOR_VERSION is incremented
#define GPA_MAJOR_VERSION ${GPA_MAJOR_VERSION} ///< Macro for GPA major version.
#define GPA_MINOR_VERSION ${GPA_MINOR_VERSION} ///< Macro for GPA minor version.
#define GPA_MINOR_VERSION ${GPA_MINOR_VERSION} ///< Macro for GPA minor version.
#define GPA_UPDATE_VERSION ${GPA_UPDATE_VERSION} ///< Macro for GPA update version.
/// Macro for GPA build number
Expand All @@ -36,7 +36,7 @@ set(GPA_VERSION_HEADER_FILE_CONTENT "//=========================================
#define AMDT_PROJECT_SUFFIX_STR GPA_VERSION_STRING(AMDT_PROJECT_SUFFIX) ///< Macro for project suffix string.
#define GPA_COPYRIGHT_CURRENT_YEAR 2022 ///< Macro for current year.
#define GPA_COPYRIGHT_CURRENT_YEAR ${CURRENT_YEAR} ///< Macro for current year.
#define GPA_COPYRIGHT_STR \\
\"Copyright (c) 2010-\" GPA_VERSION_STRING(GPA_COPYRIGHT_CURRENT_YEAR) \" Advanced Micro Devices, Inc. All rights reserved.\" ///< Macro for copyright string.
Expand Down
9 changes: 7 additions & 2 deletions build/cmake_modules/targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ set(DEPTH "./")
include(${GPA_CMAKE_MODULES_DIR}/defs.cmake)
include(${GPA_CMAKE_MODULES_DIR}/build_flags.cmake)

include(CTest)
enable_testing()

if(UNIX)
set(skipopencl ON)
endif()
Expand Down Expand Up @@ -51,8 +54,10 @@ if(WIN32)
message(STATUS "Skipping DX12 from the build")
endif()

add_subdirectory(${GPA_SRC_PUBLIC_COUNTER_COMPILER} ${CMAKE_BINARY_DIR}/${GPA_SRC_PUBLIC_COUNTER_COMPILER_REL_PATH})
add_subdirectory(${GPA_SRC_PUBLIC_COUNTER_INPUT_FILES} ${CMAKE_BINARY_DIR}/${GPA_SRC_PUBLIC_COUNTER_INPUT_FILES_REL_PATH})
if(CMAKE_GENERATOR MATCHES "Visual Studio")
add_subdirectory(${GPA_SRC_PUBLIC_COUNTER_COMPILER} ${CMAKE_BINARY_DIR}/${GPA_SRC_PUBLIC_COUNTER_COMPILER_REL_PATH})
add_subdirectory(${GPA_SRC_PUBLIC_COUNTER_INPUT_FILES} ${CMAKE_BINARY_DIR}/${GPA_SRC_PUBLIC_COUNTER_INPUT_FILES_REL_PATH})
endif()
endif()

if(NOT ${skipopengl})
Expand Down
2 changes: 1 addition & 1 deletion build/cmake_modules/utils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ macro(ADD_GPA_USER_COMPILE_DEFINITIONS)
set_property(TARGET ${GPA_PROJECT_NAME} PROPERTY COMPILE_DEFINITIONS $<$<CONFIG:DEBUG>:USE_DEBUG_GPA> ${ADDITIONAL_INTERNAL_DEFINITION})
endmacro()

if(WIN32)
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(EXCLUDE_FROM_BUILD EXCLUDE_FROM_DEFAULT_BUILD)
else()
set(EXCLUDE_FROM_BUILD EXCLUDE_FROM_ALL)
Expand Down
Loading

0 comments on commit eb82bc7

Please sign in to comment.