Introduction
Overview
This document describes how to develop a TensorFlow scope fusion pattern that replaces small operators in a scope with a larger operator or a composite of operators. This aims to improve the execution efficiency of TensorFlow computational graphs on the Ascend AI Processor.
Intended Audience
This document is intended for model developers. After reading it, you will be able to:
- Understand the implementation scheme and method of scope fusion.
- Develop additional scope fusion patterns based on the given samples.
To better understand this document, you are supposed to have:
- Proficiency in C++ programming.
- Knowledge of machine learning and deep learning.
Restrictions
- Scope fusion applies to TensorFlow models only. If your graph is constructed from operator prototypes, Scope fusion is not supported. Scope fusion is supported if your graph is constructed by using the TensorFlow Parser. (For details, refer to "Graph Parsing from Original Model" in Ascend Graph Developer Guide.)
- When designing scope fusion patterns, ensure that the fusion pattern is unique to prevent a scope from matching multiple fusion patterns.
- The supported TensorFlow version is 1.15.