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

Add SDXL conv shapes, extra iree flags option, tool to plot roofline percentages #19

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

Max191
Copy link
Contributor

@Max191 Max191 commented Oct 8, 2024

  • Adds the SDXL convolution shapes to convbench
  • Adds the option to pass Xiree_compile flags in convbench
  • Adds percentage of roofline to the collected conv benchmark metrics
  • Adds a tool to plot roofline percents against kernel parameters given the benchmarks and kernel stats
  • Renames shark_conv.py to conv_bench.py to match gemm and attention formats

Comment on lines 125 to 135
# Compute percentage of the roofline.
tflops_map = {
"f32": 653.7,
"f16": 1307.4,
"bf16": 1307.4,
"f8E4M3FNUZ": 2614.9,
"i8": 2614.9,
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for SPX, right? For CPX you need a different set of numbers. Also, where did you find the reference numbers?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should we put this in some common file used by all scripts?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The convbench scripts still have some hardcoded values specific to SPX MI300X, so I didn't bother trying to multiplex based on the target yet. I'm leaving that as a follow-up. I can leave a TODO comment here, though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Max191 Max191 requested a review from kuhar October 9, 2024 14:19
@saienduri
Copy link
Contributor

saienduri commented Oct 9, 2024

You will need to change the other calls for shark_conv in the github workflows file for the CI to progress. Oh, you made that change. Trying a re-run

python convbench/shark_conv.py --roofline results/iree_gemm_tk.csv --plot results/iree_gemm_tk.png
python convbench/shark_conv.py --roofline results/iree_gemm.csv,results/iree_gemm_tk.csv,results/iree_attention.csv,results/iree_conv.csv --plot results/combined.png
python convbench/conv_bench.py --roofline results/iree_conv.csv --plot results/iree_conv_i8.png --dtype i8
python convbench/conv_bench.py --roofline results/iree_conv.csv --plot results/iree_conv_f32.png --dtype f32
Copy link
Contributor

@saienduri saienduri Oct 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we are only using a subset of conv tests in CI, we don't need this dtype f32 call which is causing CI failure

Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
@Max191 Max191 merged commit 4621947 into nod-ai:main Oct 28, 2024
1 check passed
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.

3 participants