cpu_masked_fill_kernel_quantized_cpu Class — pytorch Architecture
Architecture documentation for the cpu_masked_fill_kernel_quantized_cpu class in QuantizedOpKernels.cpp from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/quantized/cpu/kernels/QuantizedOpKernels.cpp lines 4342–4356
template <typename scalar_t>
void cpu_masked_fill_kernel_quantized_cpu(TensorIterator& iter, scalar_t quantized_val) {
auto loop = [&](char** data, const int64_t* strides, int64_t n) {
char* dst = data[0];
char* mask = data[1];
for (const auto i : c10::irange(n)) {
bool mask_value = *reinterpret_cast<bool*>(mask + strides[1] * i);
if (mask_value) {
*(scalar_t*)(dst + strides[0] * i) = quantized_val;
}
}
};
iter.for_each(loop);
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free