Repository: pytorch
Issue: [Android] Unknown builtin op: aten::reflection_pad3d
Labels: oncall: mobile,Stale

### 🐛 Describe the bug

Loading a SSD pytorch model to Android Studio I have encountered that reflection_pad3d in't supported. Here's my Google Collab script:
 ```
import torch
import torchvision

model = torchvision.models.detection.ssd300_vgg16(pretrained = True)
model.eval()
scriptedm = torch.jit.script(model)
torch.jit.save(scriptedm, 'ssdmodel.pt')
```
Then, on Android Studio I have added on build.gradle:
````
dependencies {
    implementation 'org.pytorch:pytorch_android_lite:1.10.0'
    implementation 'org.pytorch:pytorch_android_torchvision_lite:1.10.0'
    implementation 'org.pytorch:torchvision_ops:0.10.0'
    implementation 'com.facebook.soloader:nativeloader:0.10.3'
}
````
and:
````
android {
    compileSdkVersion 31
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.example.myapp"
        minSdkVersion 28
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    packagingOptions {
        pickFirst "**"
    }
}
````
On MainActivity.java:
````
public class MainActivity extends AppCompatActivity {

    static {
        if (!NativeLoader.isInitialized()) {
            NativeLoader.init(new SystemDelegate());
        }
        NativeLoader.loadLibrary("pytorch_jni");
        NativeLoader.loadLibrary("torchvision_ops");
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        Module mModule = null;

        try {
            mModule = Module.load(assetFilePath(this, "ssdmodel.pt"));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    public static String assetFilePath(Context context, String assetName) throws IOException {
        File file = new File(context.getFilesDir(), assetName);
        if (file.exists() && file.length() > 0) {
            return file.getAbsolutePath();
        }

        try (InputStream is = context.getAssets().open(assetName)) {
            try (OutputStream os = new FileOutputStream(file)) {
                byte[] buffer = new byte[4 * 1024];
                int read;
                while ((read = is.read(buffer)) != -1) {
                    os.write(buffer, 0, read);
                }
                os.flush();
            }
            return file.getAbsolutePath();
        }
    }

}
````

The error is the following one:
````
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.myapp, PID: 8618
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/com.example.myapp.MainActivity}: com.facebook.jni.CppException: 
    Unknown builtin op: aten::reflection_pad3d.
    Here are some suggestions: 
    	aten::reflection_pad2d
    	aten::reflection_pad1d
    
    The original call is:
      File "/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py", line 4199
            elif len(pad) == 6 and (input.dim() == 4 or input.dim() == 5):
                if mode == "reflect":
                    return torch._C._nn.reflection_pad3d(input, pad)
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
                elif mode == "replicate":
                    return torch._C._nn.replication_pad3d(input, pad)
    Serialized   File "code/__torch__/torch/nn/functional.py", line 227
            if _51:
              if torch.eq(mode, "reflect"):
                _56 = torch.reflection_pad3d(input, pad)
                      ~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
                _55 = _56
              else:
    
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: com.facebook.jni.CppException: 
    Unknown builtin op: aten::reflection_pad3d.
    Here are some suggestions: 
    	aten::reflection_pad2d
    	aten::reflection_pad1d
    
    The original call is:
      File "/usr/local/lib/python3.7/dist-packages/torch/nn/functional.py", line 4199
            elif len(pad) == 6 and (input.dim() == 4 or input.dim() == 5):
                if mode == "reflect":
                    return torch._C._nn.reflection_pad3d(input, pad)
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
                elif mode == "replicate":
                    return torch._C._nn.replication_pad3d(input, pad)
    Serialized   File "code/__torch__/torch/nn/functional.py", line 227
            if _51:
              if torch.eq(mode, "reflect"):
                _56 = torch.reflection_pad3d(input, pad)
                      ~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
                _55 = _56
              else:
    
        at org.pytorch.NativePeer.initHybrid(Native Method)
        at org.pytorch.NativePeer.<init>(NativePeer.java:27)
        at org.pytorch.Module.load(Module.java:28)
        at org.pytorch.Module.load(Module.java:38)
        at com.example.myfirstmalariaproto.MainActivity.onCreate(MainActivity.java:42)
        at android.app.Activity.performCreate(Activity.java:8000)
        at android.app.Activity.performCreate(Activity.java:7984)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
        	... 11 more
````

### Versions

PyTorch version: 1.10.0+cu111
Is debug build: False
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A

OS: Ubuntu 18.04.5 LTS (x86_64)
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Clang version: 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
CMake version: version 3.12.0
Libc version: glibc-2.26

Python version: 3.7.12 (default, Sep 10 2021, 00:21:48)  [GCC 7.5.0] (64-bit runtime)
Python platform: Linux-5.4.104+-x86_64-with-Ubuntu-18.04-bionic
Is CUDA available: True
CUDA runtime version: 11.1.105
GPU models and configuration: GPU 0: Tesla K80
Nvidia driver version: 460.32.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.7.6.5
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.0.5
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.0.5
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.5
[pip3] torch==1.10.0+cu111
[pip3] torchaudio==0.10.0+cu111
[pip3] torchsummary==1.5.1
[pip3] torchtext==0.11.0
[pip3] torchvision==0.11.1+cu111
[conda] Could not collect