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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to