is_matmul Class — pytorch Architecture
Architecture documentation for the is_matmul class in FusionUtils.h from the pytorch codebase.
Entity Profile
Source Code
aten/src/ATen/native/mkldnn/xpu/FusionUtils.h lines 28–51
template <bool is_matmul = false>
onednn::Attr& construct_binary_attr(
onednn::Attr& attr,
std::string_view binary,
const Tensor& other) {
if (binary == "mul") {
attr.append_post_binary<is_matmul>(attr.kind_with_binary_mul, other);
} else if (binary == "sub") {
attr.append_post_binary<is_matmul>(attr.kind_with_binary_sub, other);
} else if (binary == "div") {
attr.append_post_binary<is_matmul>(attr.kind_with_binary_div, other);
} else if (binary == "add") {
attr.append_post_binary<is_matmul>(attr.kind_with_binary_add, other);
} else if (binary == "sum") {
attr.append_post_sum(1.f, 1.f, 0);
} else {
TORCH_CHECK(
binary == "none",
"Binary attr ",
binary,
"is not supported for conv/linear post binary fusion");
}
return attr;
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free