.contiguous()
should not go through dispatch if argument is already contiguous
#31303
Labels
enhancement
Not as big of a feature, but technically not a bug. Should be easy to fix
module: performance
Issues related to performance, either of kernel code or framework glue
triaged
This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Currently
.contiguous()
call goes through dispatch even if the argument is contiguous already and the call should be a no-op. It results in ~100 ns perf penalty. A workaround that can be (and is) used currently isit takes about 2 ns in case of no data movement, but this is clumsy and we should not expect users to do it.
cc: @ezyang, @bwasti
cc @VitalyFedyunin @ngimel @mruberry
The text was updated successfully, but these errors were encountered: