Hello @mohit7,
Sorry for inconvenience.
We moved setNumThreads method to separate class org.pytorch.PyTorchAndroid as a static method.

  
      github.com
  
  
    pytorch/pytorch/blob/master/android/pytorch_android/src/main/java/org/pytorch/PyTorchAndroid.java#L33 7

  public static Module loadModuleFromAsset(final AssetManager assetManager, final String assetName) {
    return new Module(new NativePeer(assetName, assetManager));
  }


  /**
   * Globally sets the number of threads used on native side. Attention: Has global effect, all
   * modules use one thread pool with specified number of threads.
   *
   * @param numThreads number of threads, must be positive number.
   */
  public static void setNumThreads(int numThreads) {
    if (numThreads < 1) {
      throw new IllegalArgumentException("Number of threads cannot be less than 1");
    }


    nativeSetNumThreads(numThreads);
  }


  private static native void nativeSetNumThreads(int numThreads);
}