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 2021/11/04 22:07:07 UTC
[GitHub] [tvm] junrushao1994 commented on a change in pull request #9449: [MetaSchedule] Sample-Perfect-Tile
junrushao1994 commented on a change in pull request #9449:
URL: https://github.com/apache/tvm/pull/9449#discussion_r743236341
##########
File path: src/tir/schedule/primitive.h
##########
@@ -46,6 +48,40 @@ TVM_DLL int SampleInt(support::LinearCongruentialEngine::TRandState* rand_state,
TVM_DLL int64_t SampleCategorical(support::LinearCongruentialEngine::TRandState* rand_state,
const Array<Integer>& candidates, const Array<FloatImm>& probs,
Optional<Integer>* decision);
+/*!
+ * \brief Sample the factors to perfect tile a specific loop
+ * \param rand_state The random state
+ * \param extent The loop extent to be tiled
+ * \param n_split The number of tiles to be sampled
+ * \return A list of length `n`, the random perfect tile sizes sampled
+ */
+TVM_DLL std::vector<int64_t> SamplePerfectTile(
+ support::LinearCongruentialEngine::TRandState* rand_state, //
+ int32_t extent, int32_t n_splits);
+/*!
+ * \brief Sample the factors to perfect tile a specific loop
+ * \param rand_state The random state
+ * \param extent The loop extent to be tiled
+ * \param n_split The number of tiles to be sampled
+ * \param max_innermost_factor The maximum tile size allowed to be sampled in the innermost loop
+ * \return A list of length `n`, the random perfect tile sizes sampled
+ */
+TVM_DLL std::vector<int64_t> SamplePerfectTile(
+ support::LinearCongruentialEngine::TRandState* rand_state, //
+ int32_t extent, int32_t n_split, int32_t max_innermost_factor);
+/*!
+ * \brief Sample the factors to perfect tile a specific loop
+ * \param rand_state The random state
+ * \param loop_sref The loop to be tiled
+ * \param n_split The number of tiles to be sampled
+ * \param max_innermost_factor The maximum tile size allowed to be sampled in the innermost loop
+ * \param decision The sampling decision
+ * \return A list of length `n`, the random perfect tile sizes sampled
+ */
+TVM_DLL std::vector<int64_t> SamplePerfectTile(
+ support::LinearCongruentialEngine::TRandState* rand_state, //
+ const tir::StmtSRef& loop_sref, int32_t n_split, int32_t max_innermost_factor,
+ Optional<Array<Integer>>* decision);
Review comment:
These 3 functions serve different purposes and have totally different implementations. If you check the impl, you will see how these 3 functions call each other :-)
--
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