@@ -130,9 +130,7 @@ static const std::map<std::string, KernelArgMD::ValueKind> ArgValueKind = {
130
130
atmi_machine_t g_atmi_machine;
131
131
ATLMachine g_atl_machine;
132
132
133
- hsa_region_t atl_gpu_kernarg_region;
134
133
std::vector<hsa_amd_memory_pool_t > atl_gpu_kernarg_pools;
135
- hsa_region_t atl_cpu_kernarg_region;
136
134
137
135
static std::vector<hsa_executable_t > g_executables;
138
136
@@ -143,19 +141,12 @@ std::vector<std::map<std::string, atl_symbol_info_t>> SymbolInfoTable;
143
141
bool g_atmi_initialized = false ;
144
142
bool g_atmi_hostcall_required = false ;
145
143
146
- struct timespec context_init_time;
147
- int context_init_time_init = 0 ;
148
-
149
144
/*
150
145
atlc is all internal global values.
151
146
The structure atl_context_t is defined in atl_internal.h
152
147
Most references will use the global structure prefix atlc.
153
- However the pointer value atlc_p-> is equivalent to atlc.
154
-
155
148
*/
156
-
157
149
atl_context_t atlc = {.struct_initialized = false };
158
- atl_context_t *atlc_p = NULL ;
159
150
160
151
namespace core {
161
152
/* Machine Info */
@@ -243,7 +234,6 @@ atmi_status_t Runtime::Finalize() {
243
234
}
244
235
245
236
static void atmi_init_context_structs () {
246
- atlc_p = &atlc;
247
237
atlc.struct_initialized = true ; /* This only gets called one time */
248
238
atlc.g_hsa_initialized = false ;
249
239
atlc.g_gpu_initialized = false ;
@@ -517,6 +507,7 @@ static hsa_status_t init_compute_and_memory() {
517
507
proc_index++;
518
508
}
519
509
proc_index = 0 ;
510
+ hsa_region_t atl_cpu_kernarg_region;
520
511
atl_cpu_kernarg_region.handle = (uint64_t )-1 ;
521
512
if (cpu_procs.size () > 0 ) {
522
513
err = hsa_agent_iterate_regions (
@@ -533,6 +524,7 @@ static hsa_status_t init_compute_and_memory() {
533
524
exit (1 );
534
525
}
535
526
}
527
+ hsa_region_t atl_gpu_kernarg_region;
536
528
/* Find a memory region that supports kernel arguments. */
537
529
atl_gpu_kernarg_region.handle = (uint64_t )-1 ;
538
530
if (gpu_procs.size () > 0 ) {
@@ -650,11 +642,6 @@ atmi_status_t atl_init_gpu_context() {
650
642
if (err != HSA_STATUS_SUCCESS)
651
643
return ATMI_STATUS_ERROR;
652
644
653
- if (context_init_time_init == 0 ) {
654
- clock_gettime (CLOCK_MONOTONIC_RAW, &context_init_time);
655
- context_init_time_init = 1 ;
656
- }
657
-
658
645
err = hsa_amd_register_system_event_handler (callbackEvent, NULL );
659
646
if (err != HSA_STATUS_SUCCESS) {
660
647
printf (" [%s:%d] %s failed: %s\n " , __FILE__, __LINE__,
0 commit comments