Skip to content

Commit a9001e2

Browse files
committed
[CodeStyle][Typos][U-[1-5]]Fix typos('unsupport')
1 parent 351ba68 commit a9001e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guides/paddle_v3_features/sot_cn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
```python
1717
# 一个简单的 Case 如下:
1818
@paddle.jit.to_static()
19-
def unsupport_func(x):
19+
def unsupported_func(x):
2020
x = 2 * x
2121
t = x.numpy() # t 依赖了 x 的值,依赖静态图的执行结果
2222
t = np.ones(t)
2323
return paddle.to_tensor(t)
2424

2525
x = paddle.to_tensor([2])
26-
unsupport_func(x) # raise error
26+
unsupported_func(x) # raise error
2727
```
2828

2929
这里的 `np.ones` 因为动转静的使用,上述的 `x``t` 其实都是 `pir.Value` 类型(即 PIR 中的组网占位符),传入到 `np.ones` 中是无法获取到具体的值的,因此调用 `.numpy()` 接口时会报错。而这样的 Case 也是 AST 动转静理论上无法解决的问题,本质原因是,AST 必须要求转写的函数可以**被整图的**静态图 IR 表示。

0 commit comments

Comments
 (0)