rocr: return preferred SDMA engine mask

- Add a new AMD extension API to return preferred SDMA engine mask.
This can use used in conjunction with copy_on_engine API to get
optimal bandwidth.
Bu işleme şunda yer alıyor:
Saleel Kudchadker
2025-04-10 14:47:00 +00:00
işlemeyi yapan: Kudchadker, Saleel
ebeveyn bdb6e43b54
işleme 57c0c643ce
13 değiştirilmiş dosya ile 119 ekleme ve 19 silme
+2 -1
Dosyayı Görüntüle
@@ -3,7 +3,7 @@
// The University of Illinois/NCSA
// Open Source License (NCSA)
//
// Copyright (c) 2014-2024, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2014-2025, Advanced Micro Devices, Inc. All rights reserved.
//
// Developed by:
//
@@ -269,6 +269,7 @@ struct AmdExtTable {
decltype(hsa_amd_vmem_address_reserve_align)* hsa_amd_vmem_address_reserve_align_fn;
decltype(hsa_amd_enable_logging)* hsa_amd_enable_logging_fn;
decltype(hsa_amd_signal_wait_all)* hsa_amd_signal_wait_all_fn;
decltype(hsa_amd_memory_get_preferred_copy_engine)* hsa_amd_memory_get_preferred_copy_engine_fn;
};
// Table to export HSA Core Runtime Apis
+2 -2
Dosyayı Görüntüle
@@ -3,7 +3,7 @@
// The University of Illinois/NCSA
// Open Source License (NCSA)
//
// Copyright (c) 2014-2024, Advanced Micro Devices, Inc. All rights reserved.
// Copyright (c) 2014-2025, Advanced Micro Devices, Inc. All rights reserved.
//
// Developed by:
//
@@ -58,7 +58,7 @@
// Step Ids of the Api tables exported by Hsa Core Runtime
#define HSA_API_TABLE_STEP_VERSION 0x01
#define HSA_CORE_API_TABLE_STEP_VERSION 0x00
#define HSA_AMD_EXT_API_TABLE_STEP_VERSION 0x05
#define HSA_AMD_EXT_API_TABLE_STEP_VERSION 0x06
#define HSA_FINALIZER_API_TABLE_STEP_VERSION 0x00
#define HSA_IMAGE_API_TABLE_STEP_VERSION 0x01
// Rocprofiler just checks HSA_MAGE_EXT_API_TABLE_STEP_VERSION
+21 -2
Dosyayı Görüntüle
@@ -58,9 +58,10 @@
* - 1.5 - hsa_amd_agent_info: HSA_AMD_AGENT_INFO_MEMORY_PROPERTIES
* - 1.6 - Virtual Memory API: hsa_amd_vmem_address_reserve_align
* - 1.7 - hsa_amd_signal_wait_all
* - 1.8 - hsa_amd_memory_get_preferred_copy_engine
*/
#define HSA_AMD_INTERFACE_VERSION_MAJOR 1
#define HSA_AMD_INTERFACE_VERSION_MINOR 7
#define HSA_AMD_INTERFACE_VERSION_MINOR 8
#ifdef __cplusplus
extern "C" {
@@ -1775,8 +1776,26 @@ hsa_status_t HSA_API
* dst_agent == src_agent is generally used for shader copies.
*/
hsa_status_t HSA_API
hsa_amd_memory_copy_engine_status(hsa_agent_t dst_agent, hsa_agent_t src_agent,
hsa_amd_memory_copy_engine_status(hsa_agent_t dst_agent, hsa_agent_t src_agent,
uint32_t *engine_ids_mask);
/**
* @brief Returns the preferred SDMA engine mask.
*
* @param[in] dst_agent Destination agent of copy status direction.
*
* @param[in] src_agent Source agent of copy status direction.
*
* @param[out] recommended_ids_mask returns available SDMA engine IDs for max bandwidth
* that can be masked with hsa_amd_sdma_engine_id_t. Can be 0 if there is no preference
*
* @retval ::HSA_STATUS_SUCCESS For mask returned
*
* @retval ::HSA_STATUS_ERROR_INVALID_AGENT dst_agent and src_agent are the same as
* dst_agent == src_agent is generally used for shader copies.
*/
hsa_status_t HSA_API
hsa_amd_memory_get_preferred_copy_engine(hsa_agent_t dst_agent, hsa_agent_t src_agent,
uint32_t* recommended_ids_mask);
/*
[Provisional API]