-
Notifications
You must be signed in to change notification settings - Fork 375
Add enable_fusion_modeling for conv2d and conv3d
#3343
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
Conversation
Summary:
This is to have more accurate benchmarking for fusion
Test Plan:
```
python $SCRIPT_PATH $OUTPUT_FILE \
--recipe_name $RECIPE_NAME \
--shape_gen_name $SHAPE_GEN_NAME \
--M $M --K $K --N $N \
--D $D --H $H --W $W \
--kernel_size $kernel_size \
--enable_fusion_modeling \
--op_name conv3d
```
Reviewers:
Subscribers:
Tasks:
Tags:
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3343
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 4adbcaa with merge base ff0e461 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
| m_orig = nn.Sequential( | ||
| nn.ReLU(), | ||
| nn.Conv2d(K_val, N_val, kernel_size, bias=False), | ||
| nn.ReLU(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a reason to have an epilogue here? It's nice to have a prologue to measure the fusion of preceding activation, but unless the conv kernel does epilogue fusion I'm not sure we need an epilogue here, it would just measure the same thing for both bf16 and lowp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I just saw conv was typically surrounded by activations/norms, do we only support prologue fusions typically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just checked, we'll have epilogue fusion for conv op. and can explore prologue fusion for the quant kernels later. so the current test is OK I think
Summary:
This is to have more accurate benchmarking for fusion
Test Plan:
```
python $SCRIPT_PATH $OUTPUT_FILE \
--recipe_name $RECIPE_NAME \
--shape_gen_name $SHAPE_GEN_NAME \
--M $M --K $K --N $N \
--D $D --H $H --W $W \
--kernel_size $kernel_size \
--enable_fusion_modeling \
--op_name conv3d
```
Reviewers:
Subscribers:
Tasks:
Tags:
Summary:
This is to have more accurate benchmarking for fusion
Test Plan:
Reviewers:
Subscribers:
Tasks:
Tags: