You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/05/24 02:37:29 UTC
[GitHub] [tvm] wrongtest commented on a diff in pull request #11287: [Arith] Merge surjective/non-surjective iter mapping detections
wrongtest commented on code in PR #11287:
URL: https://github.com/apache/tvm/pull/11287#discussion_r880006145
##########
include/tvm/arith/iter_affine_map.h:
##########
@@ -259,53 +259,29 @@ class IterSumExpr : public IterMapExpr {
TVM_DEFINE_OBJECT_REF_COW_METHOD(IterSumExprNode);
};
+/*! \brief Mapping level for iterators. */
+enum IterMapLevel {
Review Comment:
Yeah, we also have some case like `A[i // 8] = B[i % 16]` which could lower to some hw-specified data movement intrin. If we consider the mapping `i // 8` -> `i % 16` it could be neither surjective nor injective. But now the `DetectIterMap` try to solve the mapping from iter variables of non-strided domain to iter expression, thus I think it may not be able to handle such things directly. Maybe we can consider extent the input argument to two group of indices in the future?
Currently we handle it via bi-directional analysis from/to variable `i`:
i -> i // 8 : surjective
i -> i % 16: surjective, and injective reversely
Thus i // 8 -> i % 16 is something can be composed of surjective mapping and injective mapping.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org