Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
zjgarvey committed Dec 8, 2023
1 parent cd64f3a commit f548a5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/resnet-18/resnet-18.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ def forward(self, x=AbstractTensor(None, 3, 224, 224, dtype=torch.float32)):
const = [x.dynamic_dim(0) < 16]
return jittable(forward)(x, constraints=const)


# build an mlir module to compile with 1-shot exporter
exported = export(RN18)

compiled_binary = exported.compile(save_to=None)


# return type is rt.array_interop.DeviceArray
# np.array of outputs can be accessed via to_host() method
def shark_infer(x):
Expand Down

0 comments on commit f548a5c

Please sign in to comment.