_resize_output Class — pytorch Architecture
Architecture documentation for the _resize_output class in Resize.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/Resize.cpp lines 59–77
template <typename T>
static bool _resize_output(const Tensor& output, ArrayRef<T> shape) {
if (_resize_output_check<T>(output, shape)) {
// avoid a redispatch for cpu and cuda.
// TODO: when resize_cuda_ is re-written to be unified with resize_,
// we can provide the same benefit for cuda.
//
// TODO(#61485): functorch wrapped tensors should not go through the
// fast path. This is a hack, longer term solutions are in the issue
if (output.is_cpu() && !isTensorSubclassLike(output)) {
native_resize_(output, shape);
} else {
at::symint::resize_<T>(output, shape);
}
return true;
} else {
return false;
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free