functorch.compile.memory_efficient_fusion errors with: RuntimeError: forward() Expected a value of type 'Tensor (inferred)' for argument 'primals_356' but instead found type 'int'. 
Labels: triaged, module: functorch

### 🐛 Describe the bug

Using `functorch.compile.memory_efficient_fusion(model)` returns the following error during the forward pass of the model:

```
usr/local/lib/python3.9/dist-packages/torch/jit/_check.py:181: UserWarning: The TorchScript type system doesn't support instance-level annotations on empty non-base types in `__init__`. Instead, either 1) use a type annotation in the class body, or 2) wrap the type in `torch.jit.Attribute`.
  warnings.warn("The TorchScript type system doesn't support "
[W ir_emitter.cpp:4377] Warning: List consists of heterogeneous types, which means that it has been typed as containing Union[Tensor, int]. To use any of the values in this List, it will be necessary to add an `assert isinstance` statement before first use to trigger type refinement.
  File "<eval_with_key>.8", line 636
    add_75 = torch.ops.aten.add(slice_18, slice_20);  slice_18 = slice_20 = None
    view_14 = torch.ops.aten.view(add_75, [-1, 4]);  add_75 = None
    return [convolution_69, convolution_79, convolution_89, convolution_99, convolution_109, convolution_70, convolution_80, convolution_90, convolution_100, convolution_110, view_2, view_5, view_8, view_11, view_14, 800, 1067, primals_358, 960, 1280, 1306, 800, 1088, 800, 1088, 800, 1067, primals_363, 960, 1280, 1158, 800, 1088, 800, 1088, primals_2, primals_5, primals_8, primals_11, primals_14, primals_17, primals_20, primals_23, primals_26, primals_29, primals_32, primals_35, primals_38, primals_41, primals_44, primals_47, primals_50, primals_53, primals_56, primals_59, primals_62, primals_65, primals_68, primals_71, primals_74, primals_77, primals_80, primals_83, primals_86, primals_89, primals_92, primals_95, primals_98, primals_101, primals_104, primals_107, primals_110, primals_113, primals_116, primals_119, primals_122, primals_125, primals_128, primals_131, primals_134, primals_137, primals_140, primals_143, primals_146, primals_149, primals_152, primals_155, primals_158, primals_196, primals_197, primals_199, primals_200, primals_202, primals_203, primals_205, primals_206, primals_208, primals_209, primals_211, primals_212, primals_214, primals_215, primals_217, primals_218, primals_220, primals_221, primals_223, primals_224, primals_226, primals_227, primals_229, primals_230, primals_232, primals_233, primals_235, primals_236, primals_238, primals_239, primals_241, primals_242, primals_244, primals_245, primals_247, primals_248, primals_250, primals_251, primals_253, primals_254, primals_256, primals_257, primals_259, primals_260, primals_262, primals_263, primals_265, primals_266, primals_268, primals_269, primals_271, primals_272, primals_274, primals_275, primals_277, primals_278, primals_280, primals_281, primals_283, primals_284, primals_286, primals_287, primals_289, primals_290, primals_292, primals_293, primals_295, primals_296, primals_298, primals_299, primals_301, primals_302, primals_304, primals_305, primals_307, primals_308, primals_310, primals_311, primals_313, primals_314, primals_316, primals_317, primals_319, primals_320, primals_322, primals_323, primals_325, primals_326, primals_328, primals_329, primals_331, primals_332, primals_334, primals_335, primals_337, primals_338, primals_340, primals_341, primals_343, primals_344, primals_346, primals_347, primals_349, primals_350, primals_352, primals_353, _to_copy, _to_copy_1, convolution, getitem_1, getitem_2, relu, getitem_3, getitem_4, _to_copy_2, convolution_1, getitem_6, getitem_7, relu_1, _to_copy_3, convolution_2, getitem_9, getitem_10, relu_2, _to_copy_4, convolution_3, getitem_12, getitem_13, _to_copy_5, convolution_4, getitem_15, getitem_16, relu_3, _to_copy_6, convolution_5, getitem_18, getitem_19, relu_4, _to_copy_7, convolution_6, getitem_21, getitem_22, relu_5, _to_copy_8, convolution_7, getitem_24, getitem_25, relu_6, _to_copy_9, convolution_8, getitem_27, getitem_28, relu_7, _to_copy_10, convolution_9, getitem_30, getitem_31, relu_8, _to_copy_11, convolution_10, getitem_33, getitem_34, relu_9, _to_copy_12, convolution_11, getitem_36, getitem_37, relu_10, _to_copy_13, convolution_12, getitem_39, getitem_40, relu_11, _to_copy_14, convolution_13, getitem_42, getitem_43, _to_copy_15, convolution_14, getitem_45, getitem_46, relu_12, _to_copy_16, convolution_15, getitem_48, getitem_49, relu_13, _to_copy_17, convolution_16, getitem_51, getitem_52, relu_14, _to_copy_18, convolution_17, getitem_54, getitem_55, relu_15, _to_copy_19, convolution_18, getitem_57, getitem_58, relu_16, _to_copy_20, convolution_19, getitem_60, getitem_61, relu_17, _to_copy_21, convolution_20, getitem_63, getitem_64, relu_18, _to_copy_22, convolution_21, getitem_66, getitem_67, relu_19, _to_copy_23, convolution_22, getitem_69, getitem_70, relu_20, _to_copy_24, convolution_23, getitem_72, getitem_73, relu_21, _to_copy_25, convolution_24, getitem_75, getitem_76, relu_22, _to_copy_26, convolution_25, getitem_78, getitem_79, relu_23, _to_copy_27, convolution_26, getitem_81, getitem_82, _to_copy_28, convolution_27, getitem_84, getitem_85, relu_24, _to_copy_29, convolution_28, getitem_87, getitem_88, relu_25, _to_copy_30, convolution_29, getitem_90, getitem_91, relu_26, _to_copy_31, convolution_30, getitem_93, getitem_94, relu_27, _to_copy_32, convolution_31, getitem_96, getitem_97, relu_28, _to_copy_33, convolution_32, getitem_99, getitem_100, relu_29, _to_copy_34, convolution_33, getitem_102, getitem_103, relu_30, _to_copy_35, convolution_34, getitem_105, getitem_106, relu_31, _to_copy_36, convolution_35, getitem_108, getitem_109, relu_32, _to_copy_37, convolution_36, getitem_111, getitem_112, relu_33, _to_copy_38, convolution_37, getitem_114, getitem_115, relu_34, _to_copy_39, convolution_38, getitem_117, getitem_118, relu_35, _to_copy_40, convolution_39, getitem_120, getitem_121, relu_36, _to_copy_41, convolution_40, getitem_123, getitem_124, relu_37, _to_copy_42, convolution_41, getitem_126, getitem_127, relu_38, _to_copy_43, convolution_42, getitem_129, getitem_130, relu_39, _to_copy_44, convolution_43, getitem_132, getitem_133, relu_40, _to_copy_45, convolution_44, getitem_135, getitem_136, relu_41, _to_copy_46, convolution_45, getitem_138, getitem_139, _to_copy_47, convolution_46, getitem_141, getitem_142, relu_42, _to_copy_48, convolution_47, getitem_144, getitem_145, relu_43, _to_copy_49, convolution_48, getitem_147, getitem_148, relu_44, _to_copy_50, convolution_49, getitem_150, getitem_151, relu_45, _to_copy_51, convolution_50, getitem_153, getitem_154, relu_46, _to_copy_52, convolution_51, getitem_156, getitem_157, relu_47, _to_copy_53, convolution_52, getitem_159, getitem_160, relu_48, _to_copy_55, convolution_53, _to_copy_57, convolution_54, _to_copy_59, add_69, _to_copy_61, convolution_56, _to_copy_63, add_70, _to_copy_65, convolution_58, _to_copy_67, convolution_59, _to_copy_69, convolution_60, _to_copy_71, relu_50, _to_copy_73, relu_51, _to_copy_75, relu_52, _to_copy_77, relu_53, _to_copy_79, relu_54, _to_copy_81, relu_55, _to_copy_83, relu_56, _to_copy_85, relu_57, _to_copy_87, _to_copy_89, relu_58, relu_59, relu_60, relu_61, relu_62, relu_63, relu_64, relu_65, relu_66, relu_67, relu_68, relu_69, relu_70, relu_71, relu_72, relu_73, relu_74, relu_75, relu_76, relu_77, relu_78, relu_79, relu_80, relu_81, relu_82, relu_83, relu_84, relu_85, relu_86, relu_87, relu_88, relu_89]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~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~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
 (function emitListLiteral)
Traceback (most recent call last):
  File "/notebooks/prediction_net/tool/main.py", line 145, in <module>
    main()
  File "/notebooks/prediction_net/tool/main.py", line 117, in main
    total_iter = train_one_epoch(epoch, cfg, train_loader, network,
  File "/notebooks/prediction_net/tool/engine.py", line 128, in train_one_epoch
    with amp_autocast():
  File "/usr/local/lib/python3.9/dist-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/usr/local/lib/python3.9/dist-packages/functorch/_src/aot_autograd.py", line 705, in forward
    return compiled_f(
  File "/usr/local/lib/python3.9/dist-packages/functorch/_src/aot_autograd.py", line 656, in returned_function
    compiled_fn = create_aot_dispatcher_function(
  File "/usr/local/lib/python3.9/dist-packages/functorch/_src/aot_autograd.py", line 509, in create_aot_dispatcher_function
    aot_dispatch_autograd(flat_fn, fake_flat_tensor_args, aot_config)
  File "/usr/local/lib/python3.9/dist-packages/functorch/_src/aot_autograd.py", line 398, in aot_dispatch_autograd
    compiled_fw_func = aot_config.fw_compiler(fw_module, deduped_flat_args)
  File "/usr/local/lib/python3.9/dist-packages/functorch/_src/aot_autograd.py", line 238, in f
    out_f = compiler(fx_g, inps)
  File "/usr/local/lib/python3.9/dist-packages/functorch/_src/compilers.py", line 88, in ts_compile
    f(*inps)
  File "/usr/local/lib/python3.9/dist-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
RuntimeError: forward() Expected a value of type 'Tensor (inferred)' for argument 'primals_356' but instead found type 'int'.
Inferred 'primals_356' to be of type 'Tensor' because it was not annotated with an explicit type.
Position: 356
Value: 800
Declaration: forward(__torch__.torch.fx.graph_module.___torch_mangle_0.GraphModule self, Tensor primals_1, Tensor primals_2, Tensor primals_3, Tensor primals_4, Tensor primals_5, Tensor primals_6, Tensor primals_7, Tensor primals_8, Tensor primals_9, Tensor primals_10, Tensor primals_11, Tensor primals_12, Tensor primals_13, Tensor primals_14, Tensor primals_15, Tensor primals_16, Tensor primals_17, Tensor primals_18, Tensor primals_19, Tensor primals_20, Tensor primals_21, Tensor primals_22, Tensor primals_23, Tensor primals_24, Tensor primals_25, Tensor primals_26, Tensor primals_27, Tensor primals_28, Tensor primals_29, Tensor primals_30, Tensor primals_31, Tensor primals_32, Tensor primals_33, Tensor primals_34, Tensor primals_35, Tensor primals_36, Tensor primals_37, Tensor primals_38, Tensor primals_39, Tensor primals_40, Tensor primals_41, Tensor primals_42, Tensor primals_43, Tensor primals_44, Tensor primals_45, Tensor primals_46, Tensor primals_47, Tensor primals_48, Tensor primals_49, Tensor primals_50, Tensor primals_51, Tensor primals_52, Tensor primals_53, Tensor primals_54, Tensor primals_55, Tensor primals_56, Tensor primals_57, Tensor primals_58, Tensor primals_59, Tensor primals_60, Tensor primals_61, Tensor primals_62, Tensor primals_63, Tensor primals_64, Tensor primals_65, Tensor primals_66, Tensor primals_67, Tensor primals_68, Tensor primals_69, Tensor primals_70, Tensor primals_71, Tensor primals_72, Tensor primals_73, Tensor primals_74, Tensor primals_75, Tensor primals_76, Tensor primals_77, Tensor primals_78, Tensor primals_79, Tensor primals_80, Tensor primals_81, Tensor primals_82, Tensor primals_83, Tensor primals_84, Tensor primals_85, Tensor primals_86, Tensor primals_87, Tensor primals_88, Tensor primals_89, Tensor primals_90, Tensor primals_91, Tensor primals_92, Tensor primals_93, Tensor primals_94, Tensor primals_95, Tensor primals_96, Tensor primals_97, Tensor primals_98, Tensor primals_99, Tensor primals_100, Tensor primals_101, Tensor primals_102, Tensor primals_103, Tensor primals_104, Tensor primals_105, Tensor primals_106, Tensor primals_107, Tensor primals_108, Tensor primals_109, Tensor primals_110, Tensor primals_111, Tensor primals_112, Tensor primals_113, Tensor primals_114, Tensor primals_115, Tensor primals_116, Tensor primals_117, Tensor primals_118, Tensor primals_119, Tensor primals_120, Tensor primals_121, Tensor primals_122, Tensor primals_123, Tensor primals_124, Tensor primals_125, Tensor primals_126, Tensor primals_127, Tensor primals_128, Tensor primals_129, Tensor primals_130, Tensor primals_131, Tensor primals_132, Tensor primals_133, Tensor primals_134, Tensor primals_135, Tensor primals_136, Tensor primals_137, Tensor primals_138, Tensor primals_139, Tensor primals_140, Tensor primals_141, Tensor primals_142, Tensor primals_143, Tensor primals_144, Tensor primals_145, Tensor primals_146, Tensor primals_147, Tensor primals_148, Tensor primals_149, Tensor primals_150, Tensor primals_151, Tensor primals_152, Tensor primals_153, Tensor primals_154, Tensor primals_155, Tensor primals_156, Tensor primals_157, Tensor primals_158, Tensor primals_159, Tensor primals_160, Tensor primals_161, Tensor primals_162, Tensor primals_163, Tensor primals_164, Tensor primals_165, Tensor primals_166, Tensor primals_167, Tensor primals_168, Tensor primals_169, Tensor primals_170, Tensor primals_171, Tensor primals_172, Tensor primals_173, Tensor primals_174, Tensor primals_175, Tensor primals_176, Tensor primals_177, Tensor primals_178, Tensor primals_179, Tensor primals_180, Tensor primals_181, Tensor primals_182, Tensor primals_183, Tensor primals_184, Tensor primals_185, Tensor primals_186, Tensor primals_187, Tensor primals_188, Tensor primals_189, Tensor primals_190, Tensor primals_191, Tensor primals_192, Tensor primals_193, Tensor primals_194, Tensor primals_195, Tensor primals_196, Tensor primals_197, Tensor primals_198, Tensor primals_199, Tensor primals_200, Tensor primals_201, Tensor primals_202, Tensor primals_203, Tensor primals_204, Tensor primals_205, Tensor primals_206, Tensor primals_207, Tensor primals_208, Tensor primals_209, Tensor primals_210, Tensor primals_211, Tensor primals_212, Tensor primals_213, Tensor primals_214, Tensor primals_215, Tensor primals_216, Tensor primals_217, Tensor primals_218, Tensor primals_219, Tensor primals_220, Tensor primals_221, Tensor primals_222, Tensor primals_223, Tensor primals_224, Tensor primals_225, Tensor primals_226, Tensor primals_227, Tensor primals_228, Tensor primals_229, Tensor primals_230, Tensor primals_231, Tensor primals_232, Tensor primals_233, Tensor primals_234, Tensor primals_235, Tensor primals_236, Tensor primals_237, Tensor primals_238, Tensor primals_239, Tensor primals_240, Tensor primals_241, Tensor primals_242, Tensor primals_243, Tensor primals_244, Tensor primals_245, Tensor primals_246, Tensor primals_247, Tensor primals_248, Tensor primals_249, Tensor primals_250, Tensor primals_251, Tensor primals_252, Tensor primals_253, Tensor primals_254, Tensor primals_255, Tensor primals_256, Tensor primals_257, Tensor primals_258, Tensor primals_259, Tensor primals_260, Tensor primals_261, Tensor primals_262, Tensor primals_263, Tensor primals_264, Tensor primals_265, Tensor primals_266, Tensor primals_267, Tensor primals_268, Tensor primals_269, Tensor primals_270, Tensor primals_271, Tensor primals_272, Tensor primals_273, Tensor primals_274, Tensor primals_275, Tensor primals_276, Tensor primals_277, Tensor primals_278, Tensor primals_279, Tensor primals_280, Tensor primals_281, Tensor primals_282, Tensor primals_283, Tensor primals_284, Tensor primals_285, Tensor primals_286, Tensor primals_287, Tensor primals_288, Tensor primals_289, Tensor primals_290, Tensor primals_291, Tensor primals_292, Tensor primals_293, Tensor primals_294, Tensor primals_295, Tensor primals_296, Tensor primals_297, Tensor primals_298, Tensor primals_299, Tensor primals_300, Tensor primals_301, Tensor primals_302, Tensor primals_303, Tensor primals_304, Tensor primals_305, Tensor primals_306, Tensor primals_307, Tensor primals_308, Tensor primals_309, Tensor primals_310, Tensor primals_311, Tensor primals_312, Tensor primals_313, Tensor primals_314, Tensor primals_315, Tensor primals_316, Tensor primals_317, Tensor primals_318, Tensor primals_319, Tensor primals_320, Tensor primals_321, Tensor primals_322, Tensor primals_323, Tensor primals_324, Tensor primals_325, Tensor primals_326, Tensor primals_327, Tensor primals_328, Tensor primals_329, Tensor primals_330, Tensor primals_331, Tensor primals_332, Tensor primals_333, Tensor primals_334, Tensor primals_335, Tensor primals_336, Tensor primals_337, Tensor primals_338, Tensor primals_339, Tensor primals_340, Tensor primals_341, Tensor primals_342, Tensor primals_343, Tensor primals_344, Tensor primals_345, Tensor primals_346, Tensor primals_347, Tensor primals_348, Tensor primals_349, Tensor primals_350, Tensor primals_351, Tensor primals_352, Tensor primals_353, Tensor primals_354, Tensor primals_355, Tensor primals_356, Tensor primals_357, Tensor primals_358, Tensor primals_359, Tensor primals_360, Tensor primals_361, Tensor primals_362, Tensor primals_363, Tensor primals_364, Tensor primals_365, Tensor primals_366, Tensor primals_367, Tensor primals_368, Tensor primals_369, Tensor primals_370) -> Union(Tensor, int)[]
Cast error details: Unable to cast 800 to Tensor
root@n7cgce6uqy:/notebooks/prediction_net# 
```
Unfortuantely, there is no trace within the code I wrote, so I find it a bit hard to debugg. 

What are primals? Is there a way for me to connect it to the underlying operations of the model?

Is there any way I could gather more info about this error? Should I step through some underlying function calls and report intermediate results? 

### Versions

Collecting environment information...
PyTorch version: 1.13.1+cu116
Is debug build: False
CUDA used to build PyTorch: 11.6
ROCM used to build PyTorch: N/A

OS: Ubuntu 20.04.4 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: version 3.24.20220712-g2b37f48
Libc version: glibc-2.31

Python version: 3.9.13 (main, May 23 2022, 22:01:06)  [GCC 9.4.0] (64-bit runtime)
Python platform: Linux-5.4.0-122-generic-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 11.2.152
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: Quadro M4000
Nvidia driver version: 510.73.05
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.1.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.1.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   46 bits physical, 48 bits virtual
CPU(s):                          8
On-line CPU(s) list:             0-7
Thread(s) per core:              1
Core(s) per socket:              8
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           79
Model name:                      Intel(R) Xeon(R) CPU E5-2623 v4 @ 2.60GHz
Stepping:                        1
CPU MHz:                         2600.110
BogoMIPS:                        5199.99
Hypervisor vendor:               Xen
Virtualization type:             full
L1d cache:                       256 KiB
L1i cache:                       256 KiB
L2 cache:                        2 MiB
L3 cache:                        80 MiB
NUMA node0 CPU(s):               0-7
Vulnerability Itlb multihit:     KVM: Vulnerable
Vulnerability L1tf:              Mitigation; PTE Inversion
Vulnerability Mds:               Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown:          Mitigation; PTI
Vulnerability Mmio stale data:   Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1:        Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2:        Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP disabled, RSB filling
Vulnerability Srbds:             Not affected
Vulnerability Tsx async abort:   Not affected
Flags:                           fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush acpi mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single pti intel_ppin ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid rdseed adx smap xsaveopt md_clear flush_l1d

Versions of relevant libraries:
[pip3] numpy==1.23.1
[pip3] pytorch3d==0.7.2
[pip3] torch==1.13.1+cu116
[pip3] torch-tb-profiler==0.4.1
[pip3] torchaudio==0.13.1+cu116
[pip3] torchvision==0.14.1+cu116
[conda] Could not collect

cc @zou3519 @Chillee @samdow @soumith @kshitij12345 @janeyx99