Bug Description
In , the method has a critical bug that causes an when the parameter is .
Location
File: , lines 95-100
Bug Details
The method accepts as a default value (line 37):
However, in the method, lines 95-100 directly use without checking if is :
Expected Behavior
When is , the code should either:
- Use a fallback dtype (e.g., or )
- Check if is and handle it appropriately
Suggested Fix
Change lines 95-100 to use as fallback instead of :
Additional Notes
The comment on line 94 mentions using to avoid NaN issues in TRT FP16 inference, but this should be conditional on being non-None.
This bug was found through static code analysis.