Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions hsa/codegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,13 @@
"""
have_get_header = True
cfg = [
f'ADD_CFG({", ".join(f"\"{getattr(row, col)}\"" if not str(getattr(row, col)).isdigit() else f"{getattr(row, col):>4}" for col in other_columns)}, '
f'"{row.arch}", "{relpath}/", "{row.knl_name}", "{row.co_name}"),'
'ADD_CFG('
+ ", ".join(
(f'{int(getattr(row, col)):>4}' if str(getattr(row, col)).replace('.', '', 1).isdigit()
else f'"{getattr(row, col)}"')
Comment thread
valarLip marked this conversation as resolved.
Outdated
for col in other_columns
)
+ f', "{row.arch}", "{relpath}/", "{row.knl_name}", "{row.co_name}"),'
for row in combine_df.itertuples(index=False)
]
cfg_txt = "\n ".join(cfg) + "\n"
Expand Down
Loading