Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[amdgpu] Default to 1.0, instead of unspecified, for dynamic hsa #74098

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

JonChesterfield
Copy link
Collaborator

The plugin checks the values of HSA_AMD_INTERFACE_VERSION_* so we now set them to something safe in the header.

@llvmbot
Copy link
Collaborator

llvmbot commented Dec 1, 2023

@llvm/pr-subscribers-backend-amdgpu

Author: Jon Chesterfield (JonChesterfield)

Changes

The plugin checks the values of HSA_AMD_INTERFACE_VERSION_* so we now set them to something safe in the header.


Full diff: https://github.com/llvm/llvm-project/pull/74098.diff

1 Files Affected:

  • (modified) openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h (+9)
diff --git a/openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h b/openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h
index 188dd2600a610c6..9c59d3bf824de3c 100644
--- a/openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h
+++ b/openmp/libomptarget/plugins-nextgen/amdgpu/dynamic_hsa/hsa_ext_amd.h
@@ -14,6 +14,15 @@
 
 #include "hsa.h"
 
+/* Using this header means we do not know what version library will be linked.
+   Until such point as a CMake level override is requested, default to the
+   minimum. */
+/*
+ * - 1.0 - initial version
+ */
+#define HSA_AMD_INTERFACE_VERSION_MAJOR 1
+#define HSA_AMD_INTERFACE_VERSION_MINOR 0
+
 #ifdef __cplusplus
 extern "C" {
 #endif

Copy link
Contributor

@jhuber6 jhuber6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@JonChesterfield
Copy link
Collaborator Author

Discovered this while debugging openmp's runtime refusing to build but that turned out to be a bug in Debian's packaging, reported on their mailing list.

@JonChesterfield JonChesterfield merged commit f184147 into llvm:main Dec 1, 2023
5 checks passed
@JonChesterfield JonChesterfield deleted the jc_dyn_hsa_version branch December 1, 2023 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants