check_indexarray_range Class — pytorch Architecture
Architecture documentation for the check_indexarray_range class in TensorAdvancedIndexing.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/TensorAdvancedIndexing.cpp lines 1521–1535
template <typename IndexType>
static void check_indexarray_range(
const IndexType* indices,
int64_t n,
IndexType indexing_axis_dim) {
for (const auto i : c10::irange(n)) {
auto idx = indices[i];
TORCH_CHECK(
0 <= idx && idx < indexing_axis_dim,
"INDICES element is out of DATA bounds, id=",
idx,
" axis_dim=",
indexing_axis_dim);
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free