- Sep 07, 2022
-
-
Anastasia Stulova authored
The comment in the code correctly states the equation for the shape inference as follows: ``` H = ((IH+pad_top+pad_bottom-(dilation_y*(KH-1)+1))/stride_y)+1 ``` However the final operation is generated as `-` instead of `+`. I believe `+` is indeed correct. For example if we have an image with dimension 6 and kernel of dimension 3 (assuming padding is 0 and stride and dilation are both 1) we are expecting 4 elements in the output (computed for image elements `(0, 1, 2) x kernel`, `(1, 2, 3) x kernel`, `(2, 3, 4) x kernel` and `(3, 4, 5) x kernel`. However currently only 2 elements are produced in the output. Reviewed By: NatashaKnk Differential Revision: https://reviews.llvm.org/D133208
-
Peiming Liu authored
The syntax for unrank tensor type is defined as tensor-type ::= `tensor` `<` `*` `x` type `>`, the example code missed the `x` in between. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D133381
-
Fangrui Song authored
I have noticed that this combo makes sense (D133266) but rejected it for simplicity. It turns out to be used by PlayStation, so let's allow it.
-
Vitaly Buka authored
-
Vitaly Buka authored
MemorySanitizerPass function pass violatied requirement 4 of function pass to do not insert globals. Msan nees to insert globals for origin tracking, and paramereters tracking. https://llvm.org/docs/WritingAnLLVMPass.html#the-functionpass-class Reviewed By: kstoimenov, fmayer Differential Revision: https://reviews.llvm.org/D133336
-
River Riddle authored
VSCode doesn't let our extension manage files >50mb. This commit adds a proper diagnostic in this case, and also gives the user an option to open as a temporary .mlir file instead. Differential Revision: https://reviews.llvm.org/D133242
-
Arthur Eubanks authored
Or else with -opt-bisect-limit we don't write ThinLTO bitcode. Reviewed By: asbirlea Differential Revision: https://reviews.llvm.org/D133378
-
Craig Topper authored
The backend now has a 32bit feature as part of the recent mtune patch. We can now use that make our rv32-only builtin error checking work the same way as rv64-only errors. Reviewed By: kito-cheng Differential Revision: https://reviews.llvm.org/D132192
-
River Riddle authored
This allows for extracting assembly information when printing an attribute or type, such as the dialect resources referenced. This functionality is used in a followup that adds resource support to the bytecode. This change also results in a nice cleanup of AsmPrinter now that we don't need to awkwardly workaround optional AsmStates. Differential Revision: https://reviews.llvm.org/D132728
-
Krzysztof Drewniak authored
- Add new operators to BitEnumAttr, mainly not (which only inverts bits that can be valid bits for the attribute) and xor - Add new bit enum utility functions: bitEnumClear(bits, bit) and bitEnumSet(bits, bit, value=true) as they've come up in code I've been writing that makes use of such enums - Add rudimentary tests for the enum generator - Update the OpDefinition documentation to make it contain a correct example and to have it account for the changes mentioned above. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D133374
-
Simon Pilgrim authored
Begin the refactoring to use CostKindTblEntry and return real latency/codesize/sizelatency costs instead of reusing the throughput numbers This should allow us to merge getTypeBasedIntrinsicInstrCost into getIntrinsicInstrCost and remove all remaining references
-
Peiming Liu authored
Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D133368
-
bzcheeseman authored
This change adds an assert to dyn_cast that the value passed-in is present. In the past, this relied on the isa_impl assertion (which still works in many cases) but which we can tighten up for a better QoI. The PointerUnion change is because it seems like (based on the call sites) the semantics of the member dyn_cast are actually dyn_cast_if_present. Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D133221
-
Florian Mayer authored
left/right is a weird way to refer to address ordering. Reviewed By: eugenis, vitalybuka Differential Revision: https://reviews.llvm.org/D132622
-
Aaron Ballman authored
This should address the failure introduced in: https://lab.llvm.org/buildbot/#/builders/92/builds/32377
-
raghavmedicherla authored
Renamed all HSAMD::MetadataStreamer classes to improve readability of the code. Differential Revision: https://reviews.llvm.org/D133156
-
raghavmedicherla authored
Add mapped_file_region::sync(), equivalent to POSIX msync, synchronizing written content to disk without unmapping the region. Asserts if the mode is not mapped_file_region::readwrite. Note that I don't have access to a Windows machine, so I can't easily run those unit tests. Change by dexonsmith Differential Revision: https://reviews.llvm.org/D95494
-
Vitaly Buka authored
It inconsistently fails on bots.
-
Florian Mayer authored
-
Philip Reames authored
Unless I missed something when checking, we only support these in assembly. Given that, documenting them is a good opportunity to define support levels which will be useful for other extensions as well. Differential Revision: https://reviews.llvm.org/D133372
-
Alexander Shaposhnikov authored
This diff adjusts AddedComplexity of BIC to bump its position in the list of patterns to make LLVM pick it instead of MVN + AND. MVN + AND requires 2 cycles, so does e.g. MOV + BIC, but the latter outperforms the former if the instructions producing the operands of BIC can be issued in parallel. One may consider the following example: ldur x15, [x0, #2] # 4 cycles mvn x10, x15 # 1 cycle (depends on ldur) and x9, x10, #0x8080808080808080 vs. ldur x15, [x0, #2] # 4 cycles mov x9, #0x8080808080808080 # 1 cycle (can be executed in parallel with ldur) bic x9, x9, x15. # 1 cycle Test plan: ninja check-all Differential revision: https://reviews.llvm.org/D133345
-
Joseph Huber authored
-
Simon Pilgrim authored
Add missing SSE2 + BMI/NOBMI coverage
-
Florian Mayer authored
left/right is a weird way to refer to address ordering. Reviewed By: eugenis, MaskRay Differential Revision: https://reviews.llvm.org/D132611
-
Jim Ingham authored
-
Jim Ingham authored
-
Alexander Shaposhnikov authored
Skip unions/union-like classes since in this case constructors with empty bodies behave differently in comparison with regular structs/classes. Test plan: ninja check-clang-tools Differential revision: https://reviews.llvm.org/D132713
-
Vitaly Buka authored
After https://reviews.llvm.org/rG463aa814182a23 tsan replaces llvm intrinsics with calls to glibc functions. However this approach is fragile, as slight changes in pipeline can return llvm intrinsics back. In particular InstCombine can do that. Msan/Asan already declare own version of these memory functions for the similar purpose. KCSAN, or anything that uses something else than compiler-rt, needs to implement this callbacks. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D133268
-
Vitaly Buka authored
-
Chenguang Wang authored
Splat of bool is encoded as a byte with all-ones in it [1]. Without this change, this piece of code: auto xs = builder.getI32TensorAttr({42, 42, 42, 42}); auto xs2 = xs.mapValues(builder.getI1Type(), [](const llvm::APInt &x) { return x.isZero() ? llvm::APInt::getZero(1) : llvm::APInt::getAllOnes(1); }); xs2.dump(); Prints: dense<[true, false, false, false]> : tensor<4xi1> Because only the first bit is set. This applies to both DenseIntElementsAttr::mapValues() and DenseFPElementsAttr::mapValues(). [1]: https://github.com/llvm/llvm-project/blob/e877b42e2c70813352c1963ea33e992f481d5cba/mlir/lib/IR/BuiltinAttributes.cpp#L984 Reviewed By: rriddle Differential Revision: https://reviews.llvm.org/D132767 -
Philip Reames authored
This follows the pattern set by e.g. SPIR-V, AMDGPU, and WebAssembly. For the moment, this page is fairly minimal stub. I mostly want a place to record which extensions we support, and when that support is not complete, a central place to note that. I'm deliberately starting with a subset of extensions which are pretty straight forward with only one case needing a detail note. I figure the partial support cases are going to need a bunch of discussion, and having each of them in their own review seemed worthwhile. Similarly, the experimental extensions probably fall into the same bucket of triggering a bunch of review discussion. Differential Revision: https://reviews.llvm.org/D133063
-
Roy Jacobson authored
-
Joseph Huber authored
Summary: A previous patch removed support for the `-fopenmp-new-driver` and accidentally used the `isHostOffloading` flag instead of `isDeviceOffloading` which lead to some build errors when compiling for the offloading device. This patch addresses that.
-
Joseph Huber authored
The changes in D130020 removed all support for the old method of compiling OpenMP offloading programs. This means that `-fopenmp-new-driver` has no effect and `-fno-openmp-new-driver` does not work. This patch removes the use and documentation of this flag. Note that the `--offload-new-driver` flag still exists for using the new driver optionally with CUDA and HIP. Reviewed By: tra Differential Revision: https://reviews.llvm.org/D133367
-
Markus Böck authored
This patch is essentially an alternative to https://reviews.llvm.org/D75836 and was mentioned by @lhames in a comment. The gist of the issue is that Mach-O has restrictions on which kind of sections are allowed after debug info has been emitted, which is also properly asserted within LLVM. Problem is that stack maps are currently emitted as one of the last sections in each target-specific AsmPrinter so far, which would cause the assertion to trigger. The current approach of special casing for the `__LLVM_STACKMAPS` section is not viable either, as downstream users can overwrite the stackmap format using plugins, which may want to use different sections. This patch fixes the issue by emitting the stack map earlier, right before debug info is emitted. The way this is implemented is by taking the choice when to emit the StackMap away from the target AsmPrinter and doing so in the base class. The only disadvantage of this approach is that the `StackMaps` member is now part of the base class, even for targets that do not support them. This is functionaly not a problem however, as emitting an empty `StackMaps` is a no-op. Differential Revision: https://reviews.llvm.org/D132708
-
Joseph Huber authored
OpenMP has a list of of optimistic attributes that can be attached to known runtime functions to aid some analysis. The `omp_get_wtime` function incorrectly used the `readonly` attribute. This is not correct at the `omp_get_wtime` function changes values depending on some external state. This is more correctly modeled with `inaccessiblememonly` meaning that the value does not depend on anything within the module, but can not be removes as it depends on external state. Fixes #57578 Reviewed By: tianshilei1992 Differential Revision: https://reviews.llvm.org/D133360
-
Jakub Kuderski authored
`is_splat` is superseded by `all_equal` and marked as deprecated. See the discussion thread for more details: https://discourse.llvm.org/t/adt-is-splat-and-empty-ranges/64692 Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D132336
-
Dave Lee authored
Add `m_bytes` and `m_bytes_mutex` to `CommunicationKDP`, following refactoring in D133251. Differential Revision: https://reviews.llvm.org/D133365
-
Krzysztof Drewniak authored
This allows using the | operator on the values of enum attributes in complie-time constants. Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D133159
-
Jakub Kuderski authored
Make vendor ops more consistent with the naming scheme within the SPIR-V dialect. Issue: https://github.com/llvm/llvm-project/issues/56863 Reviewed By: antiagainst Differential Revision: https://reviews.llvm.org/D133247
-