Skip to content

Commit

Permalink
fix dev 2.6 (PaddlePaddle#60080)
Browse files Browse the repository at this point in the history
  • Loading branch information
wentaoyu authored and HermitSun committed Dec 21, 2023
1 parent 58c15a3 commit c46c713
Showing 1 changed file with 0 additions and 8 deletions.
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

0 comments on commit c46c713

Please sign in to comment.