Skip to content

Commit

Permalink
add warning to pp (#54448)
Browse files Browse the repository at this point in the history
  • Loading branch information
FeixLiu authored Jun 8, 2023
1 parent e64a18d commit 2a2af7d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 2a2af7d

Please sign in to comment.