spectrometerHBH commented on code in PR #11485:
URL: https://github.com/apache/tvm/pull/11485#discussion_r883298759
##########
src/tir/schedule/primitive.h:
##########
@@ -442,6 +442,18 @@ TVM_DLL void Unannotate(ScheduleState self, const
StmtSRef& sref, const String&
TVM_DLL void TransformLayout(ScheduleState self, const StmtSRef& block_sref,
int buffer_index,
BufferIndexType buffer_index_type, const
IndexMap& index_map);
+/*!
+ * \brief Apply a transformation represented by IndexMap to block
+ * \details The block iters and the block body are transformed by the given
index_map.
+ * Outer loops corresponding to each new block iter are regenerated.
+ * The index_map is required to be bijective affine since we need its inverse
mapping.
+ * \param self The state of the schedule
+ * \param block_sref The block sref that refers to the block to be transformed
Review Comment:
param name
##########
python/tvm/tir/schedule/schedule.py:
##########
@@ -2286,6 +2286,67 @@ def two_elementwise_transformed_intermediate_buffer(a:
T.handle, c: T.handle) ->
self, block, buffer_index, buffer_index_type_enum,
axis_separators
)
+ @type_checked
+ def transform_block_layout(
+ self,
+ block: BlockRV,
+ index_map: Union[IndexMap, Callable],
+ ) -> None:
+ """Apply a transformation represented by IndexMap to block
+
+ Parameters
+ ----------
+ block_rv : BlockRV
Review Comment:
param name
##########
include/tvm/tir/schedule/schedule.h:
##########
@@ -545,6 +545,17 @@ class ScheduleNode : public runtime::Object {
virtual void TransformLayout(const BlockRV& block_rv, int buffer_index,
BufferIndexType buffer_index_type, const
IndexMap& index_map) = 0;
+ /*!
+ * \brief Apply a transformation represented by IndexMap to block
+ * \details The block iters and the block body are transformed by the given
index_map.
+ * Outer loops corresponding to each new block iter are regenerated.
+ * The index_map is required to be bijective affine since we need its
inverse mapping.
+ * \param self The state of the schedule
+ * \param block_sref The block sref that refers to the block to be
transformed
Review Comment:
param name
--
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]