@@ -319,6 +319,8 @@ std::optional<TargetDetails> getAMDGPUTargetDetails(StringRef target) {
319319 const WgpDetails *rdna2Wgp = getRDNA2WgpDetails ();
320320 const WgpDetails *rdna1Wgp = getRDNA1WgpDetails ();
321321
322+ // --- CDNA --- //
323+
322324 // "AMD Instinct MI300 Series Product Offerings" in Page 23 of
323325 // https://www.amd.com/content/dam/amd/en/documents/instinct-tech-docs/white-papers/amd-cdna-3-white-paper.pdf
324326 static const ChipDetails mi300xChip = {304 , " mi300x" };
@@ -336,20 +338,29 @@ std::optional<TargetDetails> getAMDGPUTargetDetails(StringRef target) {
336338 // https://www.amd.com/content/dam/amd/en/documents/instinct-business-docs/white-papers/amd-cdna-white-paper.pdf
337339 static const ChipDetails mi100Chip = {120 , " mi100" };
338340
341+ // --- RDNA --- //
342+
343+ // With RDNA, two Compute Units form a Workgroup Processor (WGP).
344+ // A kernel can be dispatched in either the CU mode or the WGP mode (where
345+ // some resources like LDS are accessible to both CUs). The default with HIP
346+ // is the WGP mode. For the purpose of distribution heuristics, we divide the
347+ // number of CU reported in the hardware spaces by two to get the number of
348+ // WGPs.
349+
339350 // AMD RDNA4 architecture:
340351 // https://www.amd.com/en/newsroom/press-releases/2025-2-28-amd-unveils-next-generation-amd-rdna-4-architectu.html.
341- static const ChipDetails rx9070xtChip = {64 , " rx9070xt" };
342- static const ChipDetails rx9070Chip = {56 , " rx9070" };
352+ static const ChipDetails rx9070xtChip = {64 / 2 , " rx9070xt" };
353+ static const ChipDetails rx9070Chip = {56 / 2 , " rx9070" };
343354
344355 // AMD RDNA3.
345- static const ChipDetails rx7900xtxChip = {96 , " rx7900xtx" };
346- static const ChipDetails rx7900xtChip = {84 , " rx7900xt" };
347- static const ChipDetails rx7800xtChip = {60 , " rx7800xt" };
348- static const ChipDetails rx7700xtChip = {54 , " rx7700xt" };
349- static const ChipDetails v710Chip = {54 , " v710" };
350- static const ChipDetails w7900Chip = {96 , " w7900" };
351- static const ChipDetails w7800Chip = {70 , " w7800" };
352- static const ChipDetails w7700Chip = {48 , " w7700" };
356+ static const ChipDetails rx7900xtxChip = {96 / 2 , " rx7900xtx" };
357+ static const ChipDetails rx7900xtChip = {84 / 2 , " rx7900xt" };
358+ static const ChipDetails rx7800xtChip = {60 / 2 , " rx7800xt" };
359+ static const ChipDetails rx7700xtChip = {54 / 2 , " rx7700xt" };
360+ static const ChipDetails v710Chip = {54 / 2 , " v710" };
361+ static const ChipDetails w7900Chip = {96 / 2 , " w7900" };
362+ static const ChipDetails w7800Chip = {70 / 2 , " w7800" };
363+ static const ChipDetails w7700Chip = {48 / 2 , " w7700" };
353364
354365 // See https://llvm.org/docs/AMDGPUUsage.html#processors for gfxN to
355366 // cdnaN/rdnaN mapping.
0 commit comments