mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-07 12:20:24 +01:00
Add shape inference pass to the beginning of the TPUBridgeV1Compat pipeline.
It is possible for the TPU computation to be in a function. Running shape inference prior to V1 specific passes allow for more granular shapes/types to be propagated to functions (e.g. resource subtypes), resulting in possibly less runtime/dynamic shapes for the TPU program. PiperOrigin-RevId: 320252292 Change-Id: I431ff20c943a9542fab2a0076675d62b22280cb8
This commit is contained in:
parent
26e2f2e285
commit
6ad4a657e0
|
|
@ -107,6 +107,7 @@ void CreateTPUBridgePipeline(OpPassManager &pm) {
|
|||
}
|
||||
|
||||
void CreateTPUBridgePipelineV1(OpPassManager &pm) {
|
||||
pm.addPass(TF::CreateTFShapeInferencePass());
|
||||
// For V1 compatibility, we process a module where the graph does not have
|
||||
// feeds and fetched. We extract first the TPU computation in a submodule,
|
||||
// where it'll be in a function with args and returned values, much more like
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user