Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TensorRT throws warning during conversion #7713

Closed
binliunls opened this issue Apr 25, 2024 · 0 comments · Fixed by #7714
Closed

TensorRT throws warning during conversion #7713

binliunls opened this issue Apr 25, 2024 · 0 comments · Fixed by #7714
Assignees

Comments

@binliunls
Copy link
Contributor

binliunls commented Apr 25, 2024

Describe the bug
TensorRT conversion throws warning:

WARNING:torch_tensorrt._compile:Input graph is a Torchscript module but the ir provided is default (dynamo). Please set ir=torchscript to suppress the warning. Compiling the module with ir=torchscript

To Reproduce
Run the command shown below with the spleen_ct_segmentation bundle in model zoo:

python -m monai.bundle trt_export --net_id network_def --filepath models/model_trt.ts --ckpt_file models/model.pt --meta_file configs/metadata.json --config_file configs/inference.json --precision fp32 --dynamic_batchsize "[1, 4, 8]" --use_onnx "False" --use_trace "False"

Expected behavior
Update the code as the warning suggested.

@binliunls binliunls self-assigned this Apr 25, 2024
KumoLiu pushed a commit that referenced this issue Apr 26, 2024
Fixes #7713  .

### Description

A few sentences describing the changes proposed in this pull request.

### 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.
- [x] 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: binliu <binliu@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant