Skip to content

Commit 76a4e9c

Browse files
committed
Update base for Update on "Add ops (addr) | feat(torchlib)"
----- - Mark nan==nan in assert_close - Fix aten_isfinite by allowing the exporter to do type promotion according to #563 and introduce `TFloatHighPrecision` for it - Fix typo in `TRealOrUInt8` [ghstack-poisoned]
2 parents ed444d0 + f0ccf81 commit 76a4e9c

File tree

1 file changed

+3
-1
lines changed
  • docs/articles/2023-06-20-introducing-onnx-script

1 file changed

+3
-1
lines changed

docs/articles/2023-06-20-introducing-onnx-script/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ M_SQRT1_2 = math.sqrt(0.5)
5353
def gelu(X: FLOAT[...]):
5454
phiX = 0.5 * (op.Erf(M_SQRT1_2 * X) + 1.0)
5555
return X * phiX
56+
57+
gelu_model = gelu.to_model_proto()
5658
```
5759

5860
<h4 class="code-title">GELU with the ONNX Helper API</h4>
@@ -66,7 +68,7 @@ import math
6668
import onnx
6769
import onnx.helper
6870

69-
gelu = onnx.helper.make_model(
71+
gelu_model = onnx.helper.make_model(
7072
ir_version=8,
7173
opset_imports=[onnx.helper.make_operatorsetid("", 18)],
7274
graph=onnx.helper.make_graph(

0 commit comments

Comments
 (0)