sym_and Class — pytorch Architecture
Architecture documentation for the sym_and class in ConstantSymNodeImpl.cpp from the pytorch codebase.
Entity Profile
Source Code
c10/core/ConstantSymNodeImpl.cpp lines 29–42
template <typename T>
c10::SymNode ConstantSymNodeImpl<T>::sym_and(const c10::SymNode& other) {
TORCH_INTERNAL_ASSERT(is_bool_(), "sym_and only works on bool");
// If other is also a constant bool, compute the result directly
if (auto other_const = other->constant_bool()) {
bool result = this->bool_() && *other_const;
return c10::make_intrusive<ConstantSymNodeImpl<bool>>(result);
}
// If other is a nested int or other symbolic type, defer to it
return other->sym_and(
c10::intrusive_ptr<ConstantSymNodeImpl<T>>::reclaim_copy(this));
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free