Closed tomwang221812 closed 1 year ago
Thanks for your bugreport @tomwang221812 We will fix that!
Hi,
The device
for torch.arange
may need to be initialized as well
shift_x = torch.arange(end=w, dtype=dtype, device=device) + self.grid_cell_offset
...
Thanks.
The PR with a fix was already merged and will be released as 3.2.1 probably this week.
🐛 Describe the bug
Hi,
Export Code:
I found that the exported onnx model will create some
Expand
OPs with data typefloat64
and maybe we don't need to cast the data tofloat32
beforeConcat
iftorch.meshgrid
takes the same data type as input tensor?The related code is in: https://github.com/Deci-AI/super-gradients/blob/6f0a66f9e830ca55c8ec57e4ded1b45171226472/src/super_gradients/training/models/detection_models/yolo_nas/dfl_heads.py#L284-L291
After some experiment I found that the data type casting must be earlier than
torch.meshgrid
to resolve this issue.After that the
Expand
OP data type should be float32:I think most of the time this is not an issue but some compiler of AI accelerator seems lack of float64 data type support that makes the compiler stop compiling.
Versions
Docker image: nvcr.io/nvidia/pytorch:23.07-py3