Repository navigation
Replace OpsTestBase with a lightweight C++ kernel test harness. - #1568
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_998705466
branch
4 times, most recently
from
October 14, 2026 17:35
fef4a23 to
8733582
Compare
`OpsTestBase` pulls the full TensorFlow graph runtime and heavy C++ dependencies which are not exported by the prebuilt TensorFlow wheel. Add `KernelTestBase`, a lightweight `::testing::Test` fixture that instantiates and runs real registered `OpKernel` instances via `CreateOpKernel` and `OpKernelContext` against a minimal `DeviceBase` subclass backed by `cpu_allocator()`. Migrate all C++ kernel tests, construct expected tensors directly in `text_kernels_test_util.h`, and remove unused dependencies in the remaining TF-text tests. PiperOrigin-RevId: 999464459
copybara-service
Bot
force-pushed
the
test_998705466
branch
from
October 14, 2026 20:46
8733582 to
fd68270
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace OpsTestBase with a lightweight C++ kernel test harness.
OpsTestBasepulls the full TensorFlow graph runtime and heavy C++ dependencies which are not exported by the prebuilt TensorFlow wheel.Add
KernelTestBase, a lightweight::testing::Testfixture that instantiates and runs real registeredOpKernelinstances viaCreateOpKernelandOpKernelContextagainst a minimalDeviceBasesubclass backed bycpu_allocator().Migrate all C++ kernel tests, construct expected tensors directly in
text_kernels_test_util.h, and remove unused dependencies in the remaining TF-text tests.