it Class — pytorch Architecture
Architecture documentation for the it class in IListRef_inl.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/core/IListRef_inl.h lines 160–180
template <>
class IListRefTagImpl<IListRefTag::Boxed, at::OptionalTensorRef>
: public IListRefTagImplBase<IListRefTag::Boxed, at::OptionalTensorRef, std::optional<at::Tensor>> {
public:
/*
* Given an instance of the types corresponding to the `Boxed` tag, we override
* the default implementation, so that we can return a `at::OptionalTensorRef`.
*/
static IListRefConstRef<at::OptionalTensorRef> iterator_get(
const typename list_type::const_iterator& it) {
C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdangling-reference")
const auto& ivalue = (*it).get();
C10_DIAGNOSTIC_POP()
if (!ivalue.isNone()) {
const auto& tensor = ivalue.toTensor();
return (tensor.defined()) ? tensor : at::OptionalTensorRef{};
}
return {};
}
};
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free