Enforce contiguous outputs on the transforms v2 kernels?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- python
- Domain
- computer-vision, performance
Research direction
Start with the listed transforms v2 kernels, comparing contiguous and noncontiguous inputs in performance benchmarks for affine_image_tensor, convert_color_space, rotate_image_tensor, crop_image_tensor, center_crop_image_tensor, five_crop_image_tensor, and ten_crop_image_tensor. Include the *_mask and *_video wrappers where applicable; done means determining whether the measured degradation justifies enforcing contiguous outputs.
Written by the indexing model from the issue text.
Description
All the performance benchmarks that did so far for transforms v1 vs. v2 were on contiguous inputs. However, we have a few kernels that leave the output in a noncontiguous state:
affine_image_tensorin caseimage.numel() > 0 and image.ndim == 4 and fill is not Noneconvert_color_spacein case we only strip the alpha channel, i.e.RGB_ALPHA -> RGBandGRAY_ALPHA -> ALPHArotate_image_tensorin caseimage.numel() > 0 and image.ndim == 4 and fill is not Nonecrop_image_tensorcenter_crop_image_tensorfive_crop_image_tensorten_crop_image_tensor
If applicable, the same is also valid for the *_mask and *_video kernels since they are thin wrappers around the *_image_tensor ones.
We should benchmark at least for a few kernels whether noncontiguous inputs cause a performance degredation that is larger than enforcing contiguous outputs on the kernels above. If so we should probably enforce contiguous outputs of our kernels.
cc @vfdev-5 @datumbox @bjuncek
- Dominant language
- Python
- Stars
- 17.9k
- Forks
- 7.3k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pytorch/vision
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100