/usr/local/lib64/python3.6/site-packages/torch/include/ATen/cuda/detail
Edit: /usr/local/lib64/python3.6/site-packages/torch/include/ATen/cuda/detail/IndexUtils.cuh (695B)
#pragma once
#include
#include
#include
namespace at {
namespace cuda {
namespace detail {
TORCH_CUDA_CU_API bool maybeOverlappingIndices(const at::Tensor& t);
using at::native::canUse32BitIndexMath;
template
TensorInfo
getTensorInfo(const at::Tensor& t) {
IndexType sz[MAX_TENSORINFO_DIMS];
IndexType st[MAX_TENSORINFO_DIMS];
int dims = t.dim();
for (int i = 0; i < dims; ++i) {
sz[i] = t.size(i);
st[i] = t.stride(i);
}
return TensorInfo(
t.data_ptr(), dims, sz, st);
}
} // detail
} // cuda
} // at