is_fast_path_index_select Class — pytorch Architecture
Architecture documentation for the is_fast_path_index_select class in EmbeddingBag.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/EmbeddingBag.cpp lines 82–88
template<typename index_t>
bool is_fast_path_index_select(const Tensor& src, Tensor& output, index_t padding_idx) {
return (src.scalar_type() == kFloat || src.scalar_type() == kHalf ||
src.scalar_type() == kBFloat16) &&
src.strides()[1] == 1 && output.strides()[1] == 1 &&
padding_idx < static_cast<index_t>(0);
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free