Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix dev 2.6 #60080

Merged
merged 1 commit into from
Dec 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import distutils.util
import os

import paddle
Expand Down Expand Up @@ -47,9 +46,6 @@ def __init__(self, clip, hcg):
self._clip = clip
self._hcg = hcg
self.not_sharding_stage1 = True
self._force_align_vpp_grad_sum_order = distutils.util.strtobool(
os.getenv('FLAGS_force_align_vpp_grad_sum_order', '0')
)

def _global_norm(self, global_norm_var_dist, global_norm_var_not_dist):
# sharding first
Expand Down Expand Up @@ -103,10 +99,6 @@ def _global_norm(self, global_norm_var_dist, global_norm_var_not_dist):

@no_grad()
def _dygraph_clip(self, params_grads):
if self._force_align_vpp_grad_sum_order:
chunk_num = self._get_vpp_chunk_num(params_grads)
if chunk_num > 0:
return self._vpp_dygraph_clip(params_grads, chunk_num)
sum_square_dist_fp16 = []
sum_square_dist_bf16 = []
sum_square_dist_fp32 = []
Expand Down