11 Commits

Author SHA1 Message Date
Aiden Grossman
99ea357f7b
[MLGO] Fix logging verbosity in scripts (#107818)
This patch fixes issues related to logging verbosity in the MLGO python
scripts. This was an oversight when converting from absl.logging to the
python logging API as absl natively supports a --verbosity flag to set
the desired logging level. This patch adds a flag to support similar
functionality in Python's logging library and additionally updates
docstrings where relevant to point to the new values.
2024-09-09 11:34:53 -07:00
Aiden Grossman
02fff933d0 [MLGO] Remove unused imports
Remove unused imports from python files in the MLGO library.
2024-09-09 18:28:59 +00:00
Aiden Grossman
d5f6f30664 [MLGO] Add spaces at the end of lines in multiline string
This patch adds spaces at the end of lines in multiline strings in the
extract_ir script. Without this patch, the warning/info messages will be
printed without spaces between words when there is a line break in the
source which looks/reads weird.
2024-09-09 07:49:54 +00:00
Aiden Grossman
eb90ac508b [MLGO] Bump MLGO utils version to 20
This patch bumps the MLGO utilities python package version to v20 in
sync with the rest of the project. This should be automated later in the
version update script, but this needs to be updated even while a patch
for that lands.
2024-07-23 19:21:42 +00:00
Aiden Grossman
ceaaa19238 [MLGO] Adjust mlgo-utils versioning to match Pypi
This patch adjusts the versioning/package name for mlgo-utils to match
what is on Pypi. I did this before because we uploaded a package before
the 18 branch, but apparently never committed the changes.

We will have to special case actual releases in the future, but for now
development versions are fine.
2024-07-08 21:16:25 +00:00
Aiden Grossman
4134b33c6a
[MLGO] Add ability to extract IR from bazel using aquery (#96964)
This patch adds in support for extracting IR from binaries built with
bazel through querying the linker command line using bazel aquery.
2024-06-27 14:28:02 -07:00
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
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
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
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