@@ -36,9 +36,7 @@ struct SCFTilingOptions {
36
36
// / Returning a tile size of zero implies no tiling for that loop. If the
37
37
// / size of the returned vector is smaller than the number of loops, the inner
38
38
// / loops are not tiled. If the size of the returned vector is larger, then
39
- // / the vector is truncated to number of loops. Only one of
40
- // / `tileSizeComputationFunction` or `maxNumTilesComputationFunction` should
41
- // / be used.
39
+ // / the vector is truncated to number of loops.
42
40
SCFTileSizeComputationFunction tileSizeComputationFunction = nullptr ;
43
41
44
42
SCFTilingOptions &
@@ -51,23 +49,25 @@ struct SCFTilingOptions {
51
49
// / proper interaction with folding.
52
50
SCFTilingOptions &setTileSizes (ArrayRef<OpFoldResult> tileSizes);
53
51
54
- // / Computation function that returns the maximum number of tile to use for
55
- // / each loop. Returning a tile size of zero implies no tiling for that loop.
56
- // / If the size of the returned vector is smaller than the number of loops,
57
- // / the inner loops are not tiled. If the size of the returned vector is
58
- // / larger, then the vector is truncated to number of loops. Only one of
59
- // / `tileSizeComputationFunction` or `maxNumTilesComputationFunction` should
60
- // / be used.
61
- SCFTileSizeComputationFunction maxNumTilesComputationFunction = nullptr ;
52
+ // / Computation function that returns the number of threads to use for
53
+ // / each loop. Returning a num threads of zero implies no tiling for that
54
+ // / loop. If the size of the returned vector is smaller than the number of
55
+ // / loops, the inner loops are not tiled. If the size of the returned vector
56
+ // / is larger, then the vector is truncated to number of loops. Note: This
57
+ // / option is only supported with loopType set to `LoopType::ForallOp`. If the
58
+ // / tile size function is not specified while the num threads computation is,
59
+ // / then the tile size is determined automatically to map at most one tile per
60
+ // / thread.
61
+ SCFTileSizeComputationFunction numThreadsComputationFunction = nullptr ;
62
62
63
63
SCFTilingOptions &
64
- setMaxNumTilesComputationFunction (SCFTileSizeComputationFunction fun) {
65
- maxNumTilesComputationFunction = std::move (fun);
64
+ setNumThreadsComputationFunction (SCFTileSizeComputationFunction fun) {
65
+ numThreadsComputationFunction = std::move (fun);
66
66
return *this ;
67
67
}
68
68
// / Convenience function to set the `tileSizeComputationFunction` to a
69
69
// / function that computes tile sizes at the point they are needed.
70
- SCFTilingOptions &setMaxNumTiles (ArrayRef<OpFoldResult> numTiles );
70
+ SCFTilingOptions &setNumThreads (ArrayRef<OpFoldResult> numThreads );
71
71
72
72
// / The interchange vector to reorder the tiled loops.
73
73
SmallVector<int64_t > interchangeVector = {};
0 commit comments