Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Roi-Bar-Holem committed May 7, 2024
1 parent a4a7cbd commit 49b7920
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sony_custom_layers/pytorch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
def load_custom_ops(load_ort: bool = False,
ort_session_ops: Optional['ort.SessionOptions'] = None) -> Optional['ort.SessionOptions']:
"""
Note: this must be run before inferring a model with SCL in onnxruntime. To trigger ops registration in torch any import from sony_custom_layers.pytorch
is technically sufficient, In which case this is just a dummy API to prevent unused import (e.g. when loading exported pt2 model)
Load custom ops for torch and, optionally, for onnxruntime.
If 'load_ort' is True or 'ort_session_ops' is passed, registers the custom ops implementation for onnxruntime, and
sets up the SessionOptions object for onnxruntime session.
Note: this is a must for onnxruntime. To trigger torch ops registration any import from sony_custom_layers.pytorch
is technically sufficient. This is just a dummy api to prevent unused import (e.g. when loading exported pt2 model)
Args:
load_ort: whether to register the custom ops for onnxruntime.
ort_session_ops: SessionOptions object to register the custom ops library on. If None (and 'load_ort' is True),
Expand Down

0 comments on commit 49b7920

Please sign in to comment.