Skip to content

Commit

Permalink
Named ops benchmarks (#948)
Browse files Browse the repository at this point in the history
Adds MLP model benchmarks generated by mlir-gen with named ops.

The goal is to establish baseline performance of the current pipeline on
IR using only Linalg named operations.
For ease of comparison, the MLP models from base benchmarks are used.
  • Loading branch information
adam-smnk authored Aug 6, 2024
1 parent 6d638a7 commit 92cb3e1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ set(BENCH_CFGS
${CONFIG_DIR}/base/base.json
${CONFIG_DIR}/base/pack.json
${CONFIG_DIR}/base/mha.json
${CONFIG_DIR}/base/named-ops.json
)
string(JOIN ',' BENCH_CFGS_STR ${BENCH_CFGS})
# Run a small set of benchmarks with small iterations to test the benchmarks and run locally on small machines
Expand Down
33 changes: 33 additions & 0 deletions benchmarks/config/base/named-ops.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[
{
"mlp_named_ops": {
"fp32_3x1024_const_mlir": {
"type": "IR-GEN",
"benchmark": [ "mlir-gen", "--output=named --kernel=const --float-type=f32 --batch=256 --layers=1024,1024,1024,1024" ],
"environment": {},
"flags": [ "-n", "100" ],
"extensions": [ "(avx2|asimd)" ]
},
"fp32_3x1024_args_mlir": {
"type": "IR-GEN",
"benchmark": [ "mlir-gen", "--output=named --kernel=args --bias --relu --float-type=f32 --batch=256 --layers=1024,1024,1024,1024" ],
"environment": {},
"flags": [ "-n", "100" ],
"extensions": [ "(avx2|asimd)" ]
},
"bf16_3x1024_const_mlir": {
"type": "IR-GEN",
"benchmark": [ "mlir-gen", "--output=named --kernel=const --bias --relu --float-type=bf16 --batch=256 --layers=1024,1024,1024,1024" ],
"environment": {},
"flags": [ "-n", "100"],
"extensions": [ "(avx2|asimd)" ]
},
"bf16_3x1024_args_mlir": {
"type": "IR-GEN",
"benchmark": [ "mlir-gen", "--output=named --kernel=args --bias --relu --float-type=bf16 --batch=256 --layers=1024,1024,1024,1024" ],
"environment": {},
"flags": [ "-n", "100"],
"extensions": [ "(avx2|asimd)" ]
}
}}
]
1 change: 1 addition & 0 deletions scripts/buildkite/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ if [ "$BENCH_BASE" ]; then
benchmark base/base.json "Base Benchmarks"
benchmark base/pack.json "Pack Benchmarks"
benchmark base/mha.json "MHA Benchmarks"
benchmark base/named-ops.json "Named Ops Benchmarks"
fi

# PyTorch model benchmarks
Expand Down

0 comments on commit 92cb3e1

Please sign in to comment.