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