Updated rocprofiler.h for v2 (#18)

* Update and rename rocprofiler.h to rocprofiler.h.in

- Removing Service IDs
- Fixing agent_id to be agent

* [0/N] New rocprofiler headers

- created rocprofiler/defines.h
  - ppdef macros
- created rocprofiler/hip.h
  - HIP specific types
- created rocprofiler/hsa.h
  - HSA specific types
- created rocprofiler/marker.h
  - Marker (ROCTx) specific types
- create version.h.in
  - file containing version info
- updated source/lib/rocprofiler/CMakeLists.txt
  - set DEFINE_SYMBOL
  - compile defs provided by rocprofiler::rocprofiler-headers

* [1/N] Update rocprofiler.h

- pragma once
- removed some ppdefs (in version.h.in and defines.h)
- extern "C" after includes
- added *_NONE and *_LAST enum values to all enums
- provided some rocprofiler_status_t enums
- tweaked rocprofiler_agent_type_t enum fields
- tweaked rocprofiler_agent_info_t enum fields
- provided rocprofiler_tracer_activity_domain_t
- added missing rocprofiler_counter_instance_id_t typedef
  - may not be correct
- provided rocprofiler_record_header_t struct
- provided rocprofiler_record_tracer_t struct
- add ROCPROFILER_NONNULL attribute where appropriate
- CMakeLists.txt: add subdirectories for hsa, hip, and marker
- defines.h: remove ROCPROFILER_CALL ppdef
- rocprofiler.h
  - ROCPROFILER_STATUS_ERROR_NOT_IMPLEMENTED
  - extend rocprofiler_agent_t
  - modify rocprofiler_query_available_agents signature to callback
  - rocprofiler_pc_sampling_config_array_t
  - update rocprofiler_buffer_callback_t to include context id
  - update rocprofiler_create_buffer to accept context
- rocprofiler_plugin.h
  - non-const rocprofiler_record_header_t**

* [2/N] Update include/rocprofiler/rocprofiler_plugin.h

- change prototype of rocprofiler_plugin_write_buffer_records to resemble rocprofiler_buffer_callback_t

* [3/N] Update include/rocprofiler/hsa

- Update hsa.h
- Details in hsa subfolder

* [4/N] Update include/rocprofiler/hip

- Update hip.h
- Details in hip subfolder

* [5/N] Update include/rocprofiler/marker

- Update marker.h
- Details in marker subfolder

* [6/N] Update samples/pc_sampling

- fix issues with macros
- fix API changes

---------

Co-authored-by: Jonathan Madsen <jrmadsen@users.noreply.github.com>

[ROCm/rocprofiler-sdk commit: 39b209c2a7]
Tento commit je obsažen v:
Ammar ELWazir
2023-08-24 15:39:56 -07:00
odevzdal GitHub
rodič 2e0ede4761
revize cafeaadb8c
24 změnil soubory, kde provedl 5988 přidání a 2118 odebrání
+11 -2
Zobrazit soubor
@@ -3,6 +3,15 @@
# Installation of public headers
#
#
set(ROCPROFILER_INCLUDE_FILES config.h rocprofiler.h rocprofiler_plugin.h)
install(FILES ${ROCPROFILER_INCLUDE_FILES}
configure_file(${CMAKE_CURRENT_LIST_DIR}/version.h.in
${CMAKE_CURRENT_BINARY_DIR}/version.h @ONLY)
set(ROCPROFILER_HEADER_FILES config.h defines.h hip.h hsa.h marker.h rocprofiler.h
rocprofiler_plugin.h ${CMAKE_CURRENT_BINARY_DIR}/version.h)
install(FILES ${ROCPROFILER_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler)
add_subdirectory(hip)
add_subdirectory(hsa)
add_subdirectory(marker)
+97
Zobrazit soubor
@@ -0,0 +1,97 @@
// MIT License
//
// Copyright (c) 2023 ROCm Developer Tools
//
// 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:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// 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.
#pragma once
#if !defined(ROCPROFILER_ATTRIBUTE)
# if defined(_MSC_VER)
# define ROCPROFILER_ATTRIBUTE(...) __declspec(__VA_ARGS__)
# else
# define ROCPROFILER_ATTRIBUTE(...) __attribute__((__VA_ARGS__))
# endif
#endif
#if !defined(ROCPROFILER_PUBLIC_API)
# if defined(_MSC_VER)
# define ROCPROFILER_PUBLIC_API ROCPROFILER_ATTRIBUTE(dllexport)
# else
# define ROCPROFILER_PUBLIC_API ROCPROFILER_ATTRIBUTE(visibility("default"))
# endif
#endif
#if !defined(ROCPROFILER_HIDDEN_API)
# if defined(_MSC_VER)
# define ROCPROFILER_HIDDEN_API
# else
# define ROCPROFILER_HIDDEN_API ROCPROFILER_ATTRIBUTE(visibility("hidden"))
# endif
#endif
#if !defined(ROCPROFILER_EXPORT_DECORATOR)
# define ROCPROFILER_EXPORT_DECORATOR ROCPROFILER_PUBLIC_API
#endif
#if !defined(ROCPROFILER_IMPORT_DECORATOR)
# if defined(_MSC_VER)
# define ROCPROFILER_IMPORT_DECORATOR ROCPROFILER_ATTRIBUTE(dllimport)
# else
# define ROCPROFILER_IMPORT_DECORATOR
# endif
#endif
#define ROCPROFILER_EXPORT ROCPROFILER_EXPORT_DECORATOR
#define ROCPROFILER_IMPORT ROCPROFILER_IMPORT_DECORATOR
#if !defined(ROCPROFILER_API)
# if defined(rocprofiler_EXPORTS)
# define ROCPROFILER_API ROCPROFILER_EXPORT
# else
# define ROCPROFILER_API ROCPROFILER_IMPORT
# endif
#endif
#if defined(__has_attribute)
# if __has_attribute(nonnull)
# define ROCPROFILER_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
# else
# define ROCPROFILER_NONNULL(...)
# endif
#else
# if defined(__GNUC__)
# define ROCPROFILER_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
# else
# define ROCPROFILER_NONNULL(...)
# endif
#endif
#if __cplusplus >= 201103L // C++11
/* c++11 allows extended initializer lists. */
# define ROCPROFILER_HANDLE_LITERAL(type, value) (type{value})
#elif __STDC_VERSION__ >= 199901L
/* c99 allows compound literals. */
# define ROCPROFILER_HANDLE_LITERAL(type, value) ((type){value})
#else
# define ROCPROFILER_HANDLE_LITERAL(type, value) \
{ \
value \
}
#endif
+51
Zobrazit soubor
@@ -0,0 +1,51 @@
// MIT License
//
// Copyright (c) 2023 ROCm Developer Tools
//
// 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:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// 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.
#pragma once
#include <rocprofiler/hip/api_id.h>
#include <rocprofiler/hip/api_args.h>
#include <stdint.h>
typedef uint32_t rocprofiler_trace_record_hip_operation_kind_t;
typedef struct rocprofiler_hip_trace_data_s rocprofiler_hip_trace_data_t;
typedef struct rocprofiler_hip_api_data_s rocprofiler_hip_api_data_t;
struct rocprofiler_hip_api_data_s
{
uint64_t correlation_id;
uint32_t phase;
rocprofiler_hip_api_args_t args;
uint64_t* phase_data;
};
struct rocprofiler_hip_trace_data_s
{
rocprofiler_hip_api_data_t api_data;
uint64_t phase_enter_timestamp;
uint64_t phase_exit_timestamp;
uint64_t phase_data;
void (*phase_enter)(rocprofiler_hip_api_id_t operation_id, rocprofiler_hip_trace_data_t* data);
void (*phase_exit)(rocprofiler_hip_api_id_t operation_id, rocprofiler_hip_trace_data_t* data);
};
@@ -0,0 +1,9 @@
#
#
# Installation of public HIP headers
#
#
set(ROCPROFILER_HIP_HEADER_FILES api_args.h api_id.h)
install(FILES ${ROCPROFILER_HIP_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler/hip)
Rozdílový obsah nebyl zobrazen, protože je příliš veliký Načíst rozdílové porovnání
+432
Zobrazit soubor
@@ -0,0 +1,432 @@
// Copyright (c) 2018-2023 Advanced Micro Devices, Inc.
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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.
#pragma once
// NOLINTNEXTLINE(performance-enum-size)
typedef enum
{
ROCPROFILER_HIP_API_ID_NONE = -1,
ROCPROFILER_HIP_API_ID___hipPopCallConfiguration = 0,
ROCPROFILER_HIP_API_ID___hipPushCallConfiguration,
ROCPROFILER_HIP_API_ID_hipArray3DCreate,
ROCPROFILER_HIP_API_ID_hipArrayCreate,
ROCPROFILER_HIP_API_ID_hipArrayDestroy,
ROCPROFILER_HIP_API_ID_hipChooseDevice,
ROCPROFILER_HIP_API_ID_hipConfigureCall,
ROCPROFILER_HIP_API_ID_hipCtxCreate,
ROCPROFILER_HIP_API_ID_hipCtxDestroy,
ROCPROFILER_HIP_API_ID_hipCtxDisablePeerAccess,
ROCPROFILER_HIP_API_ID_hipCtxEnablePeerAccess,
ROCPROFILER_HIP_API_ID_hipCtxGetApiVersion,
ROCPROFILER_HIP_API_ID_hipCtxGetCacheConfig,
ROCPROFILER_HIP_API_ID_hipCtxGetCurrent,
ROCPROFILER_HIP_API_ID_hipCtxGetDevice,
ROCPROFILER_HIP_API_ID_hipCtxGetFlags,
ROCPROFILER_HIP_API_ID_hipCtxGetSharedMemConfig,
ROCPROFILER_HIP_API_ID_hipCtxPopCurrent,
ROCPROFILER_HIP_API_ID_hipCtxPushCurrent,
ROCPROFILER_HIP_API_ID_hipCtxSetCacheConfig,
ROCPROFILER_HIP_API_ID_hipCtxSetCurrent,
ROCPROFILER_HIP_API_ID_hipCtxSetSharedMemConfig,
ROCPROFILER_HIP_API_ID_hipCtxSynchronize,
ROCPROFILER_HIP_API_ID_hipDestroyExternalMemory,
ROCPROFILER_HIP_API_ID_hipDestroyExternalSemaphore,
ROCPROFILER_HIP_API_ID_hipDeviceCanAccessPeer,
ROCPROFILER_HIP_API_ID_hipDeviceComputeCapability,
ROCPROFILER_HIP_API_ID_hipDeviceDisablePeerAccess,
ROCPROFILER_HIP_API_ID_hipDeviceEnablePeerAccess,
ROCPROFILER_HIP_API_ID_hipDeviceGet,
ROCPROFILER_HIP_API_ID_hipDeviceGetAttribute,
ROCPROFILER_HIP_API_ID_hipDeviceGetByPCIBusId,
ROCPROFILER_HIP_API_ID_hipDeviceGetCacheConfig,
ROCPROFILER_HIP_API_ID_hipDeviceGetLimit,
ROCPROFILER_HIP_API_ID_hipDeviceGetName,
ROCPROFILER_HIP_API_ID_hipDeviceGetP2PAttribute,
ROCPROFILER_HIP_API_ID_hipDeviceGetPCIBusId,
ROCPROFILER_HIP_API_ID_hipDeviceGetSharedMemConfig,
ROCPROFILER_HIP_API_ID_hipDeviceGetStreamPriorityRange,
ROCPROFILER_HIP_API_ID_hipDevicePrimaryCtxGetState,
ROCPROFILER_HIP_API_ID_hipDevicePrimaryCtxRelease,
ROCPROFILER_HIP_API_ID_hipDevicePrimaryCtxReset,
ROCPROFILER_HIP_API_ID_hipDevicePrimaryCtxRetain,
ROCPROFILER_HIP_API_ID_hipDevicePrimaryCtxSetFlags,
ROCPROFILER_HIP_API_ID_hipDeviceReset,
ROCPROFILER_HIP_API_ID_hipDeviceSetCacheConfig,
ROCPROFILER_HIP_API_ID_hipDeviceSetSharedMemConfig,
ROCPROFILER_HIP_API_ID_hipDeviceSynchronize,
ROCPROFILER_HIP_API_ID_hipDeviceTotalMem,
ROCPROFILER_HIP_API_ID_RESERVED_50,
ROCPROFILER_HIP_API_ID_hipDrvMemcpy2DUnaligned,
ROCPROFILER_HIP_API_ID_hipDrvMemcpy3D,
ROCPROFILER_HIP_API_ID_hipDrvMemcpy3DAsync,
ROCPROFILER_HIP_API_ID_hipEventCreate,
ROCPROFILER_HIP_API_ID_hipEventCreateWithFlags,
ROCPROFILER_HIP_API_ID_hipEventDestroy,
ROCPROFILER_HIP_API_ID_hipEventElapsedTime,
ROCPROFILER_HIP_API_ID_hipEventQuery,
ROCPROFILER_HIP_API_ID_hipEventRecord,
ROCPROFILER_HIP_API_ID_hipEventSynchronize,
ROCPROFILER_HIP_API_ID_hipExtGetLinkTypeAndHopCount,
ROCPROFILER_HIP_API_ID_hipExtLaunchKernel,
ROCPROFILER_HIP_API_ID_hipExtLaunchMultiKernelMultiDevice,
ROCPROFILER_HIP_API_ID_hipExtMallocWithFlags,
ROCPROFILER_HIP_API_ID_hipExtModuleLaunchKernel,
ROCPROFILER_HIP_API_ID_hipExtStreamCreateWithCUMask,
ROCPROFILER_HIP_API_ID_hipExtStreamGetCUMask,
ROCPROFILER_HIP_API_ID_hipExternalMemoryGetMappedBuffer,
ROCPROFILER_HIP_API_ID_hipFree,
ROCPROFILER_HIP_API_ID_hipFreeArray,
ROCPROFILER_HIP_API_ID_hipFreeHost,
ROCPROFILER_HIP_API_ID_hipFreeMipmappedArray,
ROCPROFILER_HIP_API_ID_hipFuncGetAttribute,
ROCPROFILER_HIP_API_ID_hipFuncGetAttributes,
ROCPROFILER_HIP_API_ID_hipFuncSetAttribute,
ROCPROFILER_HIP_API_ID_hipFuncSetCacheConfig,
ROCPROFILER_HIP_API_ID_hipFuncSetSharedMemConfig,
ROCPROFILER_HIP_API_ID_hipGetDevice,
ROCPROFILER_HIP_API_ID_hipGetDeviceCount,
ROCPROFILER_HIP_API_ID_hipGetDeviceFlags,
ROCPROFILER_HIP_API_ID_hipGetDeviceProperties,
ROCPROFILER_HIP_API_ID_RESERVED_82,
ROCPROFILER_HIP_API_ID_hipGetErrorString,
ROCPROFILER_HIP_API_ID_hipGetLastError,
ROCPROFILER_HIP_API_ID_hipGetMipmappedArrayLevel,
ROCPROFILER_HIP_API_ID_hipGetSymbolAddress,
ROCPROFILER_HIP_API_ID_hipGetSymbolSize,
ROCPROFILER_HIP_API_ID_hipHccModuleLaunchKernel,
ROCPROFILER_HIP_API_ID_hipHostAlloc,
ROCPROFILER_HIP_API_ID_hipHostFree,
ROCPROFILER_HIP_API_ID_hipHostGetDevicePointer,
ROCPROFILER_HIP_API_ID_hipHostGetFlags,
ROCPROFILER_HIP_API_ID_hipHostMalloc,
ROCPROFILER_HIP_API_ID_hipHostRegister,
ROCPROFILER_HIP_API_ID_hipHostUnregister,
ROCPROFILER_HIP_API_ID_hipImportExternalMemory,
ROCPROFILER_HIP_API_ID_hipImportExternalSemaphore,
ROCPROFILER_HIP_API_ID_hipInit,
ROCPROFILER_HIP_API_ID_hipIpcCloseMemHandle,
ROCPROFILER_HIP_API_ID_hipIpcGetEventHandle,
ROCPROFILER_HIP_API_ID_hipIpcGetMemHandle,
ROCPROFILER_HIP_API_ID_hipIpcOpenEventHandle,
ROCPROFILER_HIP_API_ID_hipIpcOpenMemHandle,
ROCPROFILER_HIP_API_ID_hipLaunchByPtr,
ROCPROFILER_HIP_API_ID_hipLaunchCooperativeKernel,
ROCPROFILER_HIP_API_ID_hipLaunchCooperativeKernelMultiDevice,
ROCPROFILER_HIP_API_ID_hipLaunchKernel,
ROCPROFILER_HIP_API_ID_hipMalloc,
ROCPROFILER_HIP_API_ID_hipMalloc3D,
ROCPROFILER_HIP_API_ID_hipMalloc3DArray,
ROCPROFILER_HIP_API_ID_hipMallocArray,
ROCPROFILER_HIP_API_ID_hipMallocHost,
ROCPROFILER_HIP_API_ID_hipMallocManaged,
ROCPROFILER_HIP_API_ID_hipMallocMipmappedArray,
ROCPROFILER_HIP_API_ID_hipMallocPitch,
ROCPROFILER_HIP_API_ID_hipMemAdvise,
ROCPROFILER_HIP_API_ID_hipMemAllocHost,
ROCPROFILER_HIP_API_ID_hipMemAllocPitch,
ROCPROFILER_HIP_API_ID_hipMemGetAddressRange,
ROCPROFILER_HIP_API_ID_hipMemGetInfo,
ROCPROFILER_HIP_API_ID_hipMemPrefetchAsync,
ROCPROFILER_HIP_API_ID_hipMemPtrGetInfo,
ROCPROFILER_HIP_API_ID_hipMemRangeGetAttribute,
ROCPROFILER_HIP_API_ID_hipMemRangeGetAttributes,
ROCPROFILER_HIP_API_ID_hipMemcpy,
ROCPROFILER_HIP_API_ID_hipMemcpy2D,
ROCPROFILER_HIP_API_ID_hipMemcpy2DAsync,
ROCPROFILER_HIP_API_ID_hipMemcpy2DFromArray,
ROCPROFILER_HIP_API_ID_hipMemcpy2DFromArrayAsync,
ROCPROFILER_HIP_API_ID_hipMemcpy2DToArray,
ROCPROFILER_HIP_API_ID_hipMemcpy2DToArrayAsync,
ROCPROFILER_HIP_API_ID_hipMemcpy3D,
ROCPROFILER_HIP_API_ID_hipMemcpy3DAsync,
ROCPROFILER_HIP_API_ID_hipMemcpyAsync,
ROCPROFILER_HIP_API_ID_hipMemcpyAtoH,
ROCPROFILER_HIP_API_ID_hipMemcpyDtoD,
ROCPROFILER_HIP_API_ID_hipMemcpyDtoDAsync,
ROCPROFILER_HIP_API_ID_hipMemcpyDtoH,
ROCPROFILER_HIP_API_ID_hipMemcpyDtoHAsync,
ROCPROFILER_HIP_API_ID_hipMemcpyFromArray,
ROCPROFILER_HIP_API_ID_hipMemcpyFromSymbol,
ROCPROFILER_HIP_API_ID_hipMemcpyFromSymbolAsync,
ROCPROFILER_HIP_API_ID_hipMemcpyHtoA,
ROCPROFILER_HIP_API_ID_hipMemcpyHtoD,
ROCPROFILER_HIP_API_ID_hipMemcpyHtoDAsync,
ROCPROFILER_HIP_API_ID_hipMemcpyParam2D,
ROCPROFILER_HIP_API_ID_hipMemcpyParam2DAsync,
ROCPROFILER_HIP_API_ID_hipMemcpyPeer,
ROCPROFILER_HIP_API_ID_hipMemcpyPeerAsync,
ROCPROFILER_HIP_API_ID_hipMemcpyToArray,
ROCPROFILER_HIP_API_ID_hipMemcpyToSymbol,
ROCPROFILER_HIP_API_ID_hipMemcpyToSymbolAsync,
ROCPROFILER_HIP_API_ID_hipMemcpyWithStream,
ROCPROFILER_HIP_API_ID_hipMemset,
ROCPROFILER_HIP_API_ID_hipMemset2D,
ROCPROFILER_HIP_API_ID_hipMemset2DAsync,
ROCPROFILER_HIP_API_ID_hipMemset3D,
ROCPROFILER_HIP_API_ID_hipMemset3DAsync,
ROCPROFILER_HIP_API_ID_hipMemsetAsync,
ROCPROFILER_HIP_API_ID_hipMemsetD16,
ROCPROFILER_HIP_API_ID_hipMemsetD16Async,
ROCPROFILER_HIP_API_ID_hipMemsetD32,
ROCPROFILER_HIP_API_ID_hipMemsetD32Async,
ROCPROFILER_HIP_API_ID_hipMemsetD8,
ROCPROFILER_HIP_API_ID_hipMemsetD8Async,
ROCPROFILER_HIP_API_ID_hipModuleGetFunction,
ROCPROFILER_HIP_API_ID_hipModuleGetGlobal,
ROCPROFILER_HIP_API_ID_hipModuleGetTexRef,
ROCPROFILER_HIP_API_ID_hipModuleLaunchKernel,
ROCPROFILER_HIP_API_ID_hipModuleLoad,
ROCPROFILER_HIP_API_ID_hipModuleLoadData,
ROCPROFILER_HIP_API_ID_hipModuleLoadDataEx,
ROCPROFILER_HIP_API_ID_hipModuleOccupancyMaxActiveBlocksPerMultiprocessor,
ROCPROFILER_HIP_API_ID_hipModuleOccupancyMaxActiveBlocksPerMultiprocessorWithFlags,
ROCPROFILER_HIP_API_ID_hipModuleOccupancyMaxPotentialBlockSize,
ROCPROFILER_HIP_API_ID_hipModuleOccupancyMaxPotentialBlockSizeWithFlags,
ROCPROFILER_HIP_API_ID_hipModuleUnload,
ROCPROFILER_HIP_API_ID_hipOccupancyMaxActiveBlocksPerMultiprocessor,
ROCPROFILER_HIP_API_ID_hipOccupancyMaxActiveBlocksPerMultiprocessorWithFlags,
ROCPROFILER_HIP_API_ID_hipOccupancyMaxPotentialBlockSize,
ROCPROFILER_HIP_API_ID_hipPeekAtLastError,
ROCPROFILER_HIP_API_ID_hipPointerGetAttributes,
ROCPROFILER_HIP_API_ID_hipProfilerStart,
ROCPROFILER_HIP_API_ID_hipProfilerStop,
ROCPROFILER_HIP_API_ID_RESERVED_185,
ROCPROFILER_HIP_API_ID_hipSetDevice,
ROCPROFILER_HIP_API_ID_hipSetDeviceFlags,
ROCPROFILER_HIP_API_ID_hipSetupArgument,
ROCPROFILER_HIP_API_ID_hipSignalExternalSemaphoresAsync,
ROCPROFILER_HIP_API_ID_hipStreamAddCallback,
ROCPROFILER_HIP_API_ID_hipStreamAttachMemAsync,
ROCPROFILER_HIP_API_ID_hipStreamCreate,
ROCPROFILER_HIP_API_ID_hipStreamCreateWithFlags,
ROCPROFILER_HIP_API_ID_hipStreamCreateWithPriority,
ROCPROFILER_HIP_API_ID_hipStreamDestroy,
ROCPROFILER_HIP_API_ID_hipStreamGetFlags,
ROCPROFILER_HIP_API_ID_hipStreamGetPriority,
ROCPROFILER_HIP_API_ID_hipStreamQuery,
ROCPROFILER_HIP_API_ID_hipStreamSynchronize,
ROCPROFILER_HIP_API_ID_hipStreamWaitEvent,
ROCPROFILER_HIP_API_ID_hipStreamWaitValue32,
ROCPROFILER_HIP_API_ID_hipStreamWaitValue64,
ROCPROFILER_HIP_API_ID_hipStreamWriteValue32,
ROCPROFILER_HIP_API_ID_hipStreamWriteValue64,
ROCPROFILER_HIP_API_ID_hipWaitExternalSemaphoresAsync,
ROCPROFILER_HIP_API_ID_hipCreateSurfaceObject,
ROCPROFILER_HIP_API_ID_hipDestroySurfaceObject,
ROCPROFILER_HIP_API_ID_hipGraphAddKernelNode,
ROCPROFILER_HIP_API_ID_hipGraphAddMemcpyNode,
ROCPROFILER_HIP_API_ID_hipGraphAddMemsetNode,
ROCPROFILER_HIP_API_ID_hipGraphCreate,
ROCPROFILER_HIP_API_ID_hipGraphDestroy,
ROCPROFILER_HIP_API_ID_hipGraphExecDestroy,
ROCPROFILER_HIP_API_ID_hipGraphInstantiate,
ROCPROFILER_HIP_API_ID_hipGraphLaunch,
ROCPROFILER_HIP_API_ID_hipMipmappedArrayCreate,
ROCPROFILER_HIP_API_ID_hipMipmappedArrayDestroy,
ROCPROFILER_HIP_API_ID_hipMipmappedArrayGetLevel,
ROCPROFILER_HIP_API_ID_hipStreamBeginCapture,
ROCPROFILER_HIP_API_ID_hipStreamEndCapture,
ROCPROFILER_HIP_API_ID_hipTexRefGetAddress,
ROCPROFILER_HIP_API_ID_hipTexRefGetFlags,
ROCPROFILER_HIP_API_ID_hipTexRefGetFormat,
ROCPROFILER_HIP_API_ID_hipTexRefGetMaxAnisotropy,
ROCPROFILER_HIP_API_ID_hipTexRefGetMipMappedArray,
ROCPROFILER_HIP_API_ID_hipTexRefGetMipmapLevelBias,
ROCPROFILER_HIP_API_ID_hipTexRefGetMipmapLevelClamp,
ROCPROFILER_HIP_API_ID_hipTexRefSetAddress,
ROCPROFILER_HIP_API_ID_hipTexRefSetAddress2D,
ROCPROFILER_HIP_API_ID_hipTexRefSetBorderColor,
ROCPROFILER_HIP_API_ID_hipTexRefSetFormat,
ROCPROFILER_HIP_API_ID_hipTexRefSetMaxAnisotropy,
ROCPROFILER_HIP_API_ID_hipTexRefSetMipmapLevelClamp,
ROCPROFILER_HIP_API_ID_hipTexRefSetMipmappedArray,
ROCPROFILER_HIP_API_ID_hipGLGetDevices,
ROCPROFILER_HIP_API_ID_hipGraphAddDependencies,
ROCPROFILER_HIP_API_ID_hipGraphAddEmptyNode,
ROCPROFILER_HIP_API_ID_hipGraphExecKernelNodeSetParams,
ROCPROFILER_HIP_API_ID_hipGraphGetNodes,
ROCPROFILER_HIP_API_ID_hipGraphGetRootNodes,
ROCPROFILER_HIP_API_ID_hipGraphKernelNodeGetParams,
ROCPROFILER_HIP_API_ID_hipGraphKernelNodeSetParams,
ROCPROFILER_HIP_API_ID_hipGraphMemcpyNodeGetParams,
ROCPROFILER_HIP_API_ID_hipGraphMemcpyNodeSetParams,
ROCPROFILER_HIP_API_ID_hipGraphMemsetNodeGetParams,
ROCPROFILER_HIP_API_ID_hipGraphMemsetNodeSetParams,
ROCPROFILER_HIP_API_ID_hipGraphicsGLRegisterBuffer,
ROCPROFILER_HIP_API_ID_hipGraphicsMapResources,
ROCPROFILER_HIP_API_ID_hipGraphicsResourceGetMappedPointer,
ROCPROFILER_HIP_API_ID_hipGraphicsUnmapResources,
ROCPROFILER_HIP_API_ID_hipGraphicsUnregisterResource,
ROCPROFILER_HIP_API_ID_hipGraphAddChildGraphNode,
ROCPROFILER_HIP_API_ID_hipGraphAddEventRecordNode,
ROCPROFILER_HIP_API_ID_hipGraphAddEventWaitNode,
ROCPROFILER_HIP_API_ID_hipGraphAddHostNode,
ROCPROFILER_HIP_API_ID_hipGraphAddMemcpyNode1D,
ROCPROFILER_HIP_API_ID_hipGraphAddMemcpyNodeFromSymbol,
ROCPROFILER_HIP_API_ID_hipGraphAddMemcpyNodeToSymbol,
ROCPROFILER_HIP_API_ID_hipGraphChildGraphNodeGetGraph,
ROCPROFILER_HIP_API_ID_hipGraphClone,
ROCPROFILER_HIP_API_ID_hipGraphDestroyNode,
ROCPROFILER_HIP_API_ID_hipGraphEventRecordNodeGetEvent,
ROCPROFILER_HIP_API_ID_hipGraphEventRecordNodeSetEvent,
ROCPROFILER_HIP_API_ID_hipGraphEventWaitNodeGetEvent,
ROCPROFILER_HIP_API_ID_hipGraphEventWaitNodeSetEvent,
ROCPROFILER_HIP_API_ID_hipGraphExecChildGraphNodeSetParams,
ROCPROFILER_HIP_API_ID_hipGraphExecEventRecordNodeSetEvent,
ROCPROFILER_HIP_API_ID_hipGraphExecEventWaitNodeSetEvent,
ROCPROFILER_HIP_API_ID_hipGraphExecHostNodeSetParams,
ROCPROFILER_HIP_API_ID_hipGraphExecMemcpyNodeSetParams,
ROCPROFILER_HIP_API_ID_hipGraphExecMemcpyNodeSetParams1D,
ROCPROFILER_HIP_API_ID_hipGraphExecMemcpyNodeSetParamsFromSymbol,
ROCPROFILER_HIP_API_ID_hipGraphExecMemcpyNodeSetParamsToSymbol,
ROCPROFILER_HIP_API_ID_hipGraphExecMemsetNodeSetParams,
ROCPROFILER_HIP_API_ID_hipGraphExecUpdate,
ROCPROFILER_HIP_API_ID_hipGraphGetEdges,
ROCPROFILER_HIP_API_ID_hipGraphHostNodeGetParams,
ROCPROFILER_HIP_API_ID_hipGraphHostNodeSetParams,
ROCPROFILER_HIP_API_ID_hipGraphInstantiateWithFlags,
ROCPROFILER_HIP_API_ID_hipGraphMemcpyNodeSetParams1D,
ROCPROFILER_HIP_API_ID_hipGraphMemcpyNodeSetParamsFromSymbol,
ROCPROFILER_HIP_API_ID_hipGraphMemcpyNodeSetParamsToSymbol,
ROCPROFILER_HIP_API_ID_hipGraphNodeFindInClone,
ROCPROFILER_HIP_API_ID_hipGraphNodeGetDependencies,
ROCPROFILER_HIP_API_ID_hipGraphNodeGetDependentNodes,
ROCPROFILER_HIP_API_ID_hipGraphNodeGetType,
ROCPROFILER_HIP_API_ID_hipGraphRemoveDependencies,
ROCPROFILER_HIP_API_ID_hipStreamGetCaptureInfo,
ROCPROFILER_HIP_API_ID_hipStreamGetCaptureInfo_v2,
ROCPROFILER_HIP_API_ID_hipStreamIsCapturing,
ROCPROFILER_HIP_API_ID_hipStreamUpdateCaptureDependencies,
ROCPROFILER_HIP_API_ID_hipDrvPointerGetAttributes,
ROCPROFILER_HIP_API_ID_hipGraphicsGLRegisterImage,
ROCPROFILER_HIP_API_ID_hipGraphicsSubResourceGetMappedArray,
ROCPROFILER_HIP_API_ID_hipPointerGetAttribute,
ROCPROFILER_HIP_API_ID_RESERVED_296,
ROCPROFILER_HIP_API_ID_hipThreadExchangeStreamCaptureMode,
ROCPROFILER_HIP_API_ID_hipDeviceGetUuid,
ROCPROFILER_HIP_API_ID_hipGetChannelDesc,
ROCPROFILER_HIP_API_ID_hipGraphKernelNodeGetAttribute,
ROCPROFILER_HIP_API_ID_hipGraphKernelNodeSetAttribute,
ROCPROFILER_HIP_API_ID_hipLaunchHostFunc,
ROCPROFILER_HIP_API_ID_hipDeviceGetDefaultMemPool,
ROCPROFILER_HIP_API_ID_hipDeviceGetMemPool,
ROCPROFILER_HIP_API_ID_hipDeviceSetMemPool,
ROCPROFILER_HIP_API_ID_hipFreeAsync,
ROCPROFILER_HIP_API_ID_hipMallocAsync,
ROCPROFILER_HIP_API_ID_hipMallocFromPoolAsync,
ROCPROFILER_HIP_API_ID_hipMemPoolCreate,
ROCPROFILER_HIP_API_ID_hipMemPoolDestroy,
ROCPROFILER_HIP_API_ID_hipMemPoolExportPointer,
ROCPROFILER_HIP_API_ID_hipMemPoolExportToShareableHandle,
ROCPROFILER_HIP_API_ID_hipMemPoolGetAccess,
ROCPROFILER_HIP_API_ID_hipMemPoolGetAttribute,
ROCPROFILER_HIP_API_ID_hipMemPoolImportFromShareableHandle,
ROCPROFILER_HIP_API_ID_hipMemPoolImportPointer,
ROCPROFILER_HIP_API_ID_hipMemPoolSetAccess,
ROCPROFILER_HIP_API_ID_hipMemPoolSetAttribute,
ROCPROFILER_HIP_API_ID_hipMemPoolTrimTo,
ROCPROFILER_HIP_API_ID_hipMemAddressFree,
ROCPROFILER_HIP_API_ID_hipMemAddressReserve,
ROCPROFILER_HIP_API_ID_hipMemCreate,
ROCPROFILER_HIP_API_ID_hipMemExportToShareableHandle,
ROCPROFILER_HIP_API_ID_hipMemGetAccess,
ROCPROFILER_HIP_API_ID_hipMemGetAllocationGranularity,
ROCPROFILER_HIP_API_ID_hipMemGetAllocationPropertiesFromHandle,
ROCPROFILER_HIP_API_ID_hipMemImportFromShareableHandle,
ROCPROFILER_HIP_API_ID_hipMemMap,
ROCPROFILER_HIP_API_ID_hipMemMapArrayAsync,
ROCPROFILER_HIP_API_ID_hipMemRelease,
ROCPROFILER_HIP_API_ID_hipMemRetainAllocationHandle,
ROCPROFILER_HIP_API_ID_hipMemSetAccess,
ROCPROFILER_HIP_API_ID_hipMemUnmap,
ROCPROFILER_HIP_API_ID_hipDeviceSetGraphMemAttribute,
ROCPROFILER_HIP_API_ID_hipDeviceGetGraphMemAttribute,
ROCPROFILER_HIP_API_ID_hipDeviceGraphMemTrim,
ROCPROFILER_HIP_API_ID_hipDeviceSetLimit,
ROCPROFILER_HIP_API_ID_hipTexRefSetArray,
ROCPROFILER_HIP_API_ID_hipTexRefSetFlags,
ROCPROFILER_HIP_API_ID_hipTexRefSetMipmapLevelBias,
ROCPROFILER_HIP_API_ID_hipDriverGetVersion,
ROCPROFILER_HIP_API_ID_hipGraphUpload,
ROCPROFILER_HIP_API_ID_hipRuntimeGetVersion,
ROCPROFILER_HIP_API_ID_hipUserObjectCreate,
ROCPROFILER_HIP_API_ID_hipUserObjectRelease,
ROCPROFILER_HIP_API_ID_hipUserObjectRetain,
ROCPROFILER_HIP_API_ID_hipGraphRetainUserObject,
ROCPROFILER_HIP_API_ID_hipGraphReleaseUserObject,
ROCPROFILER_HIP_API_ID_hipGraphDebugDotPrint,
ROCPROFILER_HIP_API_ID_hipGraphKernelNodeCopyAttributes,
ROCPROFILER_HIP_API_ID_hipGraphNodeGetEnabled,
ROCPROFILER_HIP_API_ID_hipGraphNodeSetEnabled,
ROCPROFILER_HIP_API_ID_hipPointerSetAttribute,
ROCPROFILER_HIP_API_ID_hipGraphAddMemAllocNode,
ROCPROFILER_HIP_API_ID_hipGraphAddMemFreeNode,
ROCPROFILER_HIP_API_ID_hipGraphMemAllocNodeGetParams,
ROCPROFILER_HIP_API_ID_hipGraphMemFreeNodeGetParams,
ROCPROFILER_HIP_API_ID_hipModuleLaunchCooperativeKernel,
ROCPROFILER_HIP_API_ID_hipModuleLaunchCooperativeKernelMultiDevice,
ROCPROFILER_HIP_API_ID_hipArray3DGetDescriptor,
ROCPROFILER_HIP_API_ID_hipArrayGetDescriptor,
ROCPROFILER_HIP_API_ID_hipArrayGetInfo,
ROCPROFILER_HIP_API_ID_hipStreamGetDevice,
ROCPROFILER_HIP_API_ID_LAST,
//
// Deprecated or removed
//
ROCPROFILER_HIP_API_ID_hipBindTexture = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipBindTexture2D = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipBindTextureToArray = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipBindTextureToMipmappedArray = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipCreateTextureObject = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipDestroyTextureObject = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipDeviceGetCount = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipGetTextureAlignmentOffset = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipGetTextureObjectResourceDesc = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipGetTextureObjectResourceViewDesc = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipGetTextureObjectTextureDesc = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipGetTextureReference = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipMemcpy2DArrayToArray = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipMemcpyArrayToArray = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipMemcpyAtoA = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipMemcpyAtoD = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipMemcpyAtoHAsync = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipMemcpyDtoA = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipMemcpyFromArrayAsync = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipMemcpyHtoAAsync = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipMemcpyToArrayAsync = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipModuleLaunchKernelExt = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipSetValidDevices = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexObjectCreate = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexObjectDestroy = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexObjectGetResourceDesc = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexObjectGetResourceViewDesc = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexObjectGetTextureDesc = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexRefGetAddressMode = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexRefGetArray = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexRefGetBorderColor = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexRefGetFilterMode = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexRefGetMipmapFilterMode = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexRefGetMipmappedArray = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexRefSetAddressMode = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexRefSetFilterMode = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipTexRefSetMipmapFilterMode = ROCPROFILER_HIP_API_ID_NONE,
ROCPROFILER_HIP_API_ID_hipUnbindTexture = ROCPROFILER_HIP_API_ID_NONE,
} rocprofiler_hip_api_id_t;
+62
Zobrazit soubor
@@ -0,0 +1,62 @@
// MIT License
//
// Copyright (c) 2023 ROCm Developer Tools
//
// 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:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// 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.
#pragma once
#include <rocprofiler/hsa/api_id.h>
#include <rocprofiler/hsa/table_api_id.h>
#include <rocprofiler/hsa/api_args.h>
#include <hsa/hsa.h>
#include <stdint.h>
typedef uint32_t rocprofiler_trace_record_hsa_operation_kind_t;
typedef struct hsa_kernel_dispatch_packet_s hsa_kernel_dispatch_packet_t;
typedef struct rocprofiler_hsa_trace_data_s rocprofiler_hsa_trace_data_t;
typedef struct rocprofiler_hsa_api_data_s rocprofiler_hsa_api_data_t;
struct rocprofiler_hsa_api_data_s
{
uint64_t correlation_id;
uint32_t phase;
union
{
uint64_t uint64_t_retval;
uint32_t uint32_t_retval;
hsa_signal_value_t hsa_signal_value_t_retval;
hsa_status_t hsa_status_t_retval;
};
rocprofiler_hsa_api_args_t args;
uint64_t* phase_data;
};
struct rocprofiler_hsa_trace_data_s
{
rocprofiler_hsa_api_data_t api_data;
uint64_t phase_enter_timestamp;
uint64_t phase_exit_timestamp;
uint64_t phase_data;
void (*phase_enter)(rocprofiler_hsa_api_id_t operation_id, rocprofiler_hsa_trace_data_t* data);
void (*phase_exit)(rocprofiler_hsa_api_id_t operation_id, rocprofiler_hsa_trace_data_t* data);
};
@@ -0,0 +1,9 @@
#
#
# Installation of public HSA headers
#
#
set(ROCPROFILER_HSA_HEADER_FILES api_args.h api_id.h table_api_id.h)
install(FILES ${ROCPROFILER_HSA_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler/hsa)
Rozdílový obsah nebyl zobrazen, protože je příliš veliký Načíst rozdílové porovnání
+227
Zobrazit soubor
@@ -0,0 +1,227 @@
// Copyright (c) 2018-2023 Advanced Micro Devices, Inc.
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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.
#pragma once
// NOLINTNEXTLINE(performance-enum-size)
typedef enum
{
ROCPROFILER_HSA_API_ID_NONE = -1,
// block: CoreApi API
ROCPROFILER_HSA_API_ID_hsa_init = 0,
ROCPROFILER_HSA_API_ID_hsa_shut_down,
ROCPROFILER_HSA_API_ID_hsa_system_get_info,
ROCPROFILER_HSA_API_ID_hsa_system_extension_supported,
ROCPROFILER_HSA_API_ID_hsa_system_get_extension_table,
ROCPROFILER_HSA_API_ID_hsa_iterate_agents,
ROCPROFILER_HSA_API_ID_hsa_agent_get_info,
ROCPROFILER_HSA_API_ID_hsa_queue_create,
ROCPROFILER_HSA_API_ID_hsa_soft_queue_create,
ROCPROFILER_HSA_API_ID_hsa_queue_destroy,
ROCPROFILER_HSA_API_ID_hsa_queue_inactivate,
ROCPROFILER_HSA_API_ID_hsa_queue_load_read_index_scacquire,
ROCPROFILER_HSA_API_ID_hsa_queue_load_read_index_relaxed,
ROCPROFILER_HSA_API_ID_hsa_queue_load_write_index_scacquire,
ROCPROFILER_HSA_API_ID_hsa_queue_load_write_index_relaxed,
ROCPROFILER_HSA_API_ID_hsa_queue_store_write_index_relaxed,
ROCPROFILER_HSA_API_ID_hsa_queue_store_write_index_screlease,
ROCPROFILER_HSA_API_ID_hsa_queue_cas_write_index_scacq_screl,
ROCPROFILER_HSA_API_ID_hsa_queue_cas_write_index_scacquire,
ROCPROFILER_HSA_API_ID_hsa_queue_cas_write_index_relaxed,
ROCPROFILER_HSA_API_ID_hsa_queue_cas_write_index_screlease,
ROCPROFILER_HSA_API_ID_hsa_queue_add_write_index_scacq_screl,
ROCPROFILER_HSA_API_ID_hsa_queue_add_write_index_scacquire,
ROCPROFILER_HSA_API_ID_hsa_queue_add_write_index_relaxed,
ROCPROFILER_HSA_API_ID_hsa_queue_add_write_index_screlease,
ROCPROFILER_HSA_API_ID_hsa_queue_store_read_index_relaxed,
ROCPROFILER_HSA_API_ID_hsa_queue_store_read_index_screlease,
ROCPROFILER_HSA_API_ID_hsa_agent_iterate_regions,
ROCPROFILER_HSA_API_ID_hsa_region_get_info,
ROCPROFILER_HSA_API_ID_hsa_agent_get_exception_policies,
ROCPROFILER_HSA_API_ID_hsa_agent_extension_supported,
ROCPROFILER_HSA_API_ID_hsa_memory_register,
ROCPROFILER_HSA_API_ID_hsa_memory_deregister,
ROCPROFILER_HSA_API_ID_hsa_memory_allocate,
ROCPROFILER_HSA_API_ID_hsa_memory_free,
ROCPROFILER_HSA_API_ID_hsa_memory_copy,
ROCPROFILER_HSA_API_ID_hsa_memory_assign_agent,
ROCPROFILER_HSA_API_ID_hsa_signal_create,
ROCPROFILER_HSA_API_ID_hsa_signal_destroy,
ROCPROFILER_HSA_API_ID_hsa_signal_load_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_load_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_store_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_store_screlease,
ROCPROFILER_HSA_API_ID_hsa_signal_wait_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_wait_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_and_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_and_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_and_screlease,
ROCPROFILER_HSA_API_ID_hsa_signal_and_scacq_screl,
ROCPROFILER_HSA_API_ID_hsa_signal_or_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_or_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_or_screlease,
ROCPROFILER_HSA_API_ID_hsa_signal_or_scacq_screl,
ROCPROFILER_HSA_API_ID_hsa_signal_xor_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_xor_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_xor_screlease,
ROCPROFILER_HSA_API_ID_hsa_signal_xor_scacq_screl,
ROCPROFILER_HSA_API_ID_hsa_signal_exchange_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_exchange_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_exchange_screlease,
ROCPROFILER_HSA_API_ID_hsa_signal_exchange_scacq_screl,
ROCPROFILER_HSA_API_ID_hsa_signal_add_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_add_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_add_screlease,
ROCPROFILER_HSA_API_ID_hsa_signal_add_scacq_screl,
ROCPROFILER_HSA_API_ID_hsa_signal_subtract_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_subtract_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_subtract_screlease,
ROCPROFILER_HSA_API_ID_hsa_signal_subtract_scacq_screl,
ROCPROFILER_HSA_API_ID_hsa_signal_cas_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_cas_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_cas_screlease,
ROCPROFILER_HSA_API_ID_hsa_signal_cas_scacq_screl,
ROCPROFILER_HSA_API_ID_hsa_isa_from_name,
ROCPROFILER_HSA_API_ID_hsa_isa_get_info,
ROCPROFILER_HSA_API_ID_hsa_isa_compatible,
ROCPROFILER_HSA_API_ID_hsa_code_object_serialize,
ROCPROFILER_HSA_API_ID_hsa_code_object_deserialize,
ROCPROFILER_HSA_API_ID_hsa_code_object_destroy,
ROCPROFILER_HSA_API_ID_hsa_code_object_get_info,
ROCPROFILER_HSA_API_ID_hsa_code_object_get_symbol,
ROCPROFILER_HSA_API_ID_hsa_code_symbol_get_info,
ROCPROFILER_HSA_API_ID_hsa_code_object_iterate_symbols,
ROCPROFILER_HSA_API_ID_hsa_executable_create,
ROCPROFILER_HSA_API_ID_hsa_executable_destroy,
ROCPROFILER_HSA_API_ID_hsa_executable_load_code_object,
ROCPROFILER_HSA_API_ID_hsa_executable_freeze,
ROCPROFILER_HSA_API_ID_hsa_executable_get_info,
ROCPROFILER_HSA_API_ID_hsa_executable_global_variable_define,
ROCPROFILER_HSA_API_ID_hsa_executable_agent_global_variable_define,
ROCPROFILER_HSA_API_ID_hsa_executable_readonly_variable_define,
ROCPROFILER_HSA_API_ID_hsa_executable_validate,
ROCPROFILER_HSA_API_ID_hsa_executable_get_symbol,
ROCPROFILER_HSA_API_ID_hsa_executable_symbol_get_info,
ROCPROFILER_HSA_API_ID_hsa_executable_iterate_symbols,
ROCPROFILER_HSA_API_ID_hsa_status_string,
ROCPROFILER_HSA_API_ID_hsa_extension_get_name,
ROCPROFILER_HSA_API_ID_hsa_system_major_extension_supported,
ROCPROFILER_HSA_API_ID_hsa_system_get_major_extension_table,
ROCPROFILER_HSA_API_ID_hsa_agent_major_extension_supported,
ROCPROFILER_HSA_API_ID_hsa_cache_get_info,
ROCPROFILER_HSA_API_ID_hsa_agent_iterate_caches,
ROCPROFILER_HSA_API_ID_hsa_signal_silent_store_relaxed,
ROCPROFILER_HSA_API_ID_hsa_signal_silent_store_screlease,
ROCPROFILER_HSA_API_ID_hsa_signal_group_create,
ROCPROFILER_HSA_API_ID_hsa_signal_group_destroy,
ROCPROFILER_HSA_API_ID_hsa_signal_group_wait_any_scacquire,
ROCPROFILER_HSA_API_ID_hsa_signal_group_wait_any_relaxed,
ROCPROFILER_HSA_API_ID_hsa_agent_iterate_isas,
ROCPROFILER_HSA_API_ID_hsa_isa_get_info_alt,
ROCPROFILER_HSA_API_ID_hsa_isa_get_exception_policies,
ROCPROFILER_HSA_API_ID_hsa_isa_get_round_method,
ROCPROFILER_HSA_API_ID_hsa_wavefront_get_info,
ROCPROFILER_HSA_API_ID_hsa_isa_iterate_wavefronts,
ROCPROFILER_HSA_API_ID_hsa_code_object_get_symbol_from_name,
ROCPROFILER_HSA_API_ID_hsa_code_object_reader_create_from_file,
ROCPROFILER_HSA_API_ID_hsa_code_object_reader_create_from_memory,
ROCPROFILER_HSA_API_ID_hsa_code_object_reader_destroy,
ROCPROFILER_HSA_API_ID_hsa_executable_create_alt,
ROCPROFILER_HSA_API_ID_hsa_executable_load_program_code_object,
ROCPROFILER_HSA_API_ID_hsa_executable_load_agent_code_object,
ROCPROFILER_HSA_API_ID_hsa_executable_validate_alt,
ROCPROFILER_HSA_API_ID_hsa_executable_get_symbol_by_name,
ROCPROFILER_HSA_API_ID_hsa_executable_iterate_agent_symbols,
ROCPROFILER_HSA_API_ID_hsa_executable_iterate_program_symbols,
// block: AmdExt API
ROCPROFILER_HSA_API_ID_hsa_amd_coherency_get_type,
ROCPROFILER_HSA_API_ID_hsa_amd_coherency_set_type,
ROCPROFILER_HSA_API_ID_hsa_amd_profiling_set_profiler_enabled,
ROCPROFILER_HSA_API_ID_hsa_amd_profiling_async_copy_enable,
ROCPROFILER_HSA_API_ID_hsa_amd_profiling_get_dispatch_time,
ROCPROFILER_HSA_API_ID_hsa_amd_profiling_get_async_copy_time,
ROCPROFILER_HSA_API_ID_hsa_amd_profiling_convert_tick_to_system_domain,
ROCPROFILER_HSA_API_ID_hsa_amd_signal_async_handler,
ROCPROFILER_HSA_API_ID_hsa_amd_async_function,
ROCPROFILER_HSA_API_ID_hsa_amd_signal_wait_any,
ROCPROFILER_HSA_API_ID_hsa_amd_queue_cu_set_mask,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_pool_get_info,
ROCPROFILER_HSA_API_ID_hsa_amd_agent_iterate_memory_pools,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_pool_allocate,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_pool_free,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_async_copy,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_async_copy_on_engine,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_copy_engine_status,
ROCPROFILER_HSA_API_ID_hsa_amd_agent_memory_pool_get_info,
ROCPROFILER_HSA_API_ID_hsa_amd_agents_allow_access,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_pool_can_migrate,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_migrate,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_lock,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_unlock,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_fill,
ROCPROFILER_HSA_API_ID_hsa_amd_interop_map_buffer,
ROCPROFILER_HSA_API_ID_hsa_amd_interop_unmap_buffer,
ROCPROFILER_HSA_API_ID_hsa_amd_image_create,
ROCPROFILER_HSA_API_ID_hsa_amd_pointer_info,
ROCPROFILER_HSA_API_ID_hsa_amd_pointer_info_set_userdata,
ROCPROFILER_HSA_API_ID_hsa_amd_ipc_memory_create,
ROCPROFILER_HSA_API_ID_hsa_amd_ipc_memory_attach,
ROCPROFILER_HSA_API_ID_hsa_amd_ipc_memory_detach,
ROCPROFILER_HSA_API_ID_hsa_amd_signal_create,
ROCPROFILER_HSA_API_ID_hsa_amd_ipc_signal_create,
ROCPROFILER_HSA_API_ID_hsa_amd_ipc_signal_attach,
ROCPROFILER_HSA_API_ID_hsa_amd_register_system_event_handler,
ROCPROFILER_HSA_API_ID_hsa_amd_queue_intercept_create,
ROCPROFILER_HSA_API_ID_hsa_amd_queue_intercept_register,
ROCPROFILER_HSA_API_ID_hsa_amd_queue_set_priority,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_async_copy_rect,
ROCPROFILER_HSA_API_ID_hsa_amd_runtime_queue_create_register,
ROCPROFILER_HSA_API_ID_hsa_amd_memory_lock_to_pool,
ROCPROFILER_HSA_API_ID_hsa_amd_register_deallocation_callback,
ROCPROFILER_HSA_API_ID_hsa_amd_deregister_deallocation_callback,
ROCPROFILER_HSA_API_ID_hsa_amd_signal_value_pointer,
ROCPROFILER_HSA_API_ID_hsa_amd_svm_attributes_set,
ROCPROFILER_HSA_API_ID_hsa_amd_svm_attributes_get,
ROCPROFILER_HSA_API_ID_hsa_amd_svm_prefetch_async,
ROCPROFILER_HSA_API_ID_hsa_amd_spm_acquire,
ROCPROFILER_HSA_API_ID_hsa_amd_spm_release,
ROCPROFILER_HSA_API_ID_hsa_amd_spm_set_dest_buffer,
ROCPROFILER_HSA_API_ID_hsa_amd_queue_cu_get_mask,
ROCPROFILER_HSA_API_ID_hsa_amd_portable_export_dmabuf,
ROCPROFILER_HSA_API_ID_hsa_amd_portable_close_dmabuf,
// block: ImageExt API
ROCPROFILER_HSA_API_ID_hsa_ext_image_get_capability,
ROCPROFILER_HSA_API_ID_hsa_ext_image_data_get_info,
ROCPROFILER_HSA_API_ID_hsa_ext_image_create,
ROCPROFILER_HSA_API_ID_hsa_ext_image_import,
ROCPROFILER_HSA_API_ID_hsa_ext_image_export,
ROCPROFILER_HSA_API_ID_hsa_ext_image_copy,
ROCPROFILER_HSA_API_ID_hsa_ext_image_clear,
ROCPROFILER_HSA_API_ID_hsa_ext_image_destroy,
ROCPROFILER_HSA_API_ID_hsa_ext_sampler_create,
ROCPROFILER_HSA_API_ID_hsa_ext_sampler_destroy,
ROCPROFILER_HSA_API_ID_hsa_ext_image_get_capability_with_layout,
ROCPROFILER_HSA_API_ID_hsa_ext_image_data_get_info_with_layout,
ROCPROFILER_HSA_API_ID_hsa_ext_image_create_with_layout,
ROCPROFILER_HSA_API_ID_LAST,
} rocprofiler_hsa_api_id_t;
@@ -0,0 +1,31 @@
// Copyright (c) 2018-2023 Advanced Micro Devices, Inc.
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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.
#pragma once
// NOLINTNEXTLINE(performance-enum-size)
typedef enum
{
ROCPROFILER_HSA_API_TABLE_ID_NONE = -1,
ROCPROFILER_HSA_API_TABLE_ID_CoreApi = 0,
ROCPROFILER_HSA_API_TABLE_ID_AmdExt,
ROCPROFILER_HSA_API_TABLE_ID_ImageExt,
ROCPROFILER_HSA_API_TABLE_ID_LAST,
} rocprofiler_hsa_table_api_id_t;
+35
Zobrazit soubor
@@ -0,0 +1,35 @@
// MIT License
//
// Copyright (c) 2023 ROCm Developer Tools
//
// 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:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// 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.
#pragma once
#include <rocprofiler/marker/api_args.h>
#include <stdint.h>
typedef uint32_t rocprofiler_trace_record_marker_operation_kind_t;
typedef struct rocprofiler_roctx_api_data_s rocprofiler_roctx_api_data_t;
struct rocprofiler_roctx_api_data_s
{
rocprofiler_roctx_api_args_t args;
};
@@ -0,0 +1,9 @@
#
#
# Installation of public HSA headers
#
#
set(ROCPROFILER_MARKER_HEADER_FILES api_args.h api_id.h)
install(FILES ${ROCPROFILER_MARKER_HEADER_FILES}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/rocprofiler/marker)
@@ -0,0 +1,51 @@
// Copyright (c) 2018-2023 Advanced Micro Devices, Inc.
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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.
#pragma once
#include <stdint.h>
typedef uint64_t roctx_range_id_t;
typedef union rocprofiler_roctx_api_args_u
{
struct
{
const char* message;
} roctxMarkA;
struct
{
const char* message;
} roctxRangePushA;
struct
{
const char* message;
} roctxRangePop;
struct
{
const char* message;
roctx_range_id_t id;
} roctxRangeStartA;
struct
{
const char* message;
roctx_range_id_t id;
} roctxRangeStop;
} rocprofiler_roctx_api_args_t;
+33
Zobrazit soubor
@@ -0,0 +1,33 @@
// Copyright (c) 2018-2023 Advanced Micro Devices, Inc.
//
// 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:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// 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.
#pragma once
// NOLINTNEXTLINE(performance-enum-size)
typedef enum
{
ROCPROFILER_ROCTX_API_ID_NONE = -1,
ROCPROFILER_ROCTX_API_ID_roctxMarkA = 0,
ROCPROFILER_ROCTX_API_ID_roctxRangePushA,
ROCPROFILER_ROCTX_API_ID_roctxRangePop,
ROCPROFILER_ROCTX_API_ID_roctxRangeStartA,
ROCPROFILER_ROCTX_API_ID_roctxRangeStop,
ROCPROFILER_ROCTX_API_ID_LAST,
} rocprofiler_roctx_api_id_t;
Rozdílový obsah nebyl zobrazen, protože je příliš veliký Načíst rozdílové porovnání
+29 -30
Zobrazit soubor
@@ -1,22 +1,24 @@
/* Copyright (c) 2022 Advanced Micro Devices, Inc.
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:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
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. */
// MIT License
//
// Copyright (c) 2023 ROCm Developer Tools
//
// 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:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// 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.
/** \section rocprofiler_plugin_api ROCProfiler Plugin API
*
@@ -39,13 +41,12 @@
* ROCProfiler Tool Plugin API interface.
*/
#ifndef ROCPROFILER_PLUGIN_H_
#define ROCPROFILER_PLUGIN_H_
#pragma once
#include "rocprofiler/rocprofiler.h"
#include <stdint.h>
#include "rocprofiler.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -109,15 +110,15 @@ rocprofiler_plugin_finalize();
*
* @param[in] begin Pointer to the first record.
* @param[in] end Pointer to one past the last record.
* @param[in] session_id Session ID
* @param[in] context_id context ID
* @param[in] buffer_id Buffer ID
* @return Returns 0 on success and -1 on error.
*/
ROCPROFILER_EXPORT int
rocprofiler_plugin_write_buffer_records(const rocprofiler_record_header_t* begin,
const rocprofiler_record_header_t* end,
rocprofiler_session_id_t session_id,
rocprofiler_buffer_id_t buffer_id);
rocprofiler_plugin_write_buffer_records(rocprofiler_context_id_t context_id,
rocprofiler_buffer_id_t buffer_id,
rocprofiler_record_header_t** headers,
size_t num_headers);
/**
* Report Synchronous Record.
@@ -138,5 +139,3 @@ rocprofiler_plugin_write_record(rocprofiler_record_tracer_t record);
#ifdef __cplusplus
} /* extern "C" */
#endif /* __cplusplus */
#endif /* ROCPROFILER_PLUGIN_H_ */
+61
Zobrazit soubor
@@ -0,0 +1,61 @@
// MIT License
//
// Copyright (c) 2023 ROCm Developer Tools
//
// 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:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// 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.
#pragma once
/**
* @def ROCPROFILER_VERSION_MAJOR
* @brief The major version of the interface as a macro so it can be used
* by the preprocessor.
* @addtogroup VERSIONING_GROUP
*
* @def ROCPROFILER_VERSION_MINOR
* @brief The minor version of the interface as a macro so it can be used
* by the preprocessor.
* @addtogroup VERSIONING_GROUP
*/
// clang-format off
#define ROCPROFILER_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define ROCPROFILER_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define ROCPROFILER_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define ROCPROFILER_VERSION_STRING "@FULL_VERSION_STRING@"
#define ROCPROFILER_SOVERSION "@PROJECT_VERSION_MAJOR@"
#define ROCPROFILER_GIT_DESCRIBE "@ROCPROFILER_GIT_DESCRIBE@"
#define ROCPROFILER_GIT_REVISION "@ROCPROFILER_GIT_REVISION@"
// system info during compilation
#define ROCPROFILER_LIBRARY_ARCH "@CMAKE_LIBRARY_ARCHITECTURE@"
#define ROCPROFILER_SYSTEM_NAME "@CMAKE_SYSTEM_NAME@"
#define ROCPROFILER_SYSTEM_PROCESSOR "@CMAKE_SYSTEM_PROCESSOR@"
#define ROCPROFILER_SYSTEM_VERSION "@CMAKE_SYSTEM_VERSION@"
// compiler information
#define ROCPROFILER_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@"
#define ROCPROFILER_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@"
// clang-format on
#define ROCPROFILER_COMPILER_STRING ROCPROFILER_COMPILER_ID " v" ROCPROFILER_COMPILER_VERSION
#define ROCPROFILER_VERSION \
((10000 * ROCPROFILER_VERSION_MAJOR) + (100 * ROCPROFILER_VERSION_MINOR) + \
ROCPROFILER_VERSION_PATCH)