diff --git a/openmp/libomptarget/plugins/amdgpu/impl/atmi.h b/openmp/libomptarget/plugins/amdgpu/impl/atmi.h --- a/openmp/libomptarget/plugins/amdgpu/impl/atmi.h +++ b/openmp/libomptarget/plugins/amdgpu/impl/atmi.h @@ -34,70 +34,4 @@ } atmi_memtype_t; /** @} */ - -/** \defgroup common Common ATMI Structures - * @{ - */ - -/** - * @brief ATMI Memory Space/region Structure - */ -typedef struct atmi_memory_s { - /** - * Memory capacity - */ - unsigned long int capacity; - /** - * Memory type - */ - atmi_memtype_t type; -} atmi_memory_t; - -/** - * @brief ATMI Device Structure - */ -typedef struct atmi_device_s { - /** - * Device type: CPU, GPU or DSP - */ - atmi_devtype_t type; - /** - * Array of memory spaces/regions that are accessible - * from this device. - */ - atmi_memory_t *memories; -} atmi_device_t; - -/** - * @brief ATMI Machine Structure - */ -typedef struct atmi_machine_s { - /** - * The number of devices categorized by the device type - */ - unsigned int device_count_by_type[ATMI_DEVTYPE_ALL]; - /** - * The device structures categorized by the device type - */ - atmi_device_t *devices_by_type[ATMI_DEVTYPE_ALL]; -} atmi_machine_t; - -// Below are some helper macros that can be used to setup -// some of the ATMI data structures. -#define ATMI_PLACE_GPU(node, gpu_id) \ - { .node_id = node, .type = ATMI_DEVTYPE_GPU, .device_id = gpu_id } - -#define ATMI_MEM_PLACE_CPU_MEM(node, cpu_id, cpu_mem_id) \ - { \ - .node_id = node, .dev_type = ATMI_DEVTYPE_CPU, .dev_id = cpu_id, \ - .mem_id = cpu_mem_id \ - } -#define ATMI_MEM_PLACE_GPU_MEM(node, gpu_id, gpu_mem_id) \ - { \ - .node_id = node, .dev_type = ATMI_DEVTYPE_GPU, .dev_id = gpu_id, \ - .mem_id = gpu_mem_id \ - } -#define ATMI_MEM_PLACE(d_type, d_id, m_id) \ - { .node_id = 0, .dev_type = d_type, .dev_id = d_id, .mem_id = m_id } - #endif // INCLUDE_ATMI_H_ diff --git a/openmp/libomptarget/plugins/amdgpu/impl/system.cpp b/openmp/libomptarget/plugins/amdgpu/impl/system.cpp --- a/openmp/libomptarget/plugins/amdgpu/impl/system.cpp +++ b/openmp/libomptarget/plugins/amdgpu/impl/system.cpp @@ -355,8 +355,6 @@ } size_t num_procs = cpu_procs.size() + gpu_procs.size(); - atmi_device_t *all_devices = reinterpret_cast( - malloc(num_procs * sizeof(atmi_device_t))); int num_iGPUs = 0; int num_dGPUs = 0; for (uint32_t i = 0; i < gpu_procs.size(); i++) { @@ -378,8 +376,6 @@ int gpus_end = cpu_procs.size() + gpu_procs.size(); int proc_index = 0; for (int i = cpus_begin; i < cpus_end; i++) { - all_devices[i].type = cpu_procs[proc_index].type(); - std::vector memories = cpu_procs[proc_index].memories(); int fine_memories_size = 0; int coarse_memories_size = 0; @@ -400,8 +396,6 @@ } proc_index = 0; for (int i = gpus_begin; i < gpus_end; i++) { - all_devices[i].type = gpu_procs[proc_index].type(); - std::vector memories = gpu_procs[proc_index].memories(); int fine_memories_size = 0; int coarse_memories_size = 0;