Skip to content

Conversation

@jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Nov 15, 2025

Summary:
This is to have more accurate benchmarking for fusion

Test Plan:

RECIPE_NAME="tensorwise"
SHAPE_GEN_NAME="custom"
SCRIPT_PATH="benchmarks/float8/float8_inference_roofline.py"
M=1
K=160
N=320
D=3
H=194
W=130
kernel_size=3

OUTPUT_FILE="~/local/tmp/test_${M}_${K}_${N}_${D}_${H}_${W}_${kernel_size}.csv"
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:
```
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:
@jerryzh168 jerryzh168 requested a review from vkuzo November 15, 2025 01:38
@pytorch-bot
Copy link

pytorch-bot bot commented Nov 15, 2025

🔗 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 Failures

As of commit 4adbcaa with merge base ff0e461 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 15, 2025
@jerryzh168 jerryzh168 added topic: for developers Use this tag if this PR is mainly developer facing topic: not user facing Use this tag if you don't want this PR to show up in release notes labels Nov 15, 2025
m_orig = nn.Sequential(
nn.ReLU(),
nn.Conv2d(K_val, N_val, kernel_size, bias=False),
nn.ReLU(),
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor Author

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

@jerryzh168 jerryzh168 merged commit 017326a into main Nov 18, 2025
19 of 21 checks passed
namgyu-youn pushed a commit to namgyu-youn/ao that referenced this pull request Nov 21, 2025
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:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: for developers Use this tag if this PR is mainly developer facing topic: not user facing Use this tag if you don't want this PR to show up in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants