[mlir][SPIRV] Handle vector stores when unifying aliased resources (#232185)
I hit this while compiling JAX training code to WebGPU through IREE.
The alias-unification pass can select a smaller vector resource, but its
store conversion currently only handles scalars. Handle vector stores by
splitting them into stores of the canonical vector type, preserving
memory-access flags and alignment.
---------
Signed-off-by: anutosh491 <andersonbhat491 at gmail.com>
[mlir][SPIR-V] Add SPIRVToLLVM conversion for CL.ldexp and GL.Ldexp (#237745)
Vector exponents are not covered since llvm.intr.ldexp accepts only a
scalar integer exponent
[llvm-objcopy][MachO] Handle ARM64_RELOC_ADDEND for CPU_TYPE_ARM64_32 (#238296)
`ARM64_RELOC_ADDEND` was only handled for arm64, not arm64_32. On
arm64_32 the addend was read as a section index, so `llvm-objcopy` could
crash or write a wrong addend. Handle it for arm64_32 too, and add an
arm64_32 case to `arm64-relocs.s`.
Fixes #238273
I wrote the code and verified everything myself. Claude Code helped me
identify the issue.
Assisted-by: Claude Code
Reapply [IRBuilder] Assert correct offset width for CreatePtrAdd (#239262)
Reapply #238806 without changes after fixing more CreatePtrAdd uses.
-----
Assert that the offset width matches the pointer index width. This is
supposed to become an IR well-formedness requirement when we switch to
ptradd, so we should start asserting it in the builder now.
Helpers like CreatePtrAddWith(Unsigned|Signed)Offset and
CreatePtrAddWith[SZ]ExtOrTrunc can be used to more conveniently create
ptradds with appropriately sized offsets.
Problematic uses of CreatePtrAdd were already adjusted in #238347.
[MemorySanitizer] Consistently use unsigned offsets (NFC) (#239193)
Helper functions for getting origin/shadow etc accepted a mix of int and
unsigned. I believe all of these offsets are non-negative, so use
unsigned everywhere to avoid confusion.
[RISCV][P-ext] Remove line breaks from argument list of function definition in tests. NFC (#238881)
These line breaks cause the update_llc_test_checks.py script to put the
checks in the middle of the argument list.
misc/py-onnxruntime: Fix loading models with external data
fcntl(F_KINFO) needs kf_structsize set to the size of the structure,
otherwise the kernel refuses the request. Without it the FreeBSD branch
never resolved the path of an opened file, so no model with weights in an
external data file could be loaded.
Pending upstream as microsoft/onnxruntime#33433.
PR: 300445
Approved by: portmgr (blanket)
Sponsored by: Netzkommune GmbH
[mlir][ODS] Include headers required by generated dialect declarations and definitions (#239215)
Generated dialect declarations and definitions use C++ constructs that
are not declared by any header they include. They therefore relied on
the surrounding source file to include these headers first.
The dialect declarations now include the header declaring the dialect
base class, and the headers declaring `StringAttr` and `Operation` if
the dialect has discardable attributes. The dialect definitions include
`MLIRContext.h` if they load dependent dialects.
Similar to #236155 and #238735 but for the dialect generator.
Co-authored-by: Claude <noreply at anthropic.com>
www/py-flask-oauthlib: mark broken and set to expire
the port is broken at runtime with current version of werkzeug in the tree.
Last release of it was 3 years ago and upstream author recommends to switch
to switch to Authlib (security/py-authlib).
PR: 299797
Reported by: Patrick Crandol <patrick at crandol.com>
[LoongArch] Fix misaligned frame-index offset for vldrepl.{h,w,d}
eliminateFrameIndex did not check that the final offset is a multiple of
the access size for [X]VLDREPL_{H,W,D}, so a byte-aligned stack object
could produce an unencodable immediate. Materialize the address in a
scratch register in that case, as is already done for [X]VSTELM_*.
Assisted-by: LLM
www/py-sockjs-tornado: update to 1.0.7
This release fixes runtime with tornado 6.5. Also add unreleased upstream
patch that's fix XSS issue. Port has been switched to pep517 with
porlint warnings fixed.
Pass maintainership to python@
PR: 299792
Reported by: Patrick Crandol <patrick at crandol.com>
[TargetLowering] Use DAG.getLibcalls() in expandMultipleResultFPLibCall (#239150)
`getLibcallLoweringInfo` and the helper `getLibcallImplCallingConv`
access the `Libcalls` from TargetLoweringBase, which is constructed
without the LLVM Module being available. This affects the libcalls
available through module flags like `long-double-type`. SelectionDAG
already consults the module flags, so missing it here can lead
inconsistencies in which libcalls are available.
Fixes: #239145
[Offload][Omp] Decouple RecordReplay from PluginInterface (#236814)
After we broke the `GenericKernelyTy` dependence in the RecordReplay
(RR), most of it became independent from the `PluginInterface`.
This PR moves the RR logic from the `PluginInterface` to libomptarget
and changes RR to use OpenMP errors and liboffload for data transfers.
Still, the _VirtualAddress_ interfaces are not available through the
liboffload API so we use them through temporary helpers.
I purposely didn't move the RR source files from the plugin directory so
the changes in this PR would easier to review. The code will be
reorganized in a follow-up NFC PR.
It was verified by @kevinsala on NVIDIA and AMD gpus.
Assisted by Claude
---------
Co-authored-by: Kevin Sala <salapenades1 at llnl.gov>
Attributor: Only check once if time trace scopes are recorded
Every initialization and update of an abstract attribute opened a
TimeTraceScope, which checks if the time profiler is enabled out of line.
Check it once per Attributor instead. NFC.
CTMark instructions:u with -attributor-enable=light changes by O3 -0.02%,
ThinLTO -0.03%. The attributor-light pass itself is 0.3-0.8% faster
(callgrind), and 0.3-1.9% faster with the other pending Attributor
compile-time changes applied.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
if_bnxt: skip HW kTLS on old firmware and add a tunable to disable it
Older Thor2 firmware serves key context allocation requests very
slowly, about a second each. The driver allocates key contexts in
batches of 128, so setting up 500k sessions takes roughly 3900
requests and driver load appears to hang.
Enable hardware kTLS only when the firmware's HWRM interface version
is 1.10.3.99 or newer. Keep the full four-part version in
hwrm_spec_code_ext for the comparison.
Also add a disable_hw_ktls loader tunable that turns hardware kTLS off
for a device without unloading kTLS support, which helps isolate kTLS
problems in the field.
Reviewed by: gallatin
Sponsored by: Broadcom Inc
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D60977
[2 lines not shown]
if_bnxt: size MRAV from the AV split entry for backing store V2
On RoCE-capable Thor2, attach fails with
HWRM_FUNC_BACKING_STORE_CFG_V2 returning INVALID_PARAMS, as MRAV is
sized the pre-V2 way and the firmware's AV split value is sent as is.
Size MRAV from the AV split entry, and move the legacy entry-count
packing into bnxt_hwrm_func_backing_store_cfg().
Fixes: d5ce906da7c5 ("bnxt_en: Add backing store V2 support")
Reviewed by: gallatin
Sponsored by: Broadcom Inc
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D60976
(cherry picked from commit aca2e5fae3d9c3350b47ee3e7d00937a73dba9a9)
[mlir][nvgpu] Don't swizzle shared memory rows that aren't a power of 2 (#237179)
`nvgpu-optimize-shared-memory` miscompiles memrefs whose rows aren't a
power
of 2 long. The swizzle XORs the index of each 16-byte vector in a row
with low
bits of the row index. When a row holds a power of 2 number of vectors,
the
result is always an index in the same row, so the swizzle only reorders
each
row. Otherwise, the result can be past the end of the row: the access
then
lands in the next row and overwrites one of its vectors, or past the end
of
the buffer for the last rows.
Skip such memrefs and leave their accesses unswizzled.
Assisted-by: Claude