[llvm] 39f1ca5 - [MLGO] Remove absl dep from libraries
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 20 19:34:21 PST 2024
Author: Aiden Grossman
Date: 2024-01-21T03:33:15Z
New Revision: 39f1ca522b023e77c4dca6332d8b9c6366d0eab9
URL: https://github.com/llvm/llvm-project/commit/39f1ca522b023e77c4dca6332d8b9c6366d0eab9
DIFF: https://github.com/llvm/llvm-project/commit/39f1ca522b023e77c4dca6332d8b9c6366d0eab9.diff
LOG: [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.
Added:
Modified:
llvm/utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py
llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py
llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_test.py
llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py
llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py
Removed:
################################################################################
diff --git a/llvm/utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py b/llvm/utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py
index e2ae8699ec31801..5d8c78aa95a9b9c 100644
--- a/llvm/utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py
+++ b/llvm/utils/mlgo-utils/mlgo/corpus/combine_training_corpus_lib.py
@@ -6,8 +6,7 @@
import os
import json
import glob
-
-from absl import logging
+import logging
_FILE_NAME = "corpus_description.json"
diff --git a/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py b/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py
index 9c828ce1eb631fe..8e9779c6257f1bb 100644
--- a/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py
+++ b/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir_lib.py
@@ -11,11 +11,10 @@
import multiprocessing
import functools
import json
+import logging
from typing import Dict, List, Optional
-from absl import logging
-
_UNSPECIFIED_OVERRIDE = ["<UNSPECIFIED>"]
diff --git a/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_test.py b/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_test.py
index dbfdc78a87533b5..4b36bf7742312e4 100644
--- a/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_test.py
+++ b/llvm/utils/mlgo-utils/tests/corpus/combine_training_corpus_test.py
@@ -1,4 +1,4 @@
-# REQUIRES: python-38, absl
+# REQUIRES: python-38
## Test the functionality of combine_training_corpus_lib
diff --git a/llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py b/llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py
index 3ed52ec21de953c..b22960556c99e59 100644
--- a/llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py
+++ b/llvm/utils/mlgo-utils/tests/corpus/extract_ir_test.py
@@ -1,4 +1,4 @@
-# REQUIRES: python-38, absl
+# REQUIRES: python-38
## Test the functionality of extract_ir_lib
diff --git a/llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py b/llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py
index 0f970414b1aecde..d8b8ba1e67c37fc 100644
--- a/llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py
+++ b/llvm/utils/mlgo-utils/tests/corpus/make_corpus_test.py
@@ -1,4 +1,4 @@
-# REQUIRES: python-38, absl
+# REQUIRES: python-38
## Test the functionality of make_corpus_lib
More information about the llvm-commits
mailing list