@@ -77,6 +77,7 @@ struct GpuIdBuilder {
7777// / used for indexing rewrites as well as 3D sizes for predicate generation.
7878// / If `useLinearMapping` is true, the `idBuilder` method returns nD values
7979// / used for indexing rewrites as well as 1D sizes for predicate generation.
80+ // / If `mask` is provided, it will be used to filter the active blocks.
8081struct GpuBlockIdBuilder : public GpuIdBuilder {
8182 GpuBlockIdBuilder (MLIRContext *ctx, bool useLinearMapping = false ,
8283 DeviceMaskingAttrInterface mask = nullptr );
@@ -87,6 +88,7 @@ struct GpuBlockIdBuilder : public GpuIdBuilder {
8788// / used for indexing rewrites as well as 3D sizes for predicate generation.
8889// / If `useLinearMapping` is true, the `idBuilder` method returns nD values
8990// / used for indexing rewrites as well as 1D sizes for predicate generation.
91+ // / If `mask` is provided, it will be used to filter the active warpgroups.
9092struct GpuWarpgroupIdBuilder : public GpuIdBuilder {
9193 GpuWarpgroupIdBuilder (MLIRContext *ctx, int64_t warpSize,
9294 bool useLinearMapping = false ,
@@ -101,6 +103,7 @@ struct GpuWarpgroupIdBuilder : public GpuIdBuilder {
101103// / used for indexing rewrites as well as 3D sizes for predicate generation.
102104// / If `useLinearMapping` is true, the `idBuilder` method returns nD values
103105// / used for indexing rewrites as well as 1D sizes for predicate generation.
106+ // / If `mask` is provided, it will be used to filter the active warps.
104107struct GpuWarpIdBuilder : public GpuIdBuilder {
105108 GpuWarpIdBuilder (MLIRContext *ctx, int64_t warpSize,
106109 bool useLinearMapping = false ,
@@ -113,6 +116,7 @@ struct GpuWarpIdBuilder : public GpuIdBuilder {
113116// / used for indexing rewrites as well as 3D sizes for predicate generation.
114117// / If `useLinearMapping` is true, the `idBuilder` method returns nD values
115118// / used for indexing rewrites as well as 1D sizes for predicate generation.
119+ // / If `mask` is provided, it will be used to filter the active threads.
116120struct GpuThreadIdBuilder : public GpuIdBuilder {
117121 GpuThreadIdBuilder (MLIRContext *ctx, bool useLinearMapping = false ,
118122 DeviceMaskingAttrInterface mask = nullptr );
@@ -122,6 +126,7 @@ struct GpuThreadIdBuilder : public GpuIdBuilder {
122126// / The `idBuilder` method returns nD values used for indexing rewrites as well
123127// / as 1D sizes for predicate generation.
124128// / This `useLinearMapping` case is the only supported case.
129+ // / If `mask` is provided, it will be used to filter the active lanes.
125130struct GpuLaneIdBuilder : public GpuIdBuilder {
126131 GpuLaneIdBuilder (MLIRContext *ctx, int64_t warpSize, bool unused,
127132 DeviceMaskingAttrInterface mask = nullptr );
0 commit comments