Skip to content

Commit

Permalink
Fix error in "test_bundle_trt_export" (Project-MONAI#7524)
Browse files Browse the repository at this point in the history
Fixes Project-MONAI#7523


### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.

Signed-off-by: YunLiu <[email protected]>
  • Loading branch information
KumoLiu authored Mar 10, 2024
1 parent e9e2738 commit 95f69de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion monai/networks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,10 @@ def _onnx_trt_compile(

# wrap the serialized TensorRT engine back to a TorchScript module.
trt_model = torch_tensorrt.ts.embed_engine_in_new_module(
f.getvalue(), torch.device(f"cuda:{device}"), input_names, output_names
f.getvalue(),
device=torch.device(f"cuda:{device}"),
input_binding_names=input_names,
output_binding_names=output_names,
)
return trt_model

Expand Down

0 comments on commit 95f69de

Please sign in to comment.