Skip to content

Commit 7ed04a4

Browse files
committed
try
1 parent c04c965 commit 7ed04a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/paddle/tensor/math.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4732,16 +4732,16 @@ def cumprod(
47324732
47334733
"""
47344734

4735-
origin_shape = x.shape
4735+
origin_dtype = x.dtype
47364736
if dtype is None:
4737-
if origin_shape in _supported_int_like_types_lt_int64:
4737+
if origin_dtype in _supported_int_like_types_lt_int64:
47384738
# use the default platform integer when integer dtype with a precision less than that of the default platform integer
47394739
return _C_ops.cumprod(
47404740
_C_ops.cast(x, DataType.INT64), dim, False, False
47414741
)
47424742
else:
47434743
target_dtype = convert_np_dtype_to_dtype_(dtype)
4744-
if origin_shape != target_dtype:
4744+
if origin_dtype != target_dtype:
47454745
x = cast(x, target_dtype)
47464746

47474747
if in_dynamic_or_pir_mode():

0 commit comments

Comments
 (0)