From abe74d84d84626b27625a62bd190b6aa1464f50d Mon Sep 17 00:00:00 2001 From: Paul Chang Date: Mon, 11 Nov 2024 12:05:28 -0800 Subject: [PATCH] Experiment with sentencepiece 0.2.0 and USE_EXTERNAL_ABSL PiperOrigin-RevId: 695436079 --- MODULE.bazel | 8 +++----- bazel/sentencepiece.bazel | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 58faa0db..735c9540 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -25,11 +25,9 @@ http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "ht http_archive( name = "com_google_sentencepiece", build_file = "@//bazel:sentencepiece.bazel", - patch_args = ["-p1"], - patches = ["@//bazel:sentencepiece.patch"], - sha256 = "8409b0126ebd62b256c685d5757150cf7fcb2b92a2f2b98efb3f38fc36719754", - strip_prefix = "sentencepiece-0.1.96", - urls = ["https://github.com/google/sentencepiece/archive/refs/tags/v0.1.96.zip"], + sha256 = "67c34082deb3d89f589d8614b1ae58aa4af250c79e18737d8103242ec62a28f9", + strip_prefix = "sentencepiece-0.2.0", + urls = ["https://github.com/google/sentencepiece/archive/refs/tags/v0.2.0.zip"], ) # For sentencepiece diff --git a/bazel/sentencepiece.bazel b/bazel/sentencepiece.bazel index ab728877..ad50c697 100644 --- a/bazel/sentencepiece.bazel +++ b/bazel/sentencepiece.bazel @@ -75,7 +75,7 @@ cc_library( "src/util.h", "src/word_model.h", ], - defines = ["_USE_TF_STRING_VIEW"], + defines = ["USE_EXTERNAL_ABSL", "_USE_TF_STRING_VIEW"], includes = [ ".", "src",