fbgemm_spmdm_report_error_ Class — pytorch Architecture
Architecture documentation for the fbgemm_spmdm_report_error_ class in qembeddingbag.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/quantized/cpu/qembeddingbag.cpp lines 601–626
template <typename IndexType, typename OffsetType>
void fbgemm_spmdm_report_error_(
int64_t output_size,
int index_size,
int64_t N,
const OffsetType* offsets,
const IndexType* indices) {
for (const auto m : c10::irange(output_size)) {
for (OffsetType i = offsets[m]; i < offsets[m + 1]; ++i) {
TORCH_CHECK(i < index_size);
IndexType idx = indices[i];
TORCH_CHECK(
0 <= idx && idx < N,
"Index ",
i,
" is out of bounds: ",
idx,
", range 0 to ",
N);
}
}
TORCH_CHECK(
offsets[output_size] == index_size,
"Yout input seems to be incorrect: the last offset value should be "
"the size of the indices tensor, but it appears not.");
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free