Reorder loader extension functions to maintain backwards compatibility
Change-Id: I93f0899cdece4bab167290085da67d1a1770eb9b
[ROCm/ROCR-Runtime commit: 49a6a39724]
This commit is contained in:
committed by
Gerrit Code Review
parent
8fe807f2a9
commit
83d9c273a5
@@ -228,7 +228,7 @@ hsa_status_t
|
||||
|
||||
return HSA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
if (extension == HSA_EXTENSION_FINALIZER) {
|
||||
// Currently there is only version 1.00.
|
||||
hsa_ext_finalizer_1_00_pfn_s* ext_table =
|
||||
@@ -248,10 +248,10 @@ hsa_status_t
|
||||
// Currently there is only version 1.00.
|
||||
hsa_ven_amd_loader_1_00_pfn_t* ext_table =
|
||||
reinterpret_cast<hsa_ven_amd_loader_1_00_pfn_t*>(table);
|
||||
ext_table->hsa_ven_amd_loader_query_segment_descriptors =
|
||||
hsa_ven_amd_loader_query_segment_descriptors;
|
||||
ext_table->hsa_ven_amd_loader_query_host_address =
|
||||
hsa_ven_amd_loader_query_host_address;
|
||||
ext_table->hsa_ven_amd_loader_query_segment_descriptors =
|
||||
hsa_ven_amd_loader_query_segment_descriptors;
|
||||
|
||||
return HSA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -47,17 +47,6 @@
|
||||
|
||||
using namespace core;
|
||||
|
||||
hsa_status_t HSA_API hsa_ven_amd_loader_query_segment_descriptors(
|
||||
hsa_ven_amd_loader_segment_descriptor_t *segment_descriptors,
|
||||
size_t *num_segment_descriptors) {
|
||||
if (false == core::Runtime::runtime_singleton_->IsOpen()) {
|
||||
return HSA_STATUS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
||||
// Arguments are checked by the loader.
|
||||
return Runtime::runtime_singleton_->loader()->QuerySegmentDescriptors(segment_descriptors, num_segment_descriptors);
|
||||
}
|
||||
|
||||
hsa_status_t HSA_API hsa_ven_amd_loader_query_host_address(
|
||||
const void *device_address,
|
||||
const void **host_address) {
|
||||
@@ -80,3 +69,14 @@ hsa_status_t HSA_API hsa_ven_amd_loader_query_host_address(
|
||||
*host_address = reinterpret_cast<void*>(uhaddr);
|
||||
return HSA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
hsa_status_t HSA_API hsa_ven_amd_loader_query_segment_descriptors(
|
||||
hsa_ven_amd_loader_segment_descriptor_t *segment_descriptors,
|
||||
size_t *num_segment_descriptors) {
|
||||
if (false == core::Runtime::runtime_singleton_->IsOpen()) {
|
||||
return HSA_STATUS_ERROR_NOT_INITIALIZED;
|
||||
}
|
||||
|
||||
// Arguments are checked by the loader.
|
||||
return Runtime::runtime_singleton_->loader()->QuerySegmentDescriptors(segment_descriptors, num_segment_descriptors);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user