@@ -29,7 +29,7 @@
|
||||
*
|
||||
**************************************************************************************************/
|
||||
/*! \file
|
||||
\brief Templates implementing how threads are mapped to a given tile.
|
||||
\brief Templates implementing how threads are mapped to a given tile.
|
||||
|
||||
*/
|
||||
|
||||
@@ -163,9 +163,9 @@ struct PitchLinearTilePolicyStripminedThreadContiguous
|
||||
|
||||
using Iterations = layout::PitchLinearShape<
|
||||
Shape::kContiguous / (kThreads * kElementsPerAccess),
|
||||
Shape::kStrided>;
|
||||
Shape::kStrided>;
|
||||
|
||||
using Delta = layout::PitchLinearShape<1, 1>;
|
||||
using Delta = layout::PitchLinearShape<1, 1>;
|
||||
|
||||
CUTLASS_HOST_DEVICE
|
||||
static TensorCoord initial_offset(int thread_id)
|
||||
@@ -183,7 +183,7 @@ struct PitchLinearTilePolicyStripminedThreadStrided
|
||||
{
|
||||
static_assert((Shape::kStrided % Threads == 0),
|
||||
"Strided shape must divide number of threads");
|
||||
|
||||
|
||||
using TensorCoord = layout::PitchLinearCoord;
|
||||
|
||||
static int const kThreads = Threads;
|
||||
@@ -191,16 +191,16 @@ struct PitchLinearTilePolicyStripminedThreadStrided
|
||||
|
||||
using Iterations = layout::PitchLinearShape<
|
||||
Shape::kContiguous / kElementsPerAccess,
|
||||
Shape::kStrided / kThreads>;
|
||||
Shape::kStrided / kThreads>;
|
||||
|
||||
using Delta = layout::PitchLinearShape<1, 1>;
|
||||
using Delta = layout::PitchLinearShape<1, 1>;
|
||||
|
||||
using ShapeVec = Shape;
|
||||
|
||||
CUTLASS_HOST_DEVICE
|
||||
static TensorCoord initial_offset(int thread_id)
|
||||
{
|
||||
|
||||
|
||||
return TensorCoord(0, thread_id * Iterations::kStrided);
|
||||
}
|
||||
};
|
||||
@@ -334,7 +334,7 @@ struct PitchLinearWarpRakedThreadMap {
|
||||
};
|
||||
|
||||
// This is the offset of a thread within a threadblock tile (units of vectors)
|
||||
layout::PitchLinearCoord thread_offset_in_threadblock_tile_vec =
|
||||
layout::PitchLinearCoord thread_offset_in_threadblock_tile_vec =
|
||||
warp_footprint * warp_offset + thread_offset_in_warp;
|
||||
|
||||
// This is the offset of a thread within a threadblock tile (units of elements)
|
||||
@@ -460,7 +460,7 @@ struct PitchLinearStridedWarpRakedThreadMap {
|
||||
};
|
||||
|
||||
// This is the offset of a thread within a threadblock tile (units of vectors)
|
||||
layout::PitchLinearCoord thread_offset_in_threadblock_tile_vec =
|
||||
layout::PitchLinearCoord thread_offset_in_threadblock_tile_vec =
|
||||
warp_footprint * warp_offset + thread_offset_in_warp;
|
||||
|
||||
// This is the offset of a thread within a threadblock tile (units of elements)
|
||||
@@ -601,7 +601,7 @@ struct TransposePitchLinearThreadMapSimt {
|
||||
|
||||
static_assert(kElementsPerAccess == 1 , "Simt transpose requires elements per access to be 1");
|
||||
///< Iterations along each dimension (concept: PitchLinearShape)
|
||||
using Iterations =
|
||||
using Iterations =
|
||||
layout::PitchLinearShape<ThreadMap::Iterations::kStrided,
|
||||
ThreadMap::Iterations::kContiguous>;
|
||||
|
||||
@@ -615,7 +615,7 @@ struct TransposePitchLinearThreadMapSimt {
|
||||
|
||||
///< Delta betweeen accesses (units of elements, concept: PitchLinearShape)
|
||||
using Delta =
|
||||
layout::PitchLinearShape<ThreadMap::Delta::kStrided,
|
||||
layout::PitchLinearShape<ThreadMap::Delta::kStrided,
|
||||
ThreadMap::Delta::kContiguous>;
|
||||
|
||||
|
||||
@@ -693,12 +693,12 @@ struct PitchLinearWarpStripedThreadMap {
|
||||
|
||||
// Divide it into the number of warps, first partitioning the strided dimension then the
|
||||
// contiguous.
|
||||
static int const kWarpsStrided =
|
||||
(WarpAccessIterations::kStrided >= kWarpCount
|
||||
static int const kWarpsStrided =
|
||||
(WarpAccessIterations::kStrided >= kWarpCount
|
||||
? kWarpCount : (kWarpCount / WarpAccessIterations::kStrided));
|
||||
|
||||
static int const kWarpsContiguous =
|
||||
(kWarpCount > WarpAccessIterations::kStrided ?
|
||||
static int const kWarpsContiguous =
|
||||
(kWarpCount > WarpAccessIterations::kStrided ?
|
||||
WarpAccessIterations::kContiguous / kWarpsStrided : 1);
|
||||
|
||||
/// Arrangement of warps within a threadblock-scoped tile
|
||||
@@ -752,7 +752,7 @@ struct PitchLinearWarpStripedThreadMap {
|
||||
};
|
||||
|
||||
// This is the offset of a thread within a threadblock tile (units of vectors)
|
||||
layout::PitchLinearCoord thread_offset_in_threadblock_tile_vec =
|
||||
layout::PitchLinearCoord thread_offset_in_threadblock_tile_vec =
|
||||
warp_footprint * warp_offset + thread_offset_in_warp;
|
||||
|
||||
// This is the offset of a thread within a threadblock tile (units of elements)
|
||||
@@ -776,7 +776,7 @@ struct PitchLinearWarpStripedThreadMap {
|
||||
template <
|
||||
typename Shape_,
|
||||
int Threads,
|
||||
typename ThreadTileShape
|
||||
typename ThreadTileShape
|
||||
>
|
||||
struct PitchLinear2DThreadTileStripminedThreadMap;
|
||||
|
||||
@@ -888,7 +888,7 @@ struct TransposePitchLinearThreadMap2DThreadTile {
|
||||
|
||||
static_assert(kElementsPerAccess > 1 , "Simt transpose requires elements per access to be 1");
|
||||
///< Iterations along each dimension (concept: PitchLinearShape)
|
||||
using Iterations =
|
||||
using Iterations =
|
||||
layout::PitchLinearShape<ThreadMap::Iterations::kStrided,
|
||||
ThreadMap::Iterations::kContiguous>;
|
||||
|
||||
@@ -899,7 +899,7 @@ struct TransposePitchLinearThreadMap2DThreadTile {
|
||||
|
||||
///< Delta betweeen accesses (units of elements, concept: PitchLinearShape)
|
||||
using Delta =
|
||||
layout::PitchLinearShape<ThreadMap::Delta::kStrided,
|
||||
layout::PitchLinearShape<ThreadMap::Delta::kStrided,
|
||||
ThreadMap::Delta::kContiguous>;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user