Just looking at this more closely.
Is there a case sensitive issue or just no unit test around this for the changes to the metal to conv2d prepack? Seems like it is supported, just not working, maybe a previous version works.
I see the support implementation in PRs like [iOS GPU][Stub] Move conv2d_prepack impl from MetalPrepackOpRegister.… · pytorch/pytorch@8ae8fb7 · GitHub 1
The error seems to be the error is
/usr/local/lib/python3.7/dist-packages/torch/utils/mobile_optimizer.py in optimize_for_mobile(script_module, optimization_blocklist, preserved_methods, backend)
67         optimized_cpp_module = torch._C._jit_pass_vulkan_optimize_for_mobile(script_module._c, preserved_methods_str)
68     elif backend == ‘metal’:
—> 69         optimized_cpp_module = torch._C._jit_pass_metal_optimize_for_mobile(script_module._c, preserved_methods_str)
70     else:
71         raise TypeError(“Unknown backend, must be one of ‘CPU’, ‘Vulkan’ or ‘Metal’”)
Seems like a small compilation issue. I tried switching the label on export to ‘Metal’ no affect