Skip to content

Replace OpsTestBase with a lightweight C++ kernel test harness. - #1568

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_998705466
Oct 14, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_998705466

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Replace OpsTestBase with a lightweight C++ kernel test harness.

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.

@copybara-service
copybara-service Bot force-pushed the test_998705466 branch 4 times, most recently from fef4a23 to 8733582 Compare October 14, 2026 17:35
`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
copybara-service Bot merged commit fd68270 into master Oct 14, 2026
3 checks passed
@copybara-service
copybara-service Bot deleted the test_998705466 branch October 14, 2026 20:46

This branch was successfully deployed

1 active deployment
github-pages — fd68270e Deployed Oct 14, 2026 by github-pages[bot] via deploy #335
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant