未验证 提交 2a2af7d7 编写于 作者: Y Yuang Liu 提交者: GitHub

add warning to pp (#54448)

上级 e64a18db
......@@ -10,6 +10,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
import warnings
import paddle
from paddle import framework
......@@ -614,6 +615,10 @@ class PipelineParallelWithInterleave(PipelineParallel):
def __init__(self, layers, hcg, strategy):
super().__init__(layers=layers, hcg=hcg, strategy=strategy)
assert layers.get_num_virtual_stages() > 1
if self.num_stages <= 2:
warnings.warn(
"Deprecate warning! In the near future the virtual pp will only available when pp degree > 2."
)
assert (
framework.in_dynamic_mode()
), "virtual pipeline stage with interleave only support eager dygraph mode"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册