Abnormal of onnx model to trt model in the inference results
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
I have convert my onnx model to tensorrt, however the result is quit strange.
My model is trained in mix precision,when I add the following line, will convert to fp16 onnx model( with some layer weights fp32).
@torch.autocast(device_type="cuda", enabled=True)
when not add this line, will conver to fp32 onnx model.
but neither the fp16 onnx model nor the fp32 onnx model converted to trt model can get the right result.
for example when I convert fp32 onnx to trt model, with or without --fp32, the result is almost same, also same of fp16 onnx to trt model's result.
so, where is the problem?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, entry points, model artifacts, or reproducible commands are provided. Start by reviewing the reported PyTorch autocast and ONNX-to-TensorRT conversion comparison; done would require identifying the cause of the differing inference results and documenting a reproducible diagnosis.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100