This file serves a BKM to get better performance on CPU for PyTorch, mostly focusing on inference or deployment. Chinese version available here.
Right now, on PyTorch CPU path, you may choose to use 3 types of memory formats.
- torch.contiguous_format: default memory format, also referred as NHCW.
- torch.channels_last: also referred as NHWC.
- torch._mkldnn: mkldnn blocked format.