ROCm / torch_migraphx

Libraries integrating migraphx with pytorch
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Investigate NHWC Support in torch_migraphx #182

Closed shivadbhavsar closed 2 days ago

shivadbhavsar commented 2 weeks ago

See https://pytorch.org/tutorials/intermediate/memory_format_tutorial.html

  1. Investigate supporting a single convolution call done in nhwc

Once this is figured out:

  1. Implement support and add a test case for single convolution in nhwc
  2. Make sure this runs with resnet50 and add that to the model level test cases
shivadbhavsar commented 2 weeks ago

Turns out we need the resnet50-nhwc-fixes branch for migraphx to use nhwc kernels.

required environment variables: export PYTORCH_MIOPEN_SUGGEST_NHWC=1 export MIGRAPHX_MLIR_USE_SPECIFIC_OPS=convolution,fused

Since, the requires changes are not in migraphx master yet, lets just verify that using this branch we are able to get accurate results for resnet models, and add an nhwc option in the torch_migraphx/tools/perf/benchmark_torchvision.py script