I see Tensor::slice being called, for example, in this code.https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/native/Integration.cpp 26
However, slice() is not listed in any of the following files

  
      github.com
  
  
    pytorch/pytorch/blob/master/aten/src/ATen/Tensor.h 7
#pragma once

/*
 * We split Tensor.h into TensorBody.h and TensorMethods.h because we want
 * all TensorMethods to be inlined, but they depend on the Dispatcher,
 * which in turn depends on many other things, which then depend back on Tensor.
 *
 * We can break this dependency chain by having the dispatcher only depend on
 * TensorBody.h and not TensorMethods.h.
 */
#include <ATen/core/TensorBody.h>
#include <ATen/core/TensorMethods.h>



  
  
    
    
  
  



  
      github.com
  
  
    pytorch/pytorch/blob/master/aten/src/ATen/templates/TensorBody.h 4
#pragma once

#include <c10/core/Device.h>
#include <c10/core/Layout.h>
#include <c10/core/MemoryFormat.h>
#include <c10/core/QScheme.h>
#include <c10/core/Scalar.h>
#include <c10/core/ScalarType.h>
#include <c10/core/Storage.h>
#include <ATen/core/TensorAccessor.h>
#include <c10/core/TensorImpl.h>
#include <c10/core/UndefinedTensorImpl.h>
#include <c10/util/Exception.h>
#include <c10/util/Deprecated.h>
#include <c10/util/Optional.h>
#include <c10/util/intrusive_ptr.h>
#include <ATen/core/DeprecatedTypePropertiesRegistry.h>
#include <ATen/core/DeprecatedTypeProperties.h>
#include <ATen/core/EnableNamedTensor.h>
#include <ATen/core/NamedTensor.h>


  This file has been truncated. show original

  
  
    
    
  
  



  
      github.com
  
  
    pytorch/pytorch/blob/master/aten/src/ATen/templates/TensorMethods.h 3
#pragma once

#include <c10/core/Scalar.h>
#include <c10/core/MemoryFormat.h>
#include <c10/core/QScheme.h>
#include <c10/macros/Macros.h>
#include <c10/core/TensorOptions.h>
#include <c10/util/intrusive_ptr.h>
#include <ATen/core/DeprecatedTypeProperties.h>
#include <ATen/core/ATenDispatch.h>
#include <ATen/core/dispatch/Dispatcher.h>
#include <ATen/core/NamedTensor.h>
#include <ATen/core/EnableNamedTensor.h>

#ifdef USE_STATIC_DISPATCH
#include <ATen/TypeDefault.h>
#include <ATen/CPUType.h>
#include <ATen/QuantizedCPUType.h>
#include <ATen/SparseCPUType.h>
#endif


  This file has been truncated. show original

  
  
    
    
  
  


I understand that there is some code generation that is happening, and maybe that the function is being injected by a python script.