Skip to content

[Feature]: Make kernel benchmarks feature-complete & add them to CI #593

Closed

Description

@willzhou-amd

Suggestion Description

In aiter/op_tests/op_benchmarks/triton, we have a number of benchmarking scripts that we're currently running to test specific kernels. There are a few missing features:

  • Splitting FF layers into their two projection components (fc1, fc2)
  • Not all GEMMs are benchmarked (e.g fp16)
  • Rope, routing, topk, layernorm, mha don’t support --model as a flag.
  • Tensor parallel testing isn’t present.

We'd like to move towards an end-to-end testing script. For example, running bench_model --model llama3-8B should automatically benchmark all Triton kernels used within the Llama model.

As such, we'd like to add:

  • Benchmarking a full model end-to-end (e.g running bench_model -model llama3-8B to automatically benchmark all Triton kernels used within said model)
    • Allows for easy comparison with Torch / VLLM full-model timing results
    • Estimate the amount of time a model should take to conduct a forward / backward pass if there were no additional overhead beyond the kernel runtimes.
    • Adding additional models. Honestly, maybe it’s plausible to support arbitrary models from Huggingface by scraping their configs and adding them to op_benchmarks/triton/utils/model_configs.json?
    • The data distribution generated by the testing script is a random distribution - it’d be good to get a more realistic distribution for sparse kernels.

Operating System

Ubuntu

GPU

MI300

ROCm Component

No response

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions