SWDEV-433371 - use comgr to unbundle code objects

1.Make runtime use comgr to unbundle code objects
2.Support compressed/uncompressed modes
3.Remove HIP_USE_RUNTIME_UNBUNDLER and
  HIPRTC_USE_RUNTIME_UNBUNDLER to simplify logics
4.Add comgr wrapper for
  amd_comgr_action_info_set_bundle_entry_ids()

Change-Id: Ic41b1ad1b64cca1e31986437983a5146d52a7329
This commit is contained in:
taosang2
2024-04-11 08:57:47 -04:00
committed by Tao Sang
parent 996c16ad0a
commit e53df57ffe
11 changed files with 474 additions and 427 deletions
+1
View File
@@ -119,6 +119,7 @@ bool Comgr::LoadLib(bool is_versioned) {
GET_COMGR_SYMBOL(amd_comgr_get_mangled_name)
GET_COMGR_SYMBOL(amd_comgr_populate_name_expression_map)
GET_COMGR_SYMBOL(amd_comgr_map_name_expression_to_symbol_name)
GET_COMGR_SYMBOL(amd_comgr_action_info_set_bundle_entry_ids)
is_ready_ = true;
return true;
}
+7 -1
View File
@@ -76,6 +76,7 @@ typedef amd_comgr_status_t (*t_amd_comgr_populate_mangled_names)(amd_comgr_data_
typedef amd_comgr_status_t (*t_amd_comgr_get_mangled_name)(amd_comgr_data_t data, size_t index, size_t *size, char *mangled_name);
typedef amd_comgr_status_t (*t_amd_comgr_populate_name_expression_map)(amd_comgr_data_t data, size_t *count);
typedef amd_comgr_status_t (*t_amd_comgr_map_name_expression_to_symbol_name)(amd_comgr_data_t data, size_t *size, char *name_expression, char* symbol_name);
typedef amd_comgr_status_t (*t_amd_comgr_action_info_set_bundle_entry_ids)(amd_comgr_action_info_t action_info, const char* bundle_entry_ids[], size_t count);
struct ComgrEntryPoints {
void* handle;
@@ -129,6 +130,7 @@ struct ComgrEntryPoints {
t_amd_comgr_get_mangled_name amd_comgr_get_mangled_name;
t_amd_comgr_populate_name_expression_map amd_comgr_populate_name_expression_map;
t_amd_comgr_map_name_expression_to_symbol_name amd_comgr_map_name_expression_to_symbol_name;
t_amd_comgr_action_info_set_bundle_entry_ids amd_comgr_action_info_set_bundle_entry_ids;
};
#ifdef COMGR_DYN_DLL
@@ -310,7 +312,11 @@ public:
static amd_comgr_status_t map_name_expression_to_symbol_name(amd_comgr_data_t data, size_t *size, char *name_expression, char* symbol_name) {
return COMGR_DYN(amd_comgr_map_name_expression_to_symbol_name)(data, size, name_expression, symbol_name);
}
static amd_comgr_status_t action_info_set_bundle_entry_ids(amd_comgr_action_info_t action_info,
const char* bundle_entry_ids[], size_t count) {
return COMGR_DYN(amd_comgr_action_info_set_bundle_entry_ids)(action_info, bundle_entry_ids,
count);
}
private:
static ComgrEntryPoints cep_;
-4
View File
@@ -229,10 +229,6 @@ release(bool, ROC_SKIP_KERNEL_ARG_COPY, false, \
"If true, then runtime can skip kernel arg copy") \
release(bool, GPU_STREAMOPS_CP_WAIT, false, \
"Force the stream wait memory operation to wait on CP.") \
release(bool, HIP_USE_RUNTIME_UNBUNDLER, false, \
"Force this to use Runtime code object unbundler.") \
release(bool, HIPRTC_USE_RUNTIME_UNBUNDLER, false, \
"Set this to true to force runtime unbundler in hiprtc.") \
release(size_t, HIP_INITIAL_DM_SIZE, 8 * Mi, \
"Set initial heap size for device malloc.") \
release(bool, HIP_FORCE_DEV_KERNARG, true, \