From 62972e9a1582382c570e685e688563181a3ce1d9 Mon Sep 17 00:00:00 2001 From: Mohammed Tirichine Date: Tue, 22 Jul 2025 11:34:12 +0100 Subject: [PATCH] Fix memory access type flags in featurization The is_transpose flag should satisfy: single one per row AND single one per column. And for is_broadcast it should be: single one per row AND (single one OR all zeros) per column. --- src/autoschedulers/adams2019/FunctionDAG.cpp | 4 ++-- src/autoschedulers/anderson2021/FunctionDAG.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/autoschedulers/adams2019/FunctionDAG.cpp b/src/autoschedulers/adams2019/FunctionDAG.cpp index 35b872477150..de80716c2ab1 100644 --- a/src/autoschedulers/adams2019/FunctionDAG.cpp +++ b/src/autoschedulers/adams2019/FunctionDAG.cpp @@ -269,8 +269,8 @@ class Featurizer : public IRVisitor { for (size_t j = 0; j < stage.loop.size(); j++) { bool single_one = (ones_per_col[j] == 1) && (zeros_per_col[j] == args.size() - 1); bool all_zero = (zeros_per_col[j] == args.size()); - is_transpose &= single_one || all_zero; - is_broadcast &= single_one; + is_transpose &= single_one; + is_broadcast &= single_one || all_zero; is_slice &= single_one; } diff --git a/src/autoschedulers/anderson2021/FunctionDAG.cpp b/src/autoschedulers/anderson2021/FunctionDAG.cpp index e127a02a7bd3..cb86d50b822f 100644 --- a/src/autoschedulers/anderson2021/FunctionDAG.cpp +++ b/src/autoschedulers/anderson2021/FunctionDAG.cpp @@ -267,8 +267,8 @@ class Featurizer : public IRVisitor { for (size_t j = 0; j < stage.loop.size(); j++) { bool single_one = (ones_per_col[j] == 1) && (zeros_per_col[j] == args.size() - 1); bool all_zero = (zeros_per_col[j] == args.size()); - is_transpose &= single_one || all_zero; - is_broadcast &= single_one; + is_transpose &= single_one; + is_broadcast &= single_one || all_zero; is_slice &= single_one; }