Skip to content

Commit 43e0b2f

Browse files
committed
rewrite_vnni -> rewrite_tensorize
1 parent 823797e commit 43e0b2f

File tree

6 files changed

+17
-18
lines changed

6 files changed

+17
-18
lines changed

python/tvm/meta_schedule/postproc/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
from .rewrite_reduction_block import RewriteReductionBlock
2323
from .rewrite_unbound_block import RewriteUnboundBlock
2424
from .verify_gpu_code import VerifyGPUCode
25-
from .rewrite_vnni import RewriteVNNI
25+
from .rewrite_tensorize import RewriteTensorize

python/tvm/meta_schedule/postproc/rewrite_vnni.py renamed to python/tvm/meta_schedule/postproc/rewrite_tensorize.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
"""A postprocessor that tensorize VNNI related components."""
17+
"""A postprocessor that tensorize related components."""
1818

1919
from tvm._ffi.registry import register_object
2020
from .. import _ffi_api
2121
from .postproc import Postproc
2222
import tvm.tir.tensor_intrin
2323

2424

25-
@register_object("meta_schedule.RewriteVNNI")
26-
class RewriteVNNI(Postproc):
27-
"""A postprocessor that tensorize VNNI related components."""
25+
@register_object("meta_schedule.RewriteTensorize")
26+
class RewriteTensorize(Postproc):
27+
"""A postprocessor that tensorize related components."""
2828

2929
def __init__(self) -> None:
3030
self.__init_handle_by_constructor__(
31-
_ffi_api.PostprocRewriteVNNI, # type: ignore # pylint: disable=no-member
31+
_ffi_api.PostprocRewriteTensorize, # type: ignore # pylint: disable=no-member
3232
)

python/tvm/meta_schedule/tune.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ def _postproc() -> List[Postproc]:
214214
M.DisallowDynamicLoop(),
215215
M.RewriteParallelVectorizeUnroll(),
216216
M.RewriteReductionBlock(),
217-
M.RewriteVNNI(),
218217
]
219218

220219
@staticmethod

src/meta_schedule/postproc/rewrite_vnni.cc renamed to src/meta_schedule/postproc/rewrite_tensorize.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ using tir::LoopRV;
2727

2828
using BlockPosition = std::tuple<String, String, String>;
2929

30-
class RewriteVNNINode : public PostprocNode {
30+
class RewriteTensorizeNode : public PostprocNode {
3131
public:
3232
// Inherited from PostprocNode
3333
void InitializeWithTuneContext(const TuneContext& context) final {}
@@ -37,8 +37,8 @@ class RewriteVNNINode : public PostprocNode {
3737

3838
void VisitAttrs(tvm::AttrVisitor* v) {}
3939

40-
static constexpr const char* _type_key = "meta_schedule.RewriteVNNI";
41-
TVM_DECLARE_FINAL_OBJECT_INFO(RewriteVNNINode, PostprocNode);
40+
static constexpr const char* _type_key = "meta_schedule.RewriteTensorize";
41+
TVM_DECLARE_FINAL_OBJECT_INFO(RewriteTensorizeNode, PostprocNode);
4242
};
4343

4444
void CollectPostProcTasks(const tir::Schedule& sch, const String& func_name,
@@ -60,7 +60,7 @@ void CollectPostProcTasks(const tir::Schedule& sch, const String& func_name,
6060
});
6161
}
6262

63-
bool RewriteVNNINode::Apply(const tir::Schedule& sch) {
63+
bool RewriteTensorizeNode::Apply(const tir::Schedule& sch) {
6464
std::vector<BlockPosition> tasks;
6565
for (const auto& kv : sch->mod()->functions) {
6666
GlobalVar g_var = kv.first;
@@ -88,13 +88,13 @@ bool RewriteVNNINode::Apply(const tir::Schedule& sch) {
8888
return true;
8989
}
9090

91-
Postproc RewriteVNNI() {
92-
ObjectPtr<RewriteVNNINode> n = make_object<RewriteVNNINode>();
91+
Postproc RewriteTensorize() {
92+
ObjectPtr<RewriteTensorizeNode> n = make_object<RewriteTensorizeNode>();
9393
return Postproc(n);
9494
}
9595

96-
TVM_REGISTER_NODE_TYPE(RewriteVNNINode);
97-
TVM_REGISTER_GLOBAL("meta_schedule.PostprocRewriteVNNI").set_body_typed(RewriteVNNI);
96+
TVM_REGISTER_NODE_TYPE(RewriteTensorizeNode);
97+
TVM_REGISTER_GLOBAL("meta_schedule.PostprocRewriteTensorize").set_body_typed(RewriteTensorize);
9898

9999
} // namespace meta_schedule
100100
} // namespace tvm

src/meta_schedule/schedule_rule/multi_level_tiling_with_intrin.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ class MultiLevelTilingWithIntrinNode : public MultiLevelTilingNode {
3535
}
3636

3737
public:
38+
String intrin_name;
39+
3840
static constexpr const char* _type_key = "meta_schedule.MultiLevelTilingWithIntrin";
3941
TVM_DECLARE_FINAL_OBJECT_INFO(MultiLevelTilingWithIntrinNode, MultiLevelTilingNode);
40-
41-
String intrin_name;
4242
};
4343

4444
ScheduleRule ScheduleRule::MultiLevelTilingWithIntrin(

src/tir/schedule/analysis/analysis.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ Optional<TensorizeInfo> GetTensorizeLoopMapping(const tir::ScheduleState& self,
20962096
break;
20972097
}
20982098
}
2099-
if (block_loop == nullptr) {
2099+
if (desc_loop == nullptr) {
21002100
return NullOpt;
21012101
}
21022102
// Step 4.3. Check divisibility of loop extents

0 commit comments

Comments
 (0)