99# All APIs from ctest coverage
1010ALL_APIS = ["c2c" , "z2z" , "r2c" , "c2r" , "d2z" , "z2d" ]
1111
12+ # 2D complex APIs only (rank 2 does not support real transforms yet)
13+ ALL_APIS_2D = ["c2c" , "z2z" ]
14+
1215# Direction support per API
1316API_DIRECTIONS = {
1417 "c2c" : ["forward" , "inverse" ],
1922 "z2d" : ["inverse" ],
2023}
2124
25+ # 2D sizes: smooth (CT path), non-square, Bluestein (prime dimensions)
26+ ALL_SIZES_2D = ["16x16" , "64x64" , "128x256" , "256x128" , "256x256" , "512x512" ]
27+ BLUESTEIN_SIZES_2D = ["23x23" , "997x16" , "16x997" ]
28+
2229# ── Suite definitions ──────────────────────────────────────────
2330
24- # Smoke (24 cases): 3 key sizes x batch=1 x all API/direction combos
25- SMOKE = {"sizes" : [16 , 256 , 2048 ], "batches" : [1 ]}
31+ # Smoke (24 1D cases + 4 2D cases): key sizes x batch=1 x all API/direction combos
32+ SMOKE = {
33+ "sizes" : [16 , 256 , 2048 ],
34+ "batches" : [1 ],
35+ "sizes_2d" : ["16x16" , "256x256" ],
36+ "batches_2d" : [1 ],
37+ }
2638
27- # Typical (136 cases): all sizes x batch=1 + extra multi-batch on key sizes
39+ # Typical (136 1D + 24 2D cases)
2840TYPICAL = {
2941 "sizes" : ALL_SIZES ,
3042 "batches" : [1 ],
3143 "extra" : [(256 , 4 ), (256 , 256 ), (2048 , 4 ), (2048 , 256 )],
44+ "sizes_2d" : ALL_SIZES_2D ,
45+ "batches_2d" : [1 ],
3246}
3347
34- # Full (312 cases): all sizes x all batches x all API/direction combos
35- FULL = {"sizes" : ALL_SIZES , "batches" : ALL_BATCHES }
48+ # Full (312 1D + 48 2D cases)
49+ FULL = {
50+ "sizes" : ALL_SIZES ,
51+ "batches" : ALL_BATCHES ,
52+ "sizes_2d" : ALL_SIZES_2D + BLUESTEIN_SIZES_2D ,
53+ "batches_2d" : [1 , 4 ],
54+ }
3655
3756SUITES = {"smoke" : SMOKE , "typical" : TYPICAL , "full" : FULL }
3857
@@ -49,11 +68,14 @@ def expand_params(suite: dict):
4968
5069 Handles the 'extra' key for TYPICAL suite: additional (size, batch)
5170 pairs beyond the base sizes x batches cross product.
71+
72+ Also yields 2D entries from 'sizes_2d' x 'batches_2d' x ALL_APIS_2D.
73+ 2D sizes are strings like "256x256" (detected by the caller to set rank=2).
5274 """
5375 apis = ALL_APIS
5476 seen = set ()
5577
56- # Base: sizes x batches x apis
78+ # Base 1D : sizes x batches x apis
5779 for size in suite ["sizes" ]:
5880 for batch in suite ["batches" ]:
5981 for api in apis :
@@ -63,11 +85,21 @@ def expand_params(suite: dict):
6385 seen .add (key )
6486 yield key
6587
66- # Extra (size, batch) pairs applied to all API/direction combos
88+ # Extra 1D (size, batch) pairs applied to all API/direction combos
6789 for size , batch in suite .get ("extra" , []):
6890 for api in apis :
6991 for direction in API_DIRECTIONS [api ]:
7092 key = (size , batch , api , direction )
7193 if key not in seen :
7294 seen .add (key )
7395 yield key
96+
97+ # 2D: sizes_2d x batches_2d x ALL_APIS_2D (forward only)
98+ for size_2d in suite .get ("sizes_2d" , []):
99+ for batch in suite .get ("batches_2d" , [1 ]):
100+ for api in ALL_APIS_2D :
101+ for direction in API_DIRECTIONS [api ]:
102+ key = (size_2d , batch , api , direction )
103+ if key not in seen :
104+ seen .add (key )
105+ yield key
0 commit comments