Closed
Description
Bug Description
run refit_engine_example.py get âAssertionError: Refit Result is not correct. Refit failedâ
To Reproduce
python refit_engine_example.py
Environment
- Torch-TensorRT Version : 2.6.0
- PyTorch Version :2.6.0+cu124
- OS: Linux
- Python version: 3.10.16
- CUDA version: 12.4
- Tensorrt version: 10.8.0.43
Additional context
There are some warning.
It seems that the following code caused the above issue:
TRTInterpreter.check_weight_equal(sd[sd_weight_name], np_map[engine_weight_name]). This code in TensorRT/py/torch_tensorrt/dynamo/conversion/_TRTInterpreter.py in line 537.
The numerical difference between sd[sd_weight_name] and np_map[engine_weight_name] is significant. So âweight_name_mapâ will not record the corresponding weights. However, I don't know why this issue occurs. Could it be due to an incorrect version of TensorRT?