Skip to content

Commit

Permalink
scripts/vsmlrt.py: add output_format option to the ort_cuda backend
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Apr 20, 2024
1 parent 0abb2a3 commit 954733e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/vsmlrt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.20.7"
__version__ = "3.20.8"

__all__ = [
"Backend", "BackendV2",
Expand Down Expand Up @@ -88,6 +88,7 @@ class ORT_CUDA:
use_cuda_graph: bool = False # preview, not supported by all models
fp16_blacklist_ops: typing.Optional[typing.Sequence[str]] = None
prefer_nhwc: bool = False
output_format: int = 0 # 0: fp32, 1: fp16

# internal backend attributes
supports_onnx_serialization: bool = True
Expand Down Expand Up @@ -2043,6 +2044,7 @@ def _inference(

if version >= (1, 18, 0):
kwargs["prefer_nhwc"] = backend.prefer_nhwc
kwargs["output_format"] = backend.output_format

clip = core.ort.Model(
clips, network_path,
Expand Down

0 comments on commit 954733e

Please sign in to comment.