Add LINT.IfChange to keep batch function op registrations in sync.

PiperOrigin-RevId: 846770644
This commit is contained in:
Deqiang Chen
2025-12-19 09:47:30 -08:00
committed by TensorFlower Gardener
parent 162efc7b6c
commit 6af9ca2d9c
2 changed files with 5 additions and 0 deletions

View File

@@ -407,6 +407,7 @@ REGISTER_KERNEL_BUILDER(
// Identical to BatchFunction except it has 2 extra TFRT attributes and it does
// not have `f` attribute. Users will not invoke this op directly.
// LINT.IfChange
REGISTER_OP("_BatchFunctionFallback")
.Input("in_tensors: Tin")
.Input("captured_tensors: Tcaptured")
@@ -467,6 +468,7 @@ REGISTER_OP("_BatchFunctionFallback")
.Attr("opaque_function_handle: int")
.SetShapeFn(shape_inference::UnknownShape);
// LINT.ThenChange(//tensorflow/core/tfrt/mlrt/kernel/batch_kernel.cc)
} // namespace
} // namespace tfrt_stub
} // namespace tensorflow

View File

@@ -461,6 +461,7 @@ REGISTER_KERNEL_BUILDER(
Name(kMlrtBatchFunctionName).Device(DEVICE_GPU),
tfrt_stub::BatchFunctionFallbackKernel<MlrtBatchResource>);
// LINT.IfChange
// Identical to BatchFunction except it has 2 extra TFRT attributes and it does
// not have `f` attribute. Users will not invoke this op directly.
REGISTER_OP(kMlrtBatchFunctionName)
@@ -522,6 +523,8 @@ REGISTER_OP(kMlrtBatchFunctionName)
.Attr("opaque_function_handle: int")
.SetShapeFn(shape_inference::UnknownShape);
// LINT.ThenChange(//tensorflow/core/runtime_fallback/runtime/runtime_fallback_batch_tf_opkernels.cc)
} // namespace
// TODO(rohitju, chky): This additional Register is not ideal but unavoidable