Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keys for perf db overlapping multiple fdb keys. #3367

Open
cderb opened this issue Nov 5, 2024 · 0 comments
Open

Keys for perf db overlapping multiple fdb keys. #3367

cderb opened this issue Nov 5, 2024 · 0 comments

Comments

@cderb
Copy link
Contributor

cderb commented Nov 5, 2024

MIOpenDriver commands which have distinct fdb keys (fdb.txt) may have identical keys for the perf db (db.txt)

For example The following driver commands:

MIOpenDriver convbfp16 --batchsize 4 --spatial_dim 2 --pad_h 1 --pad_w 1 --pad_d 0 --conv_stride_h 2 --conv_stride_w 2 --conv_stride_d 0 --dilation_h 1 --dilation_w 1 --dilation_d 0 --group_count 16 --mode conv --pad_mode default --trans_output_pad_h 0 --trans_output_pad_w 0 --trans_output_pad_d 0 --out_layout NCHW --in_layout NCHW --fil_layout NCHW --in_d 1 --in_h 118 --in_w 182 --fil_d 1 --fil_h 3 --fil_w 3 --in_channels 896 --out_channels 896 --iter 100 --forw 2

Produces the fdb key: 896-59-91-3x3-896-118-182-4-1x1-2x2-1x1-0-NCHW-BF16-B_g16

MIOpenDriver convbfp16 --batchsize 4 --spatial_dim 2 --pad_h 1 --pad_w 1 --pad_d 0 --conv_stride_h 2 --conv_stride_w 2 --conv_stride_d 0 --dilation_h 1 --dilation_w 1 --dilation_d 0 --group_count 16 --mode conv --pad_mode default --trans_output_pad_h 0 --trans_output_pad_w 0 --trans_output_pad_d 0 --out_layout NCHW --in_layout NCHW --fil_layout NCHW --in_d 1 --in_h 118 --in_w 181 --fil_d 1 --fil_h 3 --fil_w 3 --in_channels 896 --out_channels 896 --iter 100 --forw 2

Produces the fdb key: 896-59-91-3x3-896-118-181-4-1x1-2x2-1x1-0-NCHW-BF16-B_g16

Both share the pdb key: 2x896x59x91x1x3x3x1x896x4x1x1x0x2x2x0x1x1x0x0x16xNCHWxBF16xB

The two configurations differ by input width 182 vs 181.
Because MIOpen transforms the problem configuration for the BWD direction, the difference in input is lost to rounding.
This being the case MIOpen will store only 1 tuning for solvers in ranges like this.

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

No branches or pull requests

1 participant