Get Class — pytorch Architecture
Architecture documentation for the Get class in blob.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/core/blob.h lines 66–78
template <class T>
const T& Get() const {
TORCH_INTERNAL_ASSERT(
IsType<T>(),
"wrong type for the Blob instance. Blob contains ",
meta_.name(),
" while caller expects ",
TypeMeta::TypeName<T>());
// TODO: after we add Get<Tensor>(c10::DeviceType)
// and changed all the callsites, we can add
// a static assert here to enforce T != Tensor
return *static_cast<const T*>(pointer_);
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free