[all-commits] [llvm/llvm-project] 1b3472: [AMDGPU] Fix computation of waves/EU maximum (#140...

Lucas Ramirez via All-commits all-commits at lists.llvm.org
Wed May 21 17:46:20 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b347223023ddbe6c52dc1d48ec90a52407c4ca0
      https://github.com/llvm/llvm-project/commit/1b347223023ddbe6c52dc1d48ec90a52407c4ca0
  Author: Lucas Ramirez <11032120+lucas-rami at users.noreply.github.com>
  Date:   2025-05-22 (Thu, 22 May 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
    M llvm/test/CodeGen/AMDGPU/attr-amdgpu-waves-per-eu.ll

  Log Message:
  -----------
  [AMDGPU] Fix computation of waves/EU maximum (#140921)

This fixes an issue in the waves/EU range calculation wherein, if the
`amdgpu-waves-per-eu` attribute exists and is valid, the entire
attribute may be spuriously and completely ignored if workgroup sizes
and LDS usage restrict the maximum achievable occupancy below the
subtarget maximum. In such cases, we should still honor the requested
minimum number of waves/EU, even if the requested maximum is higher than
the actually achievable maximum (but still within subtarget
specification).

As such, the added unit test `empty_at_least_2_lds_limited`'s waves/EU
range should be [2,4] after this patch, when it is currently [1,4] (i.e,
as if `amdgpu-waves-per-eu` was not specified at all).

Before e377dc4 the default maximum waves/EU was always set to the
subtarget maximum, trivially avoiding the issue.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list