rocr: Add WaitMultiple to core Signal
Replaces WaitAny with WaitMultiple to more closely align with the underlying driver API for waiting on multiple events. WaitMultiple adds a single parameter, wait_on_all, to the WaitAny interface providing a single function for waiting on multiple events when we only need AND and OR semantics for the signal checking logic. Change-Id: I68a4a45d48151d9d69aef02fd8f7263b9e6c0e75
Bu işleme şunda yer alıyor:
işlemeyi yapan:
David Yat Sin
ebeveyn
c51aa0d155
işleme
8a38f121ea
@@ -3,7 +3,7 @@
|
||||
// The University of Illinois/NCSA
|
||||
// Open Source License (NCSA)
|
||||
//
|
||||
// Copyright (c) 2014-2020, Advanced Micro Devices, Inc. All rights reserved.
|
||||
// Copyright (c) 2014-2024, Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
// Developed by:
|
||||
//
|
||||
@@ -268,6 +268,7 @@ struct AmdExtTable {
|
||||
decltype(hsa_amd_queue_get_info)* hsa_amd_queue_get_info_fn;
|
||||
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;
|
||||
};
|
||||
|
||||
// Table to export HSA Core Runtime Apis
|
||||
|
||||
@@ -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 0x04
|
||||
#define HSA_AMD_EXT_API_TABLE_STEP_VERSION 0x05
|
||||
#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
|
||||
|
||||
@@ -57,9 +57,10 @@
|
||||
* - 1.4 - Virtual Memory API
|
||||
* - 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
|
||||
*/
|
||||
#define HSA_AMD_INTERFACE_VERSION_MAJOR 1
|
||||
#define HSA_AMD_INTERFACE_VERSION_MINOR 6
|
||||
#define HSA_AMD_INTERFACE_VERSION_MINOR 7
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -1179,6 +1180,20 @@ hsa_status_t HSA_API
|
||||
hsa_signal_value_t value,
|
||||
hsa_amd_signal_handler handler, void* arg);
|
||||
|
||||
/**
|
||||
* @brief Wait for all signal-condition pairs to be satisfied.
|
||||
*
|
||||
* @details Allows waiting for all of several signal and condition pairs to be
|
||||
* satisfied. The function returns 0 if all signals met their conditions and -1
|
||||
* on a timeout. The value of each signal's satisfying value is returned in
|
||||
* satisfying_value unless satisfying_value is nullptr. This function provides
|
||||
* only relaxed memory semantics.
|
||||
*/
|
||||
uint32_t HSA_API hsa_amd_signal_wait_all(uint32_t signal_count, hsa_signal_t* signals,
|
||||
hsa_signal_condition_t* conds, hsa_signal_value_t* values,
|
||||
uint64_t timeout_hint, hsa_wait_state_t wait_hint,
|
||||
hsa_signal_value_t* satisfying_values);
|
||||
|
||||
/**
|
||||
* @brief Wait for any signal-condition pair to be satisfied.
|
||||
*
|
||||
@@ -1429,7 +1444,7 @@ typedef enum {
|
||||
* following its memory access model. The actual placement may vary or migrate
|
||||
* due to the system's NUMA policy and state, which is beyond the scope of
|
||||
* HSA APIs.
|
||||
*/
|
||||
*/
|
||||
typedef struct hsa_amd_memory_pool_s {
|
||||
/**
|
||||
* Opaque handle.
|
||||
@@ -2972,7 +2987,7 @@ typedef enum hsa_amd_svm_attribute_s {
|
||||
HSA_AMD_SVM_ATTRIB_ACCESS_QUERY = 0x203,
|
||||
} hsa_amd_svm_attribute_t;
|
||||
|
||||
// List type for hsa_amd_svm_attributes_set/get.
|
||||
// List type for hsa_amd_svm_attributes_set/get.
|
||||
typedef struct hsa_amd_svm_attribute_pair_s {
|
||||
// hsa_amd_svm_attribute_t value.
|
||||
uint64_t attribute;
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle