Skip to content

Commit 2dfb9ad

Browse files
authored
add mindtorch.lerp (#2212)
1 parent dc70b0c commit 2dfb9ad

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

mindtorch/_apis/cpu.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,4 +1252,7 @@ def cumprod(input, dim, dtype):
12521252
out = legacy.cum_prod(input, dim, False, False)
12531253
if dtype is not None:
12541254
out = cast(out, dtype)
1255-
return out
1255+
return out
1256+
1257+
def lerp(input, end, weight):
1258+
return legacy.lerp(input, end, weight)

mindtorch/_apis/gpu.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,4 +1252,7 @@ def cumprod(input, dim, dtype):
12521252
out = legacy.cum_prod(input, dim, False, False)
12531253
if dtype is not None:
12541254
out = cast(out, dtype)
1255-
return out
1255+
return out
1256+
1257+
def lerp(input, end, weight):
1258+
return legacy.lerp(input, end, weight)

mindtorch/_apis/npu.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,3 +1898,6 @@ def strided_slice(input, begin, end, strides, begin_mask=0, end_mask=0, ellipsis
18981898

18991899
def tensor_scatter_update(input, indices, updates):
19001900
return legacy.tensor_scatter_update(input, indices, updates)
1901+
1902+
def lerp(input, end, weight):
1903+
return legacy.lerp(input, end, weight)

0 commit comments

Comments
 (0)