Hello, community!
I’m writing pytorch code that uses a lot of logarithms, and it’s slower than ideal. When writing raw CUDA code, I’ve been able to speed things up using CUDA intrinsics, which gives approximate logarithms at the cost of a small amount of accuracy:

  
      docs.nvidia.com
  
  
    

CUDA Math API :: CUDA Toolkit Documentation 1



  
  
    
    
  
  


Is there any way to use these approximations within pytorch? I couldn’t see any options for torch.log, but maybe the functionality is elsewhere.