[OpenMP][offload] Size only reductions that fill the device by their size
A cross-team reduction whose loop is too short for one block per compute
unit now gets the grid of a kernel without a reduction. In SPMD mode,
that is the low-trip-count rule, which lowers the number of threads per
block to spread the iterations over more compute units. Keeping all
threads made such reductions, e.g. one of 1792 iterations, up to 2.5x
slower on MI210.
Claude assisted with this patch.
[OpenMP][offload] Size the grid of cross-team reductions by their size
Every block adds to the cost of combining the partial results of a
cross-team reduction. Launch one block per compute unit for reductions
that work with a reduction data size of more than 32 bytes, and enough
blocks for a per-device number of waves per compute unit (16 on AMDGPU)
for the smaller reduction data sizes, capped by the trip count. Such
kernels keep their number of threads: the low-trip-count reduction of
threads does not apply to them. libomptarget reads the number of compute
units and the platform backend of the device through liboffload, as part
of its geometry properties.
This is an upstream port of the corresponding downstream.
Claude assisted with this patch.
[OpenMP][offload] Trade threads for blocks in Generic-SPMD kernels
The threads of a Generic-SPMD block run the inner parallel loops, whose
trip counts are unknown. Halve the threads down to one warp while the
distribute loop has an iteration for every block, and default to 6
blocks per CU on AMDGPU (LIBOMPTARGET_AMDGPU_GENERIC_SPMD_TEAMS_PER_CU).
libomptarget reads the number of compute units and the platform backend
of the device through liboffload, as part of its geometry properties.
This is an upstream port of the corresponding downstream.
Claude assisted with this patch.
devel/py-evdev: Use the evdev headers from base
evdev 1.9 expects the UI_FF_* constants from uinput.h, but the port
generated its ecodes module only from devel/evdev-proto's
linux/input.h and linux/input-event-codes.h, so "import evdev" fails
with KeyError: 'UI_FF'.
files/patch-v4l_compat, added with the port in 2015 when base had no
dev/evdev headers, removes upstream's #ifdef __FreeBSD__ branches for
<dev/evdev/...> and makes the port build against evdev-proto instead.
Base now installs dev/evdev/input.h, input-event-codes.h and uinput.h,
which evdev's setup.py uses on FreeBSD by default, and build_ext
generates the ecodes module itself. Drop the patch, the evdev-proto
dependency, USES=localbase and the build_ecodes, --evdev-headers and
--include-dirs arguments, and bump PORTREVISION.
The 14.5 and 15.1 base headers define FF_MAX_EFFECTS; older ones
(13.5, 14.2, 14.3, 14.4 and 15.0) lack it, and evdev falls back for it.
[3 lines not shown]
IR: Introduce "debugger-tuning" module flag
Prepare to replace TargetOptions::DebuggerTuning with a module flag. Unlike
other TargetOptions recently moved to module flags, debugger tuning is not a
firm ABI property. Mismatches and unrecognized names are tolerated.
Co-authored-by: Claude Sonnet 5 <noreply at anthropic.com>
CodeGen: Replace TargetOptions::DebuggerTuning with module flag
Read the debugger tuning from the module's "debugger-tuning" flag instead of
TargetOptions. Delete the now-dead -debugger-tune= cl::opt and the
TargetOptions::DebuggerTuning field.
Update the tests relying on it to directly use the module flag. The cases
that exercise multiple values do a text substitution to swap the value.
Alternatively this could be changed to synthesize the module flag in the
llc flag like some of the other widely used module flags do.
Co-authored-by: Claude Sonnet 5 <noreply at anthropic.com>
[AMDGPU] Keep dst flags when unpacking packed F32 instructions (#234858)
performF32Unpacking copied the new instructions' dst operands by value,
so
its setIsUndef and setIsRenamable calls never reached the instructions.
Take
the operands by reference.
Assisted-by: Claude Opus 5.5
AMDGPU: Don't reserve the implicit buffer pointer with architected flat scratch
Mesa shaders always had s[0:1] reserved for the implicit buffer
pointer, which is only needed to set up the scratch buffer
resource. With architected flat scratch, scratch is initialized by the
hardware and the pointer is unused. The driver stopped passing this
pointer so all user SGPRs were off by 2.
Don't reserve it on targets with architected flat scratch, so the user
SGPRs of Mesa shaders start at s0. Diagnose the use in the unsupported
contexts. This fixes many test failures on my system when running
piglit.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[MIR] Address review: merge error tests, un-lambda count parsing
Merge the three "ops:N" error tests into one with split-file, move the
operand count parsing out of a lambda into MIParser, and shorten the
round-trip test's comment.
Assisted-by: Claude Opus 5.5
Remove KDE Cervisia
No longer part of KDE Gear since 25.04.3 (Qt5/KF5).
No one needs a graphical front end for CVS anymore. No one needs CVS anymore,
some people still have to use it.
AMDGPU: Use S_ADD_I32 to select uniform uaddsat (#235242)
95ff1fa00ed4 selected uniform uaddsat.i32 to an S_ADD_U32 sequence.
S_ADD_U32 defines a carry out, so when the instructions have to be
moved to the VALU it is replaced with V_ADD_CO_U32_e32, which doesn't
exist on gfx10+. This would later assert when encoded. moveToVALU
should probably learn to handle that correctly, or at least assert.
The carry isn't needed, so use S_ADD_I32 like the usubsat pattern,
which is moved to V_ADD_U32_e64 where available.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>