From 02a40e9272d38d326dd44da49dbbf08ddb5e0c8e Mon Sep 17 00:00:00 2001 From: "Shweta.Khatri" Date: Fri, 22 Mar 2024 23:51:53 -0400 Subject: [PATCH] Convert some comments to Doxygen-style comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit hsa_ext_amd.h - Fix provided by github developer - Mátyás Aradi Github request - https://github.com/ROCm/ROCR-Runtime/pull/187 Change-Id: I63e4175caebd10be0151f21bd5f048dd011aaf06 --- runtime/hsa-runtime/inc/hsa_ext_amd.h | 48 +++++----- .../hsa-runtime/inc/hsa_ven_amd_aqlprofile.h | 92 +++++++++---------- 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/runtime/hsa-runtime/inc/hsa_ext_amd.h b/runtime/hsa-runtime/inc/hsa_ext_amd.h index 187bcd9587..7e109d7847 100644 --- a/runtime/hsa-runtime/inc/hsa_ext_amd.h +++ b/runtime/hsa-runtime/inc/hsa_ext_amd.h @@ -48,7 +48,7 @@ #include "hsa.h" #include "hsa_ext_image.h" -/* +/** * - 1.0 - initial version * - 1.1 - dmabuf export * - 1.2 - hsa_amd_memory_async_copy_on_engine @@ -2783,7 +2783,7 @@ hsa_status_t hsa_amd_portable_export_dmabuf(const void* ptr, size_t size, int* d */ hsa_status_t hsa_amd_portable_close_dmabuf(int dmabuf); -/* +/** * @brief Allocate a reserved address range * * Reserve a virtual address range. The size must be a multiple of the system page size. @@ -2807,7 +2807,7 @@ hsa_status_t hsa_amd_portable_close_dmabuf(int dmabuf); hsa_status_t hsa_amd_vmem_address_reserve(void** va, size_t size, uint64_t address, uint64_t flags); -/* +/** * @brief Free a reserved address range * * Free a previously allocated address range. The size must match the size of a previously @@ -2841,7 +2841,7 @@ typedef enum { MEMORY_TYPE_PINNED, } hsa_amd_memory_type_t; -/* +/** * @brief Create a virtual memory handle * * Create a virtual memory handle within this pool @@ -2870,7 +2870,7 @@ hsa_status_t hsa_amd_vmem_handle_create(hsa_amd_memory_pool_t pool, size_t size, hsa_amd_memory_type_t type, uint64_t flags, hsa_amd_vmem_alloc_handle_t* memory_handle); -/* +/** * @brief Release a virtual memory handle * * @param[in] memory handle that was previously allocated @@ -2881,7 +2881,7 @@ hsa_status_t hsa_amd_vmem_handle_create(hsa_amd_memory_pool_t pool, size_t size, */ hsa_status_t hsa_amd_vmem_handle_release(hsa_amd_vmem_alloc_handle_t memory_handle); -/* +/** * @brief Map a virtual memory handle * * Map a virtual memory handle to a reserved address range. The virtual address requested must be @@ -2907,7 +2907,7 @@ hsa_status_t hsa_amd_vmem_handle_release(hsa_amd_vmem_alloc_handle_t memory_hand hsa_status_t hsa_amd_vmem_map(void* va, size_t size, size_t in_offset, hsa_amd_vmem_alloc_handle_t memory_handle, uint64_t flags); -/* +/** * @brief Unmap a virtual memory handle * * Unmap previously mapped virtual address range @@ -2930,7 +2930,7 @@ typedef struct hsa_amd_memory_access_desc_s { hsa_agent_t agent_handle; } hsa_amd_memory_access_desc_t; -/* +/** * @brief Make a memory mapping accessible * * Make previously mapped virtual address accessible to specific agents. @p size must be equal to @@ -2959,7 +2959,7 @@ hsa_status_t hsa_amd_vmem_set_access(void* va, size_t size, const hsa_amd_memory_access_desc_t* desc, size_t desc_cnt); -/* +/** * @brief Get current access permissions for memory mapping * * Get access permissions for memory mapping for specific agent. @@ -2980,7 +2980,7 @@ hsa_status_t hsa_amd_vmem_set_access(void* va, size_t size, hsa_status_t hsa_amd_vmem_get_access(void* va, hsa_access_permission_t* perms, hsa_agent_t agent_handle); -/* +/** * @brief Get an exportable shareable handle * * Get an exportable shareable handle for a memory_handle. This shareabl handle can then be used to @@ -3003,7 +3003,7 @@ hsa_status_t hsa_amd_vmem_get_access(void* va, hsa_access_permission_t* perms, hsa_status_t hsa_amd_vmem_export_shareable_handle(int* dmabuf_fd, hsa_amd_vmem_alloc_handle_t handle, uint64_t flags); -/* +/** * @brief Import a shareable handle * * Import a shareable handle for a memory handle. Importing a shareable handle that has been closed @@ -3023,7 +3023,7 @@ hsa_status_t hsa_amd_vmem_export_shareable_handle(int* dmabuf_fd, hsa_status_t hsa_amd_vmem_import_shareable_handle(int dmabuf_fd, hsa_amd_vmem_alloc_handle_t* handle); -/* +/** * @brief Returns memory handle for mapped memory * * Return a memory handle for previously mapped memory. The handle will be the same value of handle @@ -3040,19 +3040,19 @@ hsa_status_t hsa_amd_vmem_import_shareable_handle(int dmabuf_fd, hsa_status_t hsa_amd_vmem_retain_alloc_handle(hsa_amd_vmem_alloc_handle_t* memory_handle, void* addr); -/* -* @brief Returns the current allocation properties of a handle -* -* Returns the allocation properties of an existing handle -* -* @param[in] memory_handle memory handle to be queried -* @param[out] pool memory pool that owns this handle -* @param[out] memory type +/** + * @brief Returns the current allocation properties of a handle + * + * Returns the allocation properties of an existing handle + * + * @param[in] memory_handle memory handle to be queried + * @param[out] pool memory pool that owns this handle + * @param[out] memory type -* @retval ::HSA_STATUS_SUCCESS -* -* @retval ::HSA_STATUS_ERROR_INVALID_ALLOCATION Invalid memory_handle -*/ + * @retval ::HSA_STATUS_SUCCESS + * + * @retval ::HSA_STATUS_ERROR_INVALID_ALLOCATION Invalid memory_handle + */ hsa_status_t hsa_amd_vmem_get_alloc_properties_from_handle( hsa_amd_vmem_alloc_handle_t memory_handle, hsa_amd_memory_pool_t* pool, hsa_amd_memory_type_t* type); diff --git a/runtime/hsa-runtime/inc/hsa_ven_amd_aqlprofile.h b/runtime/hsa-runtime/inc/hsa_ven_amd_aqlprofile.h index 32ca6b7320..0022c0d8b8 100644 --- a/runtime/hsa-runtime/inc/hsa_ven_amd_aqlprofile.h +++ b/runtime/hsa-runtime/inc/hsa_ven_amd_aqlprofile.h @@ -149,61 +149,61 @@ hsa_status_t hsa_ven_amd_aqlprofile_validate_event( // All parameters are generic and if not applicable for a specific // profile configuration then error status will be returned. typedef enum { - /* - * Select the target compute unit (wgp) for profiling. - */ + /** + * Select the target compute unit (wgp) for profiling. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_COMPUTE_UNIT_TARGET = 0, - /* - * VMID Mask - */ + /** + * VMID Mask + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_VM_ID_MASK = 1, - /* - * Legacy. Deprecated. - */ + /** + * Legacy. Deprecated. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_MASK = 2, - /* - * Legacy. Deprecated. - */ + /** + * Legacy. Deprecated. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_TOKEN_MASK = 3, - /* - * Legacy. Deprecated. - */ + /** + * Legacy. Deprecated. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_TOKEN_MASK2 = 4, - /* - * Shader engine mask for selection. - */ + /** + * Shader engine mask for selection. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_SE_MASK = 5, - /* - * Legacy. Deprecated. - */ + /** + * Legacy. Deprecated. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_SAMPLE_RATE = 6, - /* - * Legacy. Deprecated. - */ + /** + * Legacy. Deprecated. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_K_CONCURRENT = 7, - /* - * Set SIMD Mask (GFX9) or SIMD ID for collection (Navi) - */ + /** + * Set SIMD Mask (GFX9) or SIMD ID for collection (Navi) + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_SIMD_SELECTION = 8, - /* - * Set true for occupancy collection only. - */ + /** + * Set true for occupancy collection only. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_OCCUPANCY_MODE = 9, - /* - * ATT collection max data size, in MB. Shared among shader engines. - */ + /** + * ATT collection max data size, in MB. Shared among shader engines. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_ATT_BUFFER_SIZE = 10, - /* - * Mask of which compute units to generate perfcounters. GFX9 only. - */ + /** + * Mask of which compute units to generate perfcounters. GFX9 only. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_PERFCOUNTER_MASK = 240, - /* - * Select collection period for perfcounters. GFX9 only. - */ + /** + * Select collection period for perfcounters. GFX9 only. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_PERFCOUNTER_CTRL = 241, - /* - * Select perfcounter ID (SQ block) for collection. GFX9 only. - */ + /** + * Select perfcounter ID (SQ block) for collection. GFX9 only. + */ HSA_VEN_AMD_AQLPROFILE_PARAMETER_NAME_PERFCOUNTER_NAME = 242, } hsa_ven_amd_aqlprofile_parameter_name_t; @@ -365,11 +365,11 @@ hsa_status_t hsa_ven_amd_aqlprofile_error_string( /** * @brief Callback for iteration of all possible event coordinate IDs and coordinate names. -*/ + */ typedef hsa_status_t(*hsa_ven_amd_aqlprofile_eventname_callback_t)(int id, const char* name); /** * @brief Iterate over all possible event coordinate IDs and their names. -*/ + */ hsa_status_t hsa_ven_amd_aqlprofile_iterate_event_ids(hsa_ven_amd_aqlprofile_eventname_callback_t); /** @@ -380,7 +380,7 @@ hsa_status_t hsa_ven_amd_aqlprofile_iterate_event_ids(hsa_ven_amd_aqlprofile_eve * @param coordinate The coordinate, in the range [0,extent-1]. * @param name Coordinate name as in _iterate_event_ids. * @param userdata Userdata returned from _iterate_event_coord function. -*/ + */ typedef hsa_status_t(*hsa_ven_amd_aqlprofile_coordinate_callback_t)( int position, int id, @@ -397,7 +397,7 @@ typedef hsa_status_t(*hsa_ven_amd_aqlprofile_coordinate_callback_t)( * @param[in] sample_id aqlprofile_info_data_t.sample_id returned from _aqlprofile_iterate_data. * @param[in] callback Callback function to return the coordinates. * @param[in] userdata Arbitrary data pointer to be sent back to the user via callback. -*/ + */ hsa_status_t hsa_ven_amd_aqlprofile_iterate_event_coord( hsa_agent_t agent, hsa_ven_amd_aqlprofile_event_t event,