It’s in org.pytorch package
import org.pytorch.PyTorchAndroid;

...
    PyTorchAndroid.nativeStdOutErrToLogcat()
...

Importing the whole class should work. It’s packaged in pytorch_android*aar
I have added example of its usage to this commit:

  
      github.com/pytorch/pytorch
  
  
    
  
    
  

  
    
      [NFC][WIP] Android native stdout,stderr to logcat 4
    

    
      
        committed 
        
          
        
        Dec 17, 2019
      
      

      
        
          
          IvanKobzarev
        
        
      

      
        
          +34
          -0
        
      
    

  





  
  
    
    
  
  


(the branch is https://github.com/pytorch/pytorch/compare/ik_wip_android_stdouterr_to_logcat 1)
We already use org.pytorch.PyTorchAndroid in our testapp in repo for loading module from asset:
https://github.com/pytorch/pytorch/blob/master/android/test_app/app/src/main/java/org/pytorch/testapp/MainActivity.java#L94 3