Is Sorting Differentiable?

It might be inappropriate for this forum.

Now, I am implementing rotated iou loss which is used for some works on oriented object detection.
But to compute intersection of two rotated boxes, it must use convex hull algorithm including sorting process.
But, to my knowledge, sorting is not differentiable.

Is that possible to implement rotated IoU Loss?

You can find a example of cuda implementation on https://github.com/facebookresearch/detectron2/blob/master/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_utils.h .

It depends what you mean by sorting.
If you just want gradients to flow from the sorted output back to the unsorted output, it works fine. As this can be seen as just shuffling the Tensor values.
And the sort operator in pytorch does exactly that.