Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLVM and SPIRV-LLVM-Translator pulldown (WW36 2024) #15322

Merged
merged 1,753 commits into from
Sep 13, 2024
Merged

Conversation

iclsrc
Copy link
Contributor

@iclsrc iclsrc commented Sep 6, 2024

Jlalond and others added 30 commits August 15, 2024 16:29
Reapply #100443 and #101770. These were originally reverted due to a
test failure and an MSAN failure. I changed the test attribute to
restrict to x86 (following the other existing tests). I could not
reproduce the test or the MSAN failure and no repo steps were provided.
… (#104406)

ORC supports loading relocatable object files into a JIT'd process. The
raw "add object file" API (ObjectLayer::add) accepts plain relocatable
object files as llvm::MemoryBuffers only and does not check that the
object file's format or architecture are compatible with the process
that it will be linked in to. This API is flexible, but places the
burden of error checking and universal binary support on clients.

This commit introduces a new utility, loadRelocatableObject, that takes
a path to load and a target triple and then:
1. If the path does not exist, returns a FileError containing the
invalid path.
2. If the path points to a MachO universal binary, identifies and
returns MemoryBuffer covering the slice that matches the given triple
(checking that the slice really does contains a valid MachO relocatable
object with a compatible arch).
3. If the path points to a regular relocatable object file, verifies
that the format and architecture are compatible with the triple.

Clients can use loadRelocatableObject in the common case of loading
object files from disk to simplify their code.

Note: Error checking for ELF and COFF is left as a FIXME.

rdar://133653290
This patch implements sandboxir::UnaryOperator mirroring
llvm::UnaryOperator.
…ons (#93301)

This workflow produces a list of users that should be moved to the LLVM
Triagers team. An admin will review the list and then manually move
people to the LLVM Triagers Team.

I've also added some documentation to the Developer Policy about the
Triage Role.

See
https://discourse.llvm.org/t/rfc2-new-criteria-for-commit-access/77110
for more details.
Printing globals registration is internal debug
tracing and should be controlled with verbosity.
# Part 1: Correctly fix a usage of `PATH_MAX`

TL;DR: Adding a typedef `lldb_private::PathSmallString` which contains a
hardcoded initial size (128).

# Part 2: Fix unit tests

After llvm/llvm-project#104493 fixed the build
break for Windows, unit test failure showed up for Windows. The
root-cause is that the `FileSpec`'s in the unit tests are not
style-specific. The fix is to apply either `WindowsSpec` or `PosixSpec`
specifically.
This PR intends to optimize away `hlfir.elemental` operations, which
leave temporary buffers (`allocmem`) in FIR. We typically see elemental
operations in the arguments of reduction intrinsics, so extending
`OptimizedBufferization` shall be the first solution to get heap-free
code.

Here we newly handle `minval`/`maxval` along with other reduction
intrinsics. Those functions over elemental become do loops. Furthermore,
we take the same action with `hlfir.designate` in order to inline more
intrinsics, which otherwise call runtime routines.
Commit 3e1d4ec introduced a dependence on BinaryFormat, but CMakeLists.txt
was not updated to include it.
OpenBSD now has sys/auxv.h but does not use getauxval.
The testcase requires both of these targets.
…+ (#102851)

Godbolt for reference: https://godbolt.org/z/ovKjvWc46

I can confirm that this extension is no longer valid in VS2017, VS2019
and VS2022 under `/permissive` and `/permissive-`

MSDN, https://learn.microsoft.com/en-us/cpp/porting/visual-cpp-what-s-new-2003-through-2015?view=msvc-170, says this extension was officially removed in VS2015.
…04527)

Commit tests that track the current behavior when the mask argument to a
llvm.masked.load or llvm.masked.store is a splat of a con-constant value
(that is, it does nothing special).
Change default validator version to 1.8 in Options.td. 
Remove the default value set in HLSL.cpp.

Fixes #102963

This also helps #99910.
This patch adds check for new_shape of `tosa.reshape`. Tensor dimension
with size less than -1 is invalid. Fix #103062.
…MULHS/MULHU (#104518)

Type legalization lacks generic support for these operations. They are
normally only created when the type is legal. This scalarization case is
new.

We could update type legalization, but there some corner cases that make
it not straightforward. For example, if the promoted type isn't 2x the
narrow type we need to over promote.

Fixes #104480
…01568)

To run integration tests using qemu-aarch64 on x64 host, below flags are
added to the cmake command when building mlir/llvm:

      -DMLIR_INCLUDE_INTEGRATION_TESTS=ON \
      -DMLIR_RUN_ARM_SVE_TESTS=ON \
      -DMLIR_RUN_ARM_SME_TESTS=ON \
      -DARM_EMULATOR_EXECUTABLE="<...>/qemu-aarch64" \
      -DARM_EMULATOR_OPTIONS="-L /usr/aarch64-linux-gnu" \

-DARM_EMULATOR_MLIR_CPU_RUNNER_EXECUTABLE="<llvm_arm64_build_top>/bin/mlir-cpu-runner-arm64"
\
      -DARM_EMULATOR_LLI_EXECUTABLE="<llvm_arm64_build_top>/bin/lli" \
      -DARM_EMULATOR_UTILS_LIB_DIR="<llvm_arm64_build_top>/lib"

The last three above are prebuilt on, or cross-built for, an aarch64
host.

This patch introduced substittutions of "%native_mlir_runner_utils" etc. and use
them in SVE/SME integration tests. When configured to run using qemu-aarch64,
mlir runtime util libs will be loaded from ARM_EMULATOR_UTILS_LIB_DIR, if set.

Some tests marked with 'UNSUPPORTED: target=aarch64{{.*}}' are still run
when configured with ARM_EMULATOR_EXECUTABLE and the default target is
not aarch64.
A lit config feature 'mlir_arm_emulator' is added in
mlir/test/lit.site.cfg.py.in and to UNSUPPORTED list of such tests.
llvm/llvm-project#104404 broke the Windows
buildbot (https://lab.llvm.org/buildbot/#/builders/107/builds/1926).
This fixes forward by updating the flags in the tests accordingly.
…104461)

This teaches lowerVECTOR_REVERSE to handle fixed length vectors, and
then lowers reverse vector_shuffles through it.

The motiviation for this is to allow fixed length vectors to share a
potential optimization on vector_reverse in an upcoming patch (splitting
up LMUL > 1 vrgathers.vv)
Copy link
Contributor

@smanna12 smanna12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CFE changes LGTM

@jsji
Copy link
Contributor

jsji commented Sep 13, 2024

@intel/llvm-gatekeepers I think this is ready for merge (with two follow issue opened) .Thanks.

@bader
Copy link
Contributor

bader commented Sep 13, 2024

/merge

@bb-sycl
Copy link
Contributor

bb-sycl commented Sep 13, 2024

Fri 13 Sep 2024 11:16:51 PM UTC --- Start to merge the commit into sycl branch. It will take several minutes.

@bb-sycl
Copy link
Contributor

bb-sycl commented Sep 13, 2024

Fri 13 Sep 2024 11:21:29 PM UTC --- Merge the branch in this PR to base automatically. Will close the PR later.

@bb-sycl bb-sycl merged commit cf2e781 into sycl Sep 13, 2024
235 of 247 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disable-lint Skip linter check step and proceed with build jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.