- Feb 14, 2023
-
-
eopXD authored
Before this commit, vector float 16 types (e.g. `vfloat16m1_t`) of RVV is only defined when extension `zvfh` is defined. However this generate inaccurate diagnostics like: ``` error: unknown type name 'vfloat16m1_t' ``` This commit improves the compiler by guarding type check correctly under semantic analysis. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D143657
-
Jie Fu authored
/data/jiefu/llvm-project/mlir/lib/Dialect/GPU/TransformOps/GPUTransformOps.cpp:430:13: error: unused variable 'indexType' [-Werror,-Wunused-variable] IndexType indexType = rewriter.getIndexType(); ^ 1 error generated. -
Thomas Raoux authored
This allows user to give both the thread ids and dimension of the threads we want to distribute on. This means we can use it to distribute on warps as well. Reviewed By: harsh Differential Revision: https://reviews.llvm.org/D143950
-
Peter Klausler authored
Require BIND(C) interoperable names to be valid C identifiers. Differential Revision: https://reviews.llvm.org/D143833
-
Peter Klausler authored
Every component of a BIND(C) interoperable derived type must have an interoperable type. Semantics was checking components with derived types, but not components with intrinsic types. Differential Revision: https://reviews.llvm.org/D143832
-
Adrian Vogelsgesang authored
-
Peter Klausler authored
A reference to a pointer-valued function is a "variable" in the argot of the Fortran standard, and can be the left-hand side of an assignment statement or passed as a definable actual argument -- but it is not a definable pointer, and cannot be associated with a pointer dummy argument that is not INTENT(IN). Differential Revision: https://reviews.llvm.org/D143827
-
Peter Klausler authored
When a derived type has a PRIVATE type-bound generic binding for a defined ASSIGNMENT(=), don't use it in scopes outside of the module that defines the type. We already get this case right for other type-bound generics, including defined operators, and for non-type-bound generic interfaces, but the check was not applied for this case. Differential Revision: https://reviews.llvm.org/D143826
-
Pranav Kant authored
This reverts commit be7d7ca1. This commit was made to fix be7d7ca1 which got reverted in 620b3d9b. We need to revert this commit as well because types in log statements are 32 bit again.
-
Daniel Thornburgh authored
This CMake option builds/installs LLDB as part of the Fuchsia toolchain. Once this is better supported, the effects of this will be inlined into the toolchain cache file. Reviewed By: phosek Differential Revision: https://reviews.llvm.org/D143794
-
Peter Klausler authored
When the source or mold of a reference to the intrinsic function TRANSFER() has a derived type with a direct component that contains a descriptor, such as an allocatable or a pointer, emit a warning. User programs should never access descriptors directly. Differential Revision: https://reviews.llvm.org/D143823
-
Wolfgang Pieb authored
The module flag was introduced with commit 5d07e044.
-
Peter Klausler authored
A scalar value in a structure constructor may correspond to an array component in the derived type only when that component has a shape to which the scalar value may be expanded. Differential Revision: https://reviews.llvm.org/D143822
-
Jason Molenda authored
In https://reviews.llvm.org/D122373 I delayed the search for the SDK filepath until the simulator platform is Created. In the qProcessInfo binary-addresses key, I have to force-Create every platform to find one that can handle a kernel fileset; this forced all of the simulator platforms to create, taking the SDK filepath discovery perf hit. This patch delays that path search further until the Apple Simulator platform calls a method that actually needs the full filepath; it saves the SDK name ("WatchSimulator.sdk" etc) until it needs to expand it. Differential Revision: https://reviews.llvm.org/D143932 rdar://103380717
-
Chia-hung Duan authored
Because of lock contention, we temporarily disabled the printing of regions' status when it's exhausted. Given that it's useful when the Region OOM happens, this CL brings it back without lock contention. Differential Revision: https://reviews.llvm.org/D141955
-
Chia-hung Duan authored
We didn't acquire the mutex while accessing those lock protected data, this CL fixes it and now we don't need to disable the allocator while reading its states. Differential Revision: https://reviews.llvm.org/D142149
-
Peter Klausler authored
Fortran 2018 defines some flavors of dummy arguments to require exact matching of character lengths between dummy and actual arguments; these situations tend to be those in which the interface must be explicit and a descriptor is involved: assumed shape, assumed rank, allocatable, and pointer. Fortran allows an actual argument in other cases to have a longer length than the dummy argument; as a common extension, we support a shorter actual argument as well by means of blank padding, but should emit a warning. Differential Revision: https://reviews.llvm.org/D143821
-
bixia1 authored
This is to prepare for implementing the C API for reading a COO tensor to the given buffers for indices and values. Reviewed By: wrengr Differential Revision: https://reviews.llvm.org/D143861
-
Peter Klausler authored
Emit an error when the NCOPIES= argument to the intrinsic function REPEAT has a negative value. (The current implementation crashes, which isn't informative.) Differential Revision: https://reviews.llvm.org/D143820
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D143929
-
Joseph Huber authored
Summary: This hack with stub files is used to make the final object archive have human-understandable names. We currently output these into the current binary directory, which sometimes interferes with the actual source file. Put these in their own directory to be certain they don't conflict.
-
Peter Klausler authored
Some compiler (not specified) reported to issue an error on a "default:" clause in a switch statement whose cases cover all of the values of an "enum class". Since other compilers/versions are known to complain in the other direction, change the switch statement to a cascade of ifs.
-
Alexander Yermolovich authored
This reverts commit f36fe009.
-
Nawrin Sultana authored
Current runtime implementation only checks for target allocator when libmemkind is not available. This patch adds checks for target allocator regardless of the presence of libmemkind library. Differential Revision: https://reviews.llvm.org/D142582
-
Jakub Kuderski authored
Make `tosa.apply_scale` implement `VectorUnrollOpInterface` so that we can unroll it. Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D143944
-
Peter Jung authored
Source tarball's are used from some distribution to build the project Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D143809
-
Benjamin Kramer authored
-
Fanbo Meng authored
Reviewed By: abhina.sreeskantharajan, zibi Differential Revision: https://reviews.llvm.org/D143916
-
Kévin Petit authored
https://reviews.llvm.org/D134040 Patch by: Aaron Greig <aaron.greig@codeplay.com>
-
Florian Hahn authored
The current implementation may return true for A < B and B < A, which may cause issues if the sort implementation assures this property of the comperator. This should fix a crash with MSVC.
-
Markus Böck authored
This patch contains the changes required to make the vast majority of integration and runner tests run on Windows. Historically speaking, the JIT support for Windows has been lacking behind, but recent versions of ORC JIT have now caught up and works for basically all examples in repo. Sadly due to these tests previously not working on Windows, basically all of them are making unix-like assumptions about things like filenames, paths, shell syntax etc. This patch fixes all these issues in one big swoop and enables Windows support for the vast majority of integration tests. More specifically, following changes had to be done: * The various JIT runners used paths to the runtime libraries that assumed a Unix toolchain layout and filenames. I abstracted the specific path and filename of these runtime libraries away by making the paths to the runtime libraries be passed from cmake into lit. This now also allows a much more convenient syntax: `--shared-libs=%mlir_c_runner_utils` instead of `--shared-libs=%mlir_lib_dir/lib/libmlir_c_runner_utils%shlibext` * Some tests using python set environment variables using the `ENV=VALUE cmd` format. This works on Unix, but on Windows it has to prefixed using `env ENV=VALUE cmd` * Some tests used C functions that are simply not available or exported on Windows (`fabsf`, `aligned_alloc`). These tests have either been adjusted or explicitly marked as `UNSUPPORTED` Some tests remain disabled on Windows as before: * In SparseTensor some tests have non-trivial logic for finding the runtime libraries which seems to be required for the use of emulators. I do not have the time to port these so I simply kept them disabled * Some tests requiring special hardware which I simply cannot test remain disabled on Windows. These include usage of AVX512 or AMX The tests for `mlir-vulkan-runner` and `mlir-spirv-runner` all work now as well and so do the vast majority of `mlir-cpu-runner`. Differential Revision: https://reviews.llvm.org/D143925
-
Markus Böck authored
Part of https://discourse.llvm.org/t/rfc-switching-the-llvm-dialect-and-dialect-lowerings-to-opaque-pointers/68179 This patch adds the pass option and required changes to the patterns to support the emission of LLVM IR opaque pointers. Given how close SPIRV semantics are to LLVM IR semantics this boils down to just a few changes: * Making sure that GEP and alloca are built with the explicit base pointer type * creating opaque pointers instead of typed pointers if requested * omitting pointer to pointer bitcasts Differential Revision: https://reviews.llvm.org/D143900
-
Markus Böck authored
`llvm.bitcast` has so far not had a verifier and this allowed various bugs to sneak into the codebase (including within tests!) which could only be caught once translated to actual LLVM IR. This patch fixes those problematic cases by now verifying bitcasts on pointers are done correctly. Specifically, it verifies that if pointers are involved, that both result and source types are pointers, that this also applies to vector of pointers and that pointer casts are of the same address space. The only thing left unverified is the general case of "source type size does not match result type size". I think this case is less trivial and more prone to false positives, so I did not yet implement it. Differential Revision: https://reviews.llvm.org/D143868
-
Markus Böck authored
The runtime functions `memset` and `memcpy` are lowered are declared with pointers to the default address space (0) while their ops however are compatible with memrefs taking any address space. Such cases do not cause any issues with MLIRs LLVM Dialect due to `bitcast`s verifier being too lenient at the moment, but actual LLVM IR does not allow casting between address spaces using `bitcast`: https://godbolt.org/z/3a1z97rc9 This patch fixes the issue by inserting an address space cast before the bitcast, to first cast the pointer into the correct address space before doing the bitcast. Differential Revision: https://reviews.llvm.org/D143866
-
Kai Sasaki authored
Trying to fold the unranked tensor for "tosa.equal" crashes due to null reference. We need to check the dynamic cast result beforehand. This is reported in https://github.com/llvm/llvm-project/issues/60192. Reviewed By: rsuderman Differential Revision: https://reviews.llvm.org/D143034
-
Alexander Yermolovich authored
This came out of from https://discourse.llvm.org/t/dwarf-dwp-4gb-limit/63902 With big binaries we can have .dwp files where .debug_info.dwo section can grow beyond 4GB. We would like to support this in LLVM and in LLDB. The plan is to enable manual parsing of cu/tu index in DWARF library (https://reviews.llvm.org/D137882), and then switch internal index data structure to 64 bit. For the second part is to enable 64bit offset support in LLDB with this patch. Depends on D139955 Reviewed By: labath Differential Revision: https://reviews.llvm.org/D138618
-
Tue Ly authored
-
Peter Klausler authored
When a DATA statement initializes a substring with a character constant of the wrong length, do the right thing with blank padding or truncation, and emit a warning. Current code is crashing due to an unhandled error reported from the low-level data image initialization framework. Differential Revision: https://reviews.llvm.org/D143819
-
Sam Clegg authored
This is current limit in v8. See https://github.com/WebAssembly/memory64/issues/33 how we might change this in the future. Differential Revision: https://reviews.llvm.org/D143783
-
Joseph Huber authored
This is the first attempt to get some testing support for GPUs in LLVM's libc. We want to be able to compile for and call generic code while on the device. This is difficult as most GPU applications also require the support of large runtimes that may contain their own bugs (e.g. CUDA / HIP / OpenMP / OpenCL / SYCL). The proposed solution is to provide a "loader" utility that allows us to execute a "main" function on the GPU. This patch implements a simple loader utility targeting the AMDHSA runtime called `amdhsa_loader` that takes a GPU program as its first argument. It will then attempt to load a predetermined `_start` kernel inside that image and launch execution. The `_start` symbol is provided by a `start` utility function that will be linked alongside the application. Thus, this should allow us to run arbitrary code on the user's GPU with the following steps for testing. ``` clang++ Start.cpp --target=amdgcn-amd-amdhsa -mcpu=<arch> -ffreestanding -nogpulib -nostdinc -nostdlib -c clang++ Main.cpp --target=amdgcn-amd-amdhsa -mcpu=<arch> -nogpulib -nostdinc -nostdlib -c clang++ Start.o Main.o --target=amdgcn-amd-amdhsa -o image amdhsa_loader image <args, ...> ``` We determine the `-mcpu` value using the `amdgpu-arch` utility provided either by `clang` or `rocm`. If `amdgpu-arch` isn't found or returns an error we shouldn't run the tests as the machine does not have a valid HSA compatible GPU. Alternatively we could make this utility in-source to avoid the external dependency. This patch provides a single test for this untility that simply checks to see if we can compile an application containing a simple `main` function and execute it. The proposed solution in the future is to create an alternate implementation of the LibcTest.cpp source that can be compiled and launched using this utility. This approach should allow us to use the same test sources as the other applications. This is primarily a prototype, suggestions for how to better integrate this with the existing LibC infastructure would be greatly appreciated. The loader code should also be cleaned up somewhat. An implementation for NVPTX will need to be written as well. Reviewed By: sivachandra, JonChesterfield Differential Revision: https://reviews.llvm.org/D139839
-