From a4c8e0fdca136c04e9e7603674cdd32bf74ca808 Mon Sep 17 00:00:00 2001 From: Ramesh Errabolu Date: Mon, 28 Nov 2016 12:02:08 -0600 Subject: [PATCH] Per review comments Change-Id: I44585a6dcf3c4f0ce10f0e895270c113790e0652 [ROCm/ROCR-Runtime commit: 935c1b0ba9f9abf343bdcee22394ed158971d754] --- .../runtime/hsa-runtime/core/inc/amd_hsa_loader.hpp | 4 ++-- .../runtime/hsa-runtime/inc/hsa_ven_amd_loader.h | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_hsa_loader.hpp b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_hsa_loader.hpp index 5934612348..8cd2acc1d5 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_hsa_loader.hpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/inc/amd_hsa_loader.hpp @@ -399,8 +399,8 @@ public: hsa_ven_amd_loader_segment_descriptor_t *segment_descriptors, size_t *num_segment_descriptors) = 0; - /// @brief Finds the handle of @p executable to which the device - /// address belongs. Return NULL handle if device address is invalid + /// @brief Finds the handle of executable to which @p device_address + /// belongs. Return NULL handle if device address is invalid. virtual hsa_executable_t FindExecutable(uint64_t device_address) = 0; /// @brief Returns host address given @p device_address. If @p device_address diff --git a/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ven_amd_loader.h b/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ven_amd_loader.h index cab0881c69..020dd9173f 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ven_amd_loader.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/inc/hsa_ven_amd_loader.h @@ -226,14 +226,16 @@ hsa_status_t HSA_API hsa_ven_amd_loader_query_segment_descriptors( /** * @brief Obtains the handle of executable to which the device address belongs. - * This method should not be used to obtain executable handle by using a host - * address. + * + * @details This method should not be used to obtain executable handle by using + * a host address. The executable returned is expected to be alive until its + * destroyed by the user. * * @retval HSA_STATUS_SUCCESS Function is executed successfully. * * @retval HSA_STATUS_ERROR_NOT_INITIALIZED Runtime is not initialized. * - * @retval HSA_STATUS_ERROR_INVALID_ARGUMENT the input is invalid or there + * @retval HSA_STATUS_ERROR_INVALID_ARGUMENT The input is invalid or there * is no exectuable found for this kernel code object. */ hsa_status_t hsa_ven_amd_loader_query_executable( @@ -256,7 +258,7 @@ typedef struct hsa_ven_amd_loader_1_00_pfn_s { hsa_status_t (*hsa_ven_amd_loader_query_segment_descriptors)( hsa_ven_amd_loader_segment_descriptor_t *segment_descriptors, size_t *num_segment_descriptors); - + hsa_status_t (*hsa_ven_amd_loader_query_executable)( const void *device_address, hsa_executable_t *executable);