[TF:TRT] Fix a python test.
For TF2, TRTEngineOp nodes should only exist inside functions for signatures. Avoid looking for TRTEngineOp nodes outside functions. PiperOrigin-RevId: 358194388 Change-Id: I123b6e366a130c87b1e0f5bc64336bf21f715b20
This commit is contained in:
parent
55367cfc7d
commit
c92320d7a4
@ -865,9 +865,7 @@ class TfTrtIntegrationTestBase(test_util.TensorFlowTestCase):
|
||||
return
|
||||
expected_engines = self.ExpectedEnginesToBuild(run_params)
|
||||
all_op_names = [node.name for node in gdef_to_verify.node]
|
||||
trt_op_names = [
|
||||
node.name for node in gdef_to_verify.node if node.op == "TRTEngineOp"
|
||||
]
|
||||
trt_op_names = []
|
||||
for func in gdef_to_verify.library.function:
|
||||
if not re.search(r"TRTEngineOp_\d+_\d+_native_segment",
|
||||
func.signature.name):
|
||||
|
Loading…
Reference in New Issue
Block a user