Skip to content

Commit

Permalink
ToMixedPrecision fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dsbarinov1 committed Nov 11, 2022
1 parent b028351 commit 685744f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/how_to/deploy/adreno.rst
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ To do the conversion you need to write a simple conversion function and specify
seq = tvm.transform.Sequential(
[
relay.transform.InferType(),
relay.transform.ToMixedPrecision()
]
)
with tvm.transform.PassContext(opt_level=3):
Expand Down Expand Up @@ -286,8 +287,10 @@ after which we can convert it to the required **dtype** and then assemble our mo
relay.transform.ToMixedPrecision()
]
)
with tvm.transform.PassContext(opt_level=3):
mod = seq(mod)
with tvm.transform.PassContext(
config={"relay.ToMixedPrecision.keep_orig_output_dtype": True},
opt_level=3):
mod = seq(mod)
return mod
dtype="float16_acc32"
Expand Down

0 comments on commit 685744f

Please sign in to comment.