Revision tags: 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 |
|
#
9b06f756 |
| 02-Feb-2023 |
Mircea Trofin <mtrofin@google.com> |
Reapply 9cffabc68ca380be937e192be909feff7b144822
This reverts commit 735f117f4d0deb9644d65c8fe8a80add058e7a2b.
|
#
735f117f |
| 02-Feb-2023 |
Mircea Trofin <mtrofin@google.com> |
Revert "[mlgo][nfc] Better pretty printing of interactive mode reply"
This reverts commit 9cffabc68ca380be937e192be909feff7b144822.
Broke windows builds
|
#
9cffabc6 |
| 02-Feb-2023 |
Mircea Trofin <mtrofin@google.com> |
[mlgo][nfc] Better pretty printing of interactive mode reply
Also simplified the `-interactive-model-runner-echo-reply` flag to a bool, because the header will contain the advice spec, so there is a
[mlgo][nfc] Better pretty printing of interactive mode reply
Also simplified the `-interactive-model-runner-echo-reply` flag to a bool, because the header will contain the advice spec, so there is an explicit agreement between the compiler and the host as to what that should be shaped as.
show more ...
|
#
795910c2 |
| 02-Feb-2023 |
Mircea Trofin <mtrofin@google.com> |
Fix windows bot breakages due to D143110
|
#
83051c5a |
| 01-Feb-2023 |
Mircea Trofin <mtrofin@google.com> |
[mlgo] Make InteractiveModelRunner actually work with named pipes
Turns out raw_fd_stream doesn't work with named pipes, so we just need to lower the abstraction. Updated the unittest accordingly. B
[mlgo] Make InteractiveModelRunner actually work with named pipes
Turns out raw_fd_stream doesn't work with named pipes, so we just need to lower the abstraction. Updated the unittest accordingly. Because mkfifo's path argument requires a certain naming pattern on Windows (IIUC), restricted the test to Linux only.
Differential Revision: https://reviews.llvm.org/D143110
show more ...
|
#
35aa7374 |
| 01-Feb-2023 |
Mircea Trofin <mtrofin@google.com> |
[mlgo] Allow logging the spec for the "advice", if needed
This is for the interactive model runner, so it can confirm the tensor spec of the advice with its host.
|
Revision tags: llvmorg-16.0.0-rc1 |
|
#
5b8dc7c8 |
| 26-Jan-2023 |
Mircea Trofin <mtrofin@google.com> |
[mlgo] Introduce an "InteractiveModelRunner"
This is a model runner for ML researchers using environments like CompilerGym. In such environments, researchers host the compiler and want to be able to
[mlgo] Introduce an "InteractiveModelRunner"
This is a model runner for ML researchers using environments like CompilerGym. In such environments, researchers host the compiler and want to be able to observe the problem space (features) at each decision step of some optimization pass, at which point the compiler is stopped, waiting for the host makes a decision and provide an advice back to the compiler, which then continues its normal operation, and so on.
The InteractiveModelRunner supports this scenario for the feature set exposed by the compiler at a given time. It uses 2 files - ideally FIFO pipes - one to pass data to the host, the other to get advices back from the host. This means this scenario is supported with no special dependencies. The file creation and deletion is the responsibility of the host. Hooking up this model evaluator to a MLGO-ed pass is the responsibilty of the pass author, and subsequent patches will do so for the current set of mlgo passes, and offer an API to easily "just opt in" by default when mlgo-ing a new pass.
The data protocol is that of the training logger: the host sees a training log doled out observation by observation by reading from one of the files, and passes back its advice as a serialized tensor (i.e. tensor value memory dump) via the other file.
There are some differences wrt the log seen during training: the interactive model doesn't currently include the outcome (because it should be identical to the decision, and it's also not present in the "release" mode); and partial rewards aren't currently communicated back.
The assumption - just like with the training logger - is that the host is co-located, thus avoiding any endianness concerns. In a distributed environment, it is up to the hosting infrastructure to intermediate that.
Differential Revision: https://reviews.llvm.org/D142642
show more ...
|