9 Commits

Author SHA1 Message Date
Aiden Grossman
1f13203029 [MLGO] Bump mlgo-utils version to 19.0.0
This patch bumps the mlgo-utils version to 19.0.0 as 18.0.0 got branched
recently.
2024-01-27 00:24:28 -08:00
Aiden Grossman
2b25e40a88 [MLGO] Switch test to invoke pytype through python
Currently this test is assuming that ~/.local/bin (or wherever the
Python binaries are installed to) is on the path. This is not a valid
assumption in most cases, and it also means we might not find the
version of pytype associated with the Python interpreter being used to
test LLVM, which could create some inconsistencies. This patch fixes
that by invoking pytype through the Python interpreter passed to lit.
2024-01-26 21:46:21 +00:00
Aiden Grossman
e4afffbe8c
[MLGO] Add pytype test (#79558)
This patch adds a pytype test to the mlgo-utils lit test suite to
prevent regressions in typing while we wait to setup precommit CI for
this specific project.

This is somewhat hacky, but is a temporary fix and will be pulled out
soonish. It also should only impact the ML buildbots as they are the
only ones that should have `pytype` installed.
2024-01-26 12:24:15 -08:00
Aiden Grossman
b54e919573 [MLGO] Fix make_corpus_script.test
This test is currently failing as the order that the files end up in the
corpus description is somewhat dependent upon platform and the check is
checking for a specific order. This patch switches to using the
CHECK-DAG directive to make the checks order invariant to fix the broken
bots.
2024-01-21 23:20:56 +00:00
Aiden Grossman
120e062377
[MLGO] Remove absl dependency from scripts (#78880)
This patch removes the absl dependency from the mlgo-utils scripts. We
were only using absl.logging, and absl.flags, so this patch just
consists of mechanically converting the absl flags parsing to Python's
builtin argparse as Python's logging is a drop in replacement for
absl.logging.
2024-01-21 15:06:58 -08:00
Aiden Grossman
c71956d760
[MLGO] Add tests for scripts (#78878)
This patch adds integration tests for the script entry points. The tests
don't exercise all functionality, as that case is better covered by the
unit testing already checked in. This ensures that things like flag
parsing work and that the scripts are syntactically valid.
2024-01-21 14:49:45 -08:00
Aiden Grossman
a70d3101ba [MLGO] Disable mlgo-utils tests on Windows builders
This patch disables the mlgo-utils tests on Windows builders. MLGO is
not currently supported on Windows.

These tests were failing as some of them look for specific file paths
and the path conventions are different between Linux and Windows.
2024-01-21 03:54:25 +00:00
Aiden Grossman
39f1ca522b [MLGO] Remove absl dep from libraries
The library files in the new mlgo-utils utilities folder only depend on
absl.logging. The builtin Python logging library is a direct drop-in
replacement here, so we can just change the include and drop the test
dependency.
2024-01-21 03:33:15 +00:00
Aiden Grossman
a387bce4bc
[MLGO] Upstream the corpus extraction tooling (#72319)
This patch upstreams some of the MLGO utilities, particularly the corpus
extraction tooling, into LLVM proper. The motivation for this patch is
available in the RFC.


https://discourse.llvm.org/t/rfc-upstreaming-elements-of-the-mlgo-tooling/74939
2024-01-19 17:23:51 -08:00