[Openmp-commits] [openmp] d8b0f00 - [libomptarget] Add HSA definitions for memory faults to dynamic_hsa
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Fri Dec 16 05:07:37 PST 2022
Author: Joseph Huber
Date: 2022-12-16T07:06:44-06:00
New Revision: d8b0f007cb98ae261b65204f3e9c452937f8b91f
URL: https://github.com/llvm/llvm-project/commit/d8b0f007cb98ae261b65204f3e9c452937f8b91f
DIFF: https://github.com/llvm/llvm-project/commit/d8b0f007cb98ae261b65204f3e9c452937f8b91f.diff
LOG: [libomptarget] Add HSA definitions for memory faults to dynamic_hsa
Summary:
We use the dynamic HSA file to forward declare needed definitions from
the HSA runtime if not present at build time. These definitions were not
included so using them caused problems on systems without it if used.
Just add them.
Added:
Modified:
openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa_ext_amd.h
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa_ext_amd.h b/openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa_ext_amd.h
index d27be935ac0f5..619bab471a70b 100644
--- a/openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa_ext_amd.h
+++ b/openmp/libomptarget/plugins/amdgpu/dynamic_hsa/hsa_ext_amd.h
@@ -125,6 +125,17 @@ hsa_status_t
hsa_amd_register_system_event_handler(hsa_amd_system_event_callback_t callback,
void *data);
+typedef enum {
+ HSA_AMD_MEMORY_FAULT_PAGE_NOT_PRESENT = 1 << 0,
+ HSA_AMD_MEMORY_FAULT_READ_ONLY = 1 << 1,
+ HSA_AMD_MEMORY_FAULT_NX = 1 << 2,
+ HSA_AMD_MEMORY_FAULT_HOST_ONLY = 1 << 3,
+ HSA_AMD_MEMORY_FAULT_DRAMECC = 1 << 4,
+ HSA_AMD_MEMORY_FAULT_IMPRECISE = 1 << 5,
+ HSA_AMD_MEMORY_FAULT_SRAMECC = 1 << 6,
+ HSA_AMD_MEMORY_FAULT_HANG = 1 << 31
+} hsa_amd_memory_fault_reason_t;
+
#ifdef __cplusplus
}
#endif
More information about the Openmp-commits
mailing list