Powers of two might be more “friendly” regarding the input shape to specific kernels and could perform better than other shapes (internally padding could be used, if it could yield an overall speedup).
However, it depends on your actual model, input shapes, etc. so you could profile different shapes and check for performance cliffs.