Loading megatron/text_generation/__init__.py 0 → 100644 +19 −0 Original line number Diff line number Diff line # coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # 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 # limitations under the License. from .api import ( generate, generate_and_post_process) megatron/text_generation/communication.py +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ from megatron import mpu # TODO: use functions from megatron/p2p def recv_from_prev_pipeline_rank_(recv_buffer=None): """Receive from previous pipeline stage and update the input buffer inplace.""" Loading @@ -38,6 +39,7 @@ def recv_from_prev_pipeline_rank_(recv_buffer=None): # TODO: use functions from megatron/p2p def send_to_next_pipeline_rank(tensor=None): """Send output to the next pipeline stage.""" if not mpu.is_pipeline_last_stage(): Loading Loading
megatron/text_generation/__init__.py 0 → 100644 +19 −0 Original line number Diff line number Diff line # coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # 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 # limitations under the License. from .api import ( generate, generate_and_post_process)
megatron/text_generation/communication.py +2 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ from megatron import mpu # TODO: use functions from megatron/p2p def recv_from_prev_pipeline_rank_(recv_buffer=None): """Receive from previous pipeline stage and update the input buffer inplace.""" Loading @@ -38,6 +39,7 @@ def recv_from_prev_pipeline_rank_(recv_buffer=None): # TODO: use functions from megatron/p2p def send_to_next_pipeline_rank(tensor=None): """Send output to the next pipeline stage.""" if not mpu.is_pipeline_last_stage(): Loading