|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
ede60037 |
| 29-Jun-2022 |
Nicolai Hähnle <[email protected]> |
ManagedStatic: remove many straightforward uses in llvm
(Reapply after revert in e9ce1a588030d8d4004f5d7e443afe46245e9a92 due to Fuchsia test failures. Removed changes in lib/ExecutionEngine/ other
ManagedStatic: remove many straightforward uses in llvm
(Reapply after revert in e9ce1a588030d8d4004f5d7e443afe46245e9a92 due to Fuchsia test failures. Removed changes in lib/ExecutionEngine/ other than error categories, to be checked in more detail and reapplied separately.)
Bulk remove many of the more trivial uses of ManagedStatic in the llvm directory, either by defining a new getter function or, in many cases, moving the static variable directly into the only function that uses it.
Differential Revision: https://reviews.llvm.org/D129120
show more ...
|
| #
e9ce1a58 |
| 10-Jul-2022 |
Nicolai Hähnle <[email protected]> |
Revert "ManagedStatic: remove many straightforward uses in llvm"
This reverts commit e6f1f062457c928c18a88c612f39d9e168f65a85.
Reverting due to a failure on the fuchsia-x86_64-linux buildbot.
|
| #
e6f1f062 |
| 29-Jun-2022 |
Nicolai Hähnle <[email protected]> |
ManagedStatic: remove many straightforward uses in llvm
Bulk remove many of the more trivial uses of ManagedStatic in the llvm directory, either by defining a new getter function or, in many cases,
ManagedStatic: remove many straightforward uses in llvm
Bulk remove many of the more trivial uses of ManagedStatic in the llvm directory, either by defining a new getter function or, in many cases, moving the static variable directly into the only function that uses it.
Differential Revision: https://reviews.llvm.org/D129120
show more ...
|
|
Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3 |
|
| #
c35ad9ee |
| 27-Apr-2022 |
Mircea Trofin <[email protected]> |
[mlgo] Support exposing more features than those supported by models
This allows the compiler to support more features than those supported by a model. The only requirement (development mode only) i
[mlgo] Support exposing more features than those supported by models
This allows the compiler to support more features than those supported by a model. The only requirement (development mode only) is that the new features must be appended at the end of the list of features requested from the model. The support is transparent to compiler code: for unsupported features, we provide a valid buffer to copy their values; it's just that this buffer is disconnected from the model, so insofar as the model is concerned (AOT or development mode), these features don't exist. The buffers are allocated at setup - meaning, at steady state, there is no extra allocation (maintaining the current invariant). These buffers has 2 roles: one, keep the compiler code simple. Second, allow logging their values in development mode. The latter allows retraining a model supporting the larger feature set starting from traces produced with the old model.
For release mode (AOT-ed models), this decouples compiler evolution from model evolution, which we want in scenarios where the toolchain is frequently rebuilt and redeployed: we can first deploy the new features, and continue working with the older model, until a new model is made available, which can then be picked up the next time the compiler is built.
Differential Revision: https://reviews.llvm.org/D124565
show more ...
|
|
Revision tags: llvmorg-14.0.2 |
|
| #
b1fa5ac3 |
| 25-Apr-2022 |
Mircea Trofin <[email protected]> |
[mlgo] Factor out TensorSpec
This is a simple datatype with a few JSON utilities, and is independent of the underlying executor. The main motivation is to allow taking a dependency on it on the AOT
[mlgo] Factor out TensorSpec
This is a simple datatype with a few JSON utilities, and is independent of the underlying executor. The main motivation is to allow taking a dependency on it on the AOT side, and allow us build a correctly-sized buffer in the cases when the requested feature isn't supported by the model. This, in turn, allows us to grow the feature set supported by the compiler in a backward-compatible way; and also collect traces exposing the new features, but starting off the older model, and continue training from those new traces.
Differential Revision: https://reviews.llvm.org/D124417
show more ...
|
| #
e4794ff5 |
| 19-Apr-2022 |
Mircea Trofin <[email protected]> |
[mlgo][nfc] Decouple TensorSpec from tensorflow.
The motivation is twofold:
1) Allow plugging in a different training-time evaluator, e.g. TFLite-based, etc.
2) Allow using TensorSpec for AOT,
[mlgo][nfc] Decouple TensorSpec from tensorflow.
The motivation is twofold:
1) Allow plugging in a different training-time evaluator, e.g. TFLite-based, etc.
2) Allow using TensorSpec for AOT, too, to support evolution: we start by extracting a superset of the features currently supported by a model. For the tensors the model does not support, we just return a valid, but useless, buffer. This makes using a 'smaller' model (less supported tensors) transparent to the compiler. The key is to dimension the buffer appropriately, and we already have TensorSpec modeling that info.
The only coupling was due to the reliance of a TF internal API for getting the element size, but for the types we are interested in, `sizeof` is sufficient.
A subsequent change will yank out TensorSpec in its own module.
Differential Revision: https://reviews.llvm.org/D124045
show more ...
|
|
Revision tags: llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
| #
1f5dceb1 |
| 11-Jan-2022 |
Mircea Trofin <[email protected]> |
[MLGO] Add support for multiple training traces per module
This happens in e.g. regalloc, where we trace decisions per function, but wouldn't want to spew N log files (i.e. one per function). So we
[MLGO] Add support for multiple training traces per module
This happens in e.g. regalloc, where we trace decisions per function, but wouldn't want to spew N log files (i.e. one per function). So we output a key-value association, where the key is an ID for the sub-module object, and the value is the tensorflow::SequenceExample.
The current relation with protobuf is tenuous, so we're avoiding a custom message type in favor of using the `Struct` message, but that requires the values be wire-able strings, hence base64 encoding.
We plan on resolving the protobuf situation shortly, and improve the encoding of such logs, but this is sufficient for now for setting up regalloc training.
Differential Revision: https://reviews.llvm.org/D116985
show more ...
|
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2 |
|
| #
8dc3fe0c |
| 20-Aug-2021 |
Mircea Trofin <[email protected]> |
[NFC][MLGO] Use std::move when moving protobufs
Because of an odd linking problem, we need to temporarily support building with TF C API 1.15 + tensorflow 2.50 pip package in 'development' mode scen
[NFC][MLGO] Use std::move when moving protobufs
Because of an odd linking problem, we need to temporarily support building with TF C API 1.15 + tensorflow 2.50 pip package in 'development' mode scenarios. Protobuf Message 'Swap' is partially implemented in the header (2.50) and relies on a symbol not found in TF C API 1.15. std::move avoids that, at no semantic cost.
show more ...
|
| #
510402c2 |
| 11-Aug-2021 |
Mircea Trofin <[email protected]> |
[NFC][MLGO] 'Use' variable used for asserts
|
| #
c874dd53 |
| 05-Aug-2021 |
Christopher Di Bella <[email protected]> |
[llvm][clang][NFC] updates inline licence info
Some files still contained the old University of Illinois Open Source Licence header. This patch replaces that with the Apache 2 with LLVM Exception li
[llvm][clang][NFC] updates inline licence info
Some files still contained the old University of Illinois Open Source Licence header. This patch replaces that with the Apache 2 with LLVM Exception licence.
Differential Revision: https://reviews.llvm.org/D107528
show more ...
|
| #
ae1a2a09 |
| 05-Aug-2021 |
Mircea Trofin <[email protected]> |
[NFC][MLGO] Make logging more robust
1) add some self-diagnosis (when asserts are enabled) to check that all features have the same nr of entries
2) avoid storing pointers to mutable fields because
[NFC][MLGO] Make logging more robust
1) add some self-diagnosis (when asserts are enabled) to check that all features have the same nr of entries
2) avoid storing pointers to mutable fields because the proto API contract doesn't actually guarantee those stay fixed even if no further mutation of the object occurs.
Differential Revision: https://reviews.llvm.org/D107594
show more ...
|
|
Revision tags: llvmorg-13.0.0-rc1, llvmorg-14-init |
|
| #
55e12f70 |
| 22-Jul-2021 |
Mircea Trofin <[email protected]> |
[NFC][MLGO] Just use the underlying protobuf object for logging
Avoid buffering just to copy the buffered data, in 'development mode', when logging. Instead, just populate the underlying protobuf.
[NFC][MLGO] Just use the underlying protobuf object for logging
Avoid buffering just to copy the buffered data, in 'development mode', when logging. Instead, just populate the underlying protobuf.
Differential Revision: https://reviews.llvm.org/D106592
show more ...
|
| #
55e2d206 |
| 14-Jul-2021 |
Mircea Trofin <[email protected]> |
[MLGO] Use binary protobufs for improved training performance.
It turns out that during training, the time required to parse the textual protobuf of a training log is about the same as the time it t
[MLGO] Use binary protobufs for improved training performance.
It turns out that during training, the time required to parse the textual protobuf of a training log is about the same as the time it takes to compile the module generating that log. Using binary protobufs instead elides that cost almost completely.
Differential Revision: https://reviews.llvm.org/D106157
show more ...
|
|
Revision tags: llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2 |
|
| #
047fc3bf |
| 22-Feb-2021 |
Kazu Hirata <[email protected]> |
[Analysis] Use ListSeparator (NFC)
|
|
Revision tags: llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1 |
|
| #
8ab2353a |
| 19-Nov-2020 |
Mircea Trofin <[email protected]> |
[NFC][TFUtils] also include output specs lookup logic in loadOutputSpecs
The lookup logic is also reusable.
Also refactored the API to return the loaded vector - this makes it more clear what state
[NFC][TFUtils] also include output specs lookup logic in loadOutputSpecs
The lookup logic is also reusable.
Also refactored the API to return the loaded vector - this makes it more clear what state it is in in the case of error (as it won't be returned).
Differential Revision: https://reviews.llvm.org/D91759
show more ...
|
| #
b51e844f |
| 19-Nov-2020 |
Mircea Trofin <[email protected]> |
[NFC][TFUtils] Extract out the output spec loader
It's generic for the 'development mode', not specific to the inliner case.
Differential Revision: https://reviews.llvm.org/D91751
|
| #
d454328e |
| 17-Oct-2020 |
Mircea Trofin <[email protected]> |
[ML] Add final reward logging facility.
Allow logging final rewards. A final reward is logged only once, and is serialized as all-zero values, except for the last one.
Differential Revision: https:
[ML] Add final reward logging facility.
Allow logging final rewards. A final reward is logged only once, and is serialized as all-zero values, except for the last one.
Differential Revision: https://reviews.llvm.org/D89626
show more ...
|
|
Revision tags: llvmorg-11.0.0, llvmorg-11.0.0-rc6 |
|
| #
36bb1fb1 |
| 03-Oct-2020 |
Mircea Trofin <[email protected]> |
[MLInliner] Factor out logging
Factored out the logging facility, to allow its reuse outside the inliner.
Differential Revision: https://reviews.llvm.org/D88770
|
|
Revision tags: llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4 |
|
| #
fa69b608 |
| 23-Sep-2020 |
Sam McCall <[email protected]> |
[JSON] Add error reporting to fromJSON and ObjectMapper
Translating between JSON objects and C++ strutctures is common. From experience in clangd, fromJSON/ObjectMapper work well and save a lot of c
[JSON] Add error reporting to fromJSON and ObjectMapper
Translating between JSON objects and C++ strutctures is common. From experience in clangd, fromJSON/ObjectMapper work well and save a lot of code, but aren't adopted elsewhere at least partly due to total lack of error reporting beyond "ok"/"bad".
The recently-added error model should be rich enough for most applications. It requires tracking the path within the root object and reporting local errors at appropriate places. To do this, we exploit the fact that the call graph of recursive parse functions mirror the structure of the JSON itself. The current path is represented as a linked list of segments, each of which is on the stack as a parameter. Concretely, fromJSON now looks like: bool fromJSON(const Value&, T&, Path);
Beyond the signature change, this is reasonably unobtrusive: building the path segments is mostly handled by ObjectMapper and the vector<T> fromJSON. However the root caller of fromJSON must now create a Root object to store the errors, which is a little clunky.
I've added high-level parse<T>(StringRef) -> Expected<T>, but it's not general enough to be the primary interface I think (at least, not usable in clangd).
All existing users (mostly just clangd) are updated in this patch, making this change backwards-compatible is a bit hairy.
Differential Revision: https://reviews.llvm.org/D88103
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc3 |
|
| #
7cfcecec |
| 25-Aug-2020 |
Mircea Trofin <[email protected]> |
[MLInliner] Simplify TFUTILS_SUPPORTED_TYPES
We only need the C++ type and the corresponding TF Enum. The other parameter was used for the output spec json file, but we can just standardize on the C
[MLInliner] Simplify TFUTILS_SUPPORTED_TYPES
We only need the C++ type and the corresponding TF Enum. The other parameter was used for the output spec json file, but we can just standardize on the C++ type name there.
Differential Revision: https://reviews.llvm.org/D86549
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc2 |
|
| #
b18c41c6 |
| 05-Aug-2020 |
Mircea Trofin <[email protected]> |
[TFUtils] Expose untyped accessor to evaluation result tensors
These were implementation detail, but become necessary for generic data copying.
Also added const variations to them, and move assignm
[TFUtils] Expose untyped accessor to evaluation result tensors
These were implementation detail, but become necessary for generic data copying.
Also added const variations to them, and move assignment, since we had a move ctor (and the move assignment helps in a subsequent patch).
Differential Revision: https://reviews.llvm.org/D85262
show more ...
|
| #
90b9c49c |
| 04-Aug-2020 |
Mircea Trofin <[email protected]> |
[llvm] Expose type and element count-related APIs on TensorSpec
Added a mechanism to check the element type, get the total element count, and the size of an element.
Differential Revision: https://
[llvm] Expose type and element count-related APIs on TensorSpec
Added a mechanism to check the element type, get the total element count, and the size of an element.
Differential Revision: https://reviews.llvm.org/D85250
show more ...
|
| #
4b1b109c |
| 30-Jul-2020 |
Mircea Trofin <[email protected]> |
[llvm] Add a parser from JSON to TensorSpec
A JSON->TensorSpec utility we will use subsequently to specify additional outputs needed for certain training scenarios.
Differential Revision: https://r
[llvm] Add a parser from JSON to TensorSpec
A JSON->TensorSpec utility we will use subsequently to specify additional outputs needed for certain training scenarios.
Differential Revision: https://reviews.llvm.org/D84976
show more ...
|
| #
71059257 |
| 29-Jul-2020 |
Mircea Trofin <[email protected]> |
[llvm][NFC] TensorSpec abstraction for ML evaluator
Further abstracting the specification of a tensor, to more easily support different types and shapes of tensor, and also to perform initialization
[llvm][NFC] TensorSpec abstraction for ML evaluator
Further abstracting the specification of a tensor, to more easily support different types and shapes of tensor, and also to perform initialization up-front, at TFModelEvaluator construction time.
Differential Revision: https://reviews.llvm.org/D84685
show more ...
|
|
Revision tags: llvmorg-11.0.0-rc1 |
|
| #
4fe912f1 |
| 21-Jul-2020 |
Nico Weber <[email protected]> |
Build: Move TF source file inclusion from build system to source files
Outside of compiler-rt (where it's arguably an anti-pattern too), LLVM tries to keep its build files as simple as possible. See
Build: Move TF source file inclusion from build system to source files
Outside of compiler-rt (where it's arguably an anti-pattern too), LLVM tries to keep its build files as simple as possible. See e.g. llvm/docs/SupportLibrary.rst, "Code Organization".
Differential Revision: https://reviews.llvm.org/D84243
show more ...
|