Repository: pytorch
Issue: After updating to Xcode 12 and LibTorch to 1.7.0. Facing issue when running unit test.
Labels: oncall: jit,oncall: mobile,module: ios,module: arm

## 🐛 Bug

After updating to Xcode 12 and LibTorch 1.7.0. facing issue when running unit test.

**libc++abi.dylib: terminating with uncaught exception of type c10::Error: Type c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > could not be converted to any of the known types.
Exception raised from call at /Users/distiller/project/aten/src/ATen/core/jit_type.h:1703 (most recent call first):**

Same issue is observed when adding 'Quick' to PyTorchDemo

## To Reproduce

Steps to reproduce the behavior:

1. Add 'Quick' project to demo app

> target 'PyTorchDemo' do
>       pod 'LibTorch', '~>1.7.0'
>
>      target 'PyTorchDemoTests' do
>            pod 'Quick'
>      end
> end
> 
2. Run the unit tests

Crash Observed:
```
libc++abi.dylib: terminating with uncaught exception of type c10::Error: Type c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > could not be converted to any of the known types.
Exception raised from call at /Users/distiller/project/aten/src/ATen/core/jit_type.h:1703 (most recent call first):
frame #0: _ZN3c105ErrorC1ENS_14SourceLocationENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 75 (0x1093f0d25 in PyTorchDemo)
frame #1: _ZN3c106detail11getTypePtr_INS_13intrusive_ptrI20ConvPackedParamsBaseILi2EENS0_34intrusive_target_default_null_typeIS4_EEEEE4callEv + 466 (0x10af383ea in PyTorchDemoTests)
frame #2: _ZN3c106detail12infer_schema12_GLOBAL__N_120createArgumentVectorENS_8ArrayRefINS1_11ArgumentDefEEE + 179 (0x10abaa19b in PyTorchDemoTests)
frame #3: _ZN3c106detail12infer_schema20make_function_schemaEONSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_NS_8ArrayRefINS1_11ArgumentDefEEESC_ + 97 (0x10abaa031 in PyTorchDemoTests)
frame #4: _ZN3c106detail30inferFunctionSchemaFromFunctorINS_4impl6detail31WrapFunctionIntoRuntimeFunctor_IPFN2at6TensorES6_RKNS_13intrusive_ptrI20ConvPackedParamsBaseILi2EENS0_34intrusive_target_default_null_typeIS9_EEEEdxES6_NS_4guts8typelist8typelistIJS6_SE_dxEEEEEEENSt3__110unique_ptrINS_14FunctionSchemaENSM_14default_deleteISO_EEEEv + 191 (0x10af2f514 in PyTorchDemoTests)
frame #5: _ZN5torch11CppFunctionC2IFN2at6TensorES3_RKN3c1013intrusive_ptrI20ConvPackedParamsBaseILi2EENS4_6detail34intrusive_target_default_null_typeIS7_EEEEdxEEEPT_NSt3__19enable_ifIXsr3c104guts16is_function_typeISF_EE5valueEDnE4typeE + 51 (0x10af2f2c5 in PyTorchDemoTests)
frame #6: _ZNR5torch7Library4implIPKcRFN2at6TensorES5_RKN3c1013intrusive_ptrI20ConvPackedParamsBaseILi2EENS6_6detail34intrusive_target_default_null_typeIS9_EEEEdxEEERS0_T_OT0_ + 36 (0x10af2f1cc in PyTorchDemoTests)
frame #7: _ZN2at6native12_GLOBAL__N_146TORCH_LIBRARY_IMPL_init_quantized_QuantizedCPUERN5torch7LibraryE + 35 (0x10af2e4bd in PyTorchDemoTests)
frame #8: _ZN5torch6detail16TorchLibraryInitC2ENS_7Library4KindEPFvRS2_EPKcN3c108optionalINS9_11DispatchKeyEEES8_j + 114 (0x10ab2ec8a in PyTorchDemoTests)
frame #9: _GLOBAL__sub_I_qconv.cpp + 81 (0x10af3357b in PyTorchDemoTests)
frame #10: 0x0 + 4468611403 (0x10a59994b in ???)
frame #11: 0x0 + 4468612404 (0x10a599d34 in ???)
frame #12: 0x0 + 4468590745 (0x10a594899 in ???)
frame #13: 0x0 + 4468583344 (0x10a592bb0 in ???)
frame #14: 0x0 + 4468583504 (0x10a592c50 in ???)
frame #15: 0x0 + 4468546279 (0x10a589ae7 in ???)
frame #16: 0x0 + 4468564382 (0x10a58e19e in ???)
frame #17: _ZL15dlopen_internalPKciPv + 177 (0x7fff2025a0ef in libdyld.dylib)
frame #18: _CFBundleDlfcnLoadBundle + 145 (0x7fff20357b7b in CoreFoundation)
frame #19: _CFBundleLoadExecutableAndReturnError + 252 (0x7fff20329597 in CoreFoundation)
frame #20: -[NSBundle + + (0x7fff2072b44a in Foundation)
frame #21: __XCTestBundleInject + 721 (0x10a631519 in libXCTestBundleInject.dylib)
frame #22: 0x0 + 4468611403 (0x10a59994b in ???)
frame #23: 0x0 + 4468612404 (0x10a599d34 in ???)
frame #24: 0x0 + 4468590745 (0x10a594899 in ???)
frame #25: 0x0 + 4468583344 (0x10a592bb0 in ???)
frame #26: 0x0 + 4468583504 (0x10a592c50 in ???)
frame #27: 0x0 + 4468531811 (0x10a586263 in ???)
frame #28: 0x0 + 4468550992 (0x10a58ad50 in ???)
frame #29: 0x0 + 4468527559 (0x10a5851c7 in ???)
frame #30: 0x0 + 4654425466 (0x1156ce57a in ???)
frame #31: 0x0 + 4654415347 (0x1156cbdf3 in ???)
frame #32: 0x0 + 4654391851 (0x1156c622b in ???)
frame #33: 0x0 + 4654391333 (0x1156c6025 in ???)

terminating with uncaught exception of type c10::Error: Type c10::intrusive_ptr<ConvPackedParamsBase<2>, c10::detail::intrusive_target_default_null_type<ConvPackedParamsBase<2> > > could not be converted to any of the known types.
Exception raised from call at /Users/distiller/project/aten/src/ATen/core/jit_type.h:1703 (most recent call first):
frame #0: _ZN3c105ErrorC1ENS_14SourceLocationENSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE + 75 (0x1093f0d25 in PyTorchDemo)
frame #1: _ZN3c106detail11getTypePtr_INS_13intrusive_ptrI20ConvPackedParamsBaseILi2EENS0_34intrusive_target_default_null_typeIS4_EEEEE4callEv + 466 (0x10af383ea in PyTorchDemoTests)
frame #2: _ZN3c106detail12infer_schema12_GLOBAL__N_120createArgumentVectorENS_8ArrayRefINS1_11ArgumentDefEEE + 179 (0x10abaa19b in PyTorchDemoTests)
frame #3: _ZN3c106detail12infer_schema20make_function_schemaEONSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEES9_NS_8ArrayRefINS1_11ArgumentDefEEESC_ + 97 (0x10abaa031 in PyTorchDemoTests)
frame #4: _ZN3c106detail30inferFunctionSchemaFromFunctorINS_4impl6detail31WrapFunctionIntoRuntimeFunctor_IPFN2at6TensorES6_RKNS_13intrusive_ptrI20ConvPackedParamsBaseILi2EENS0_34intrusive_target_default_null_typeIS9_EEEEdxES6_NS_4guts8typelist8typelistIJS6_SE_dxEEEEEEENSt3__110unique_ptrINS_14FunctionSchemaENSM_14default_deleteISO_EEEEv + 191 (0x10af2f514 in PyTorchDemoTests)
frame #5: _ZN5torch11CppFunctionC2IFN2at6TensorES3_RKN3c1013intrusive_ptrI20ConvPackedParamsBaseILi2EENS4_6detail34intrusive_target_default_null_typeIS7_EEEEdxEEEPT_NSt3__19enable_ifIXsr3c104guts16is_function_typeISF_EE5valueEDnE4typeE + 51 (0x10af2f2c5 in PyTorchDemoTests)
frame #6: _ZNR5torch7Library4implIPKcRFN2at6TensorES5_RKN3c1013intrusive_ptrI20ConvPackedParamsBaseILi2EENS6_6detail34intrusive_target_default_null_typeIS9_EEEEdxEEERS0_T_OT0_ + 36 (0x10af2f1cc in PyTorchDemoTests)
frame #7: _ZN2at6native12_GLOBAL__N_146TORCH_LIBRARY_IMPL_init_quantized_QuantizedCPUERN5torch7LibraryE + 35 (0x10af2e4bd in PyTorchDemoTests)
frame #8: _ZN5torch6detail16TorchLibraryInitC2ENS_7Library4KindEPFvRS2_EPKcN3c108optionalINS9_11DispatchKeyEEES8_j + 114 (0x10ab2ec8a in PyTorchDemoTests)
frame #9: _GLOBAL__sub_I_qconv.cpp + 81 (0x10af3357b in PyTorchDemoTests)
frame #10: 0x0 + 4468611403 (0x10a59994b in ???)
frame #11: 0x0 + 4468612404 (0x10a599d34 in ???)
frame #12: 0x0 + 4468590745 (0x10a594899 in ???)
frame #13: 0x0 + 4468583344 (0x10a592bb0 in ???)
frame #14: 0x0 + 4468583504 (0x10a592c50 in ???)
frame #15: 0x0 + 4468546279 (0x10a589ae7 in ???)
frame #16: 0x0 + 4468564382 (0x10a58e19e in ???)
frame #17: _ZL15dlopen_internalPKciPv + 177 (0x7fff2025a0ef in libdyld.dylib)
frame #18: _CFBundleDlfcnLoadBundle + 145 (0x7fff20357b7b in CoreFoundation)
frame #19: _CFBundleLoadExecutableAndReturnError + 252 (0x7fff20329597 in CoreFoundation)
frame #20: -[NSBundle + + (0x7fff2072b44a in Foundation)
frame #21: __XCTestBundleInject + 721 (0x10a631519 in libXCTestBundleInject.dylib)
frame #22: 0x0 + 4468611403 (0x10a59994b in ???)
frame #23: 0x0 + 4468612404 (0x10a599d34 in ???)
frame #24: 0x0 + 4468590745 (0x10a594899 in ???)
frame #25: 0x0 + 4468583344 (0x10a592bb0 in ???)
frame #26: 0x0 + 4468583504 (0x10a592c50 in ???)
frame #27: 0x0 + 4468531811 (0x10a586263 in ???)
frame #28: 0x0 + 4468550992 (0x10a58ad50 in ???)
frame #29: 0x0 + 4468527559 (0x10a5851c7 in ???)
frame #30: 0x0 + 4654425466 (0x1156ce57a in ???)
frame #31: 0x0 + 4654415347 (0x1156cbdf3 in ???)
frame #32: 0x0 + 4654391851 (0x1156c622b in ???)
frame #33: 0x0 + 4654391333 (0x1156c6025 in ???)
```


## Expected behaviour
It should not crash after updating 


cc @malfet @gmagogsfm