Skip to content

Commit 547c0d6

Browse files
committed
documentation
1 parent b6dce67 commit 547c0d6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

CHANGELOGS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Change Logs
44
0.7.17
55
++++++
66

7+
* :pr:`275`: fixes function ``patched_vmap``
8+
79
0.7.16
810
++++++
911

onnx_diagnostic/export/shape_helper.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,23 @@ def make_fake_with_dynamic_dimensions(
212212
constraints as the following dynamic shapes.
213213
This uses function :func:`onnx_diagnostic.helpers.fake_tensor_helper.make_fake`.
214214
215+
A simple tensor:
216+
217+
.. runpython::
218+
:showcode:
219+
220+
import torch
221+
from onnx_diagnostic.helpers.cache_helper import make_dynamic_cache
222+
from onnx_diagnostic.export.shape_helper import make_fake_with_dynamic_dimensions
223+
224+
inputs, _ = make_fake_with_dynamic_dimensions(
225+
torch.rand((2, 3, 4, 5), dtype=dtype=torch.float32),
226+
{0: "batch", 2: "cache_length"},
227+
)
228+
print(inputs)
229+
230+
With a cache:
231+
215232
.. runpython::
216233
:showcode:
217234

0 commit comments

Comments
 (0)