@@ -414,7 +414,7 @@ def multiplex(inputs, index, name=None):
414414 [3., 4.]])
415415
416416 """
417- if in_dynamic_mode ():
417+ if in_dynamic_or_pir_mode ():
418418 return _C_ops .multiplex (inputs , index )
419419 else :
420420 helper = LayerHelper ('multiplex' , ** locals ())
@@ -2406,7 +2406,7 @@ def renorm(x, p, axis, max_norm):
24062406 )
24072407 )
24082408 axis = axis + len (input_shape )
2409- if in_dynamic_mode ():
2409+ if in_dynamic_or_pir_mode ():
24102410 out = _C_ops .renorm (x , p , axis , max_norm )
24112411 return out
24122412 else :
@@ -5420,7 +5420,7 @@ def rad2deg(x, name=None):
54205420 57.29578018)
54215421 """
54225422 rad2deg_scale = 180 / np .pi
5423- if in_dynamic_mode ():
5423+ if in_dynamic_or_pir_mode ():
54245424 if convert_dtype (x .dtype ) in ['int32' , 'int64' ]:
54255425 x = cast (x , dtype = "float32" )
54265426 return _C_ops .scale (x , rad2deg_scale , 0.0 , True )
@@ -6630,7 +6630,7 @@ def nextafter(x, y, name=None):
66306630 Tensor(shape=[2], dtype=float32, place=Place(cpu), stop_gradient=True,
66316631 [1.00000012, 1.99999988])
66326632 """
6633- if in_dynamic_mode ():
6633+ if in_dynamic_or_pir_mode ():
66346634 return _C_ops .nextafter (x , y )
66356635 else :
66366636 check_variable_and_dtype (x , 'x' , ['float32' , 'float64' ], 'nextafter' )
0 commit comments