Skip to content

ag_gemm bench: restore num_comm_sms for shapes absent from SMS_PER_SHAPE - #36

Open
monopodium wants to merge 1 commit into
mainfrom
fix-ag-gemm-bench-per-shape-override
Open

ag_gemm bench: restore num_comm_sms for shapes absent from SMS_PER_SHAPE#36
monopodium wants to merge 1 commit into
mainfrom
fix-ag-gemm-bench-per-shape-override

Conversation

@monopodium

Copy link
Copy Markdown
Collaborator

The per-shape override assigns into args inside the shape loop and never restores it, so any shape not in SMS_PER_SHAPE silently inherits whatever the previous shape set rather than the CLI value. Sweeping 4096,8192,16384,32768 leaves 32768 running with 8 comm CTAs instead of the 64 default, because 32768 is not in the table and 16384 is.

The adjacent INTRA_OVERRIDE block already guards against exactly this with an else that restores cli_num_intra_comm_sms - added, per the comment above it, after the same class of bug was found there. This mirrors that.

Measured impact where it could be measured: at M=32768 the shape runs 8.596 ms on its own and 10.636 ms when preceded by another shape in the same sweep, so any multi-shape number for a table-absent shape is off by about 24%.

The per-shape override assigns into args inside the shape loop and never
restores it, so any shape not in SMS_PER_SHAPE silently inherits whatever the
previous shape set rather than the CLI value. Sweeping 4096,8192,16384,32768
leaves 32768 running with 8 comm CTAs instead of the 64 default, because 32768
is not in the table and 16384 is.

The adjacent INTRA_OVERRIDE block already guards against exactly this with an
else that restores cli_num_intra_comm_sms - added, per the comment above it,
after the same class of bug was found there. This mirrors that.

Measured impact where it could be measured: at M=32768 the shape runs 8.596 ms
on its own and 10.636 ms when preceded by another shape in the same sweep, so
any multi-shape number for a table-absent shape is off by about 24%.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant