[Openmp-commits] [openmp] [OpenMP] Enable automatic unified shared memory on MI300A. (PR #77512)

via Openmp-commits openmp-commits at lists.llvm.org
Tue Jan 9 19:09:47 PST 2024


================
@@ -2728,6 +2749,30 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
     return Err;
   }
 
+  /// Detect if current architecture is an APU.
+  Error checkIfAPU() {
+    std::string StrGfxName(ComputeUnitKind);
+    std::transform(std::begin(StrGfxName), std::end(StrGfxName),
+                   std::begin(StrGfxName),
+                   [](char c) { return std::tolower(c); });
+    if (StrGfxName == "gfx940") {
+      IsAPU = true;
----------------
carlobertolli wrote:

What other ways do we have to detect an APU? It is either a gfx940 or a gfx942 with a specific chip ID. I don't see any other way to determine this.

https://github.com/llvm/llvm-project/pull/77512


More information about the Openmp-commits mailing list