[Openmp-commits] [openmp] [OpenMP] Enable automatic unified shared memory on MI300A. (PR #77512)
Joseph Huber via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 16 14:23:42 PST 2024
================
@@ -2728,6 +2780,34 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
return Err;
}
+ /// Detect if current architecture is an APU.
+ Error checkIfAPU() {
+ llvm::StringRef StrGfxName(ComputeUnitKind);
+ IsAPU = llvm::StringSwitch<bool>(StrGfxName)
+ .Case("gfx940", true)
+ .Default(false);
+ if (IsAPU)
+ return Plugin::success();
+
+ bool MayBeAPU = llvm::StringSwitch<bool>(StrGfxName)
+ .Case("gfx942", true)
+ .Default(false);
+ if (!MayBeAPU)
+ return Plugin::success();
+ else {
----------------
jhuber6 wrote:
What's with this `else`? If we returned then it shouldn't be necessary.
https://github.com/llvm/llvm-project/pull/77512
More information about the Openmp-commits
mailing list