You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It decides whether the image resize can be done for uint8 datatype with native CPU.
However, the return type of torch.backends.cpu.get_cpu_capability() is not a kind of set or sequence of strs. It returns str, https://pytorch.org/docs/2.2/backends.html#torch.backends.cpu.get_cpu_capability. Therefore, on a AVX512 support machine, torch.backends.cpu.get_cpu_capability() returns "AVX512" and it leads to float32 casting at
The text was updated successfully, but these errors were encountered:
vinnamkim
changed the title
AVX512 support machine cannot resize uint8 image with BILINEAR interpolation
AVX512 support machine cannot resize uint8 image with BILINEAR interpolation as it is
Apr 12, 2024
馃悰 Describe the bug
Please see this line on the main branch.
vision/torchvision/transforms/v2/functional/_geometry.py
Line 200 in 5181a85
It decides whether the image resize can be done for uint8 datatype with native CPU.
However, the return type of
torch.backends.cpu.get_cpu_capability()
is not a kind of set or sequence ofstr
s. It returnsstr
, https://pytorch.org/docs/2.2/backends.html#torch.backends.cpu.get_cpu_capability. Therefore, on a AVX512 support machine,torch.backends.cpu.get_cpu_capability()
returns"AVX512"
and it leads tofloat32
casting atvision/torchvision/transforms/v2/functional/_geometry.py
Lines 256 to 258 in 5181a85
although this machine can support AVX2.
Versions
torch>=2.1 and torchvision>=0.16.1
The text was updated successfully, but these errors were encountered: