I use torch.onnx.dynamo_export
with FakeTensors, like this:
with torch.onnx.enable_fake_mode() as fake_context:
x = torch.empty((2, 128, 1), dtype=torch.float16)
model = Transformer(args)
export_options = torch.onnx.ExportOptions(
fake_context=fake_context
)
export_output = torch.onnx.dynamo_export(
torch_model, input_data, export_options=export_options
)
torch.onnx.dynamo_export
was recently deprecated
but how can I use torch.onnx.export(... dynamo=True ...)
with FakeTensors inside?