Problem
In tile_kernels/testing/bench.py, make_param_key() and make_param_id() format benchmark parameter dicts differently when a value is a torch.dtype.
make_param_id() — correctly uses _format_value():
def make_param_id(params: dict) -> str:
parts = []
for key in params:
value = params[key]
parts.append(f'{key}={_format_value(value)}') # dtype → 'fp16' ✅
return '-'.join(parts) if parts else 'default'
make_param_key() — does NOT use _format_value():
def make_param_key(params: dict) -> str:
param_str = ','.join(
f'{_SHORT_NAME.get(k, k)}={format(v, f">{_WIDTH.get(k)}") if k in _WIDTH else v}'
for k, v in params.items() if v != None
)
# dtype falls through: v is torch.float16 → str(v) = 'torch.float16' (ugly)
| Function |
Input {'dtype': torch.float16} |
Output |
make_param_id |
|
dtype=fp16 ✅ |
make_param_key |
|
dtype=torch.float16 ❌ |
Expected Fix
Apply _format_value(v) to each value in make_param_key(), consistent with make_param_id(). This also ensures any future types added to _format_value (like dict) are handled uniformly in both functions.
Problem
In
tile_kernels/testing/bench.py,make_param_key()andmake_param_id()format benchmark parameter dicts differently when a value is atorch.dtype.make_param_id()— correctly uses_format_value():make_param_key()— does NOT use_format_value():{'dtype': torch.float16}make_param_iddtype=fp16✅make_param_keydtype=torch.float16❌Expected Fix
Apply
_format_value(v)to each value inmake_param_key(), consistent withmake_param_id(). This also ensures any future types added to_format_value(like dict) are handled uniformly in both functions.