-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Vector-to-kernel pipeline bundle (#987)
1) Bundles the four passes: brgemm tiling, vectorization, hoisting vector transfers, and vector to fma together for the vector-to-kernel pipeline. 2) New `json` files are added to benchmark folder for benchmarking the `vector-to-kernel` pipeline.
- Loading branch information
Showing
9 changed files
with
256 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
|
||
[ | ||
{ | ||
"gemm_fp32_mlir_vector_kernel_32": { | ||
"fp32_3x1024_omp_2_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=32,32,32" ], | ||
"environment": { "OMP_NUM_THREADS": "2", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=8,16 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_4_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=32,32,32" ], | ||
"environment": { "OMP_NUM_THREADS": "4", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=8,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_8_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=32,32,32" ], | ||
"environment": { "OMP_NUM_THREADS": "8", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=4,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_16_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=32,32,32" ], | ||
"environment": { "OMP_NUM_THREADS": "16", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=2,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
} | ||
}}, | ||
{ | ||
"mlp_fp32_mlir_vector_kernel_32": { | ||
"fp32_3x1024_omp_2_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --bias --relu --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=32,32,32" ], | ||
"environment": { "OMP_NUM_THREADS": "2", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=8,16 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_4_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --bias --relu --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=32,32,32" ], | ||
"environment": { "OMP_NUM_THREADS": "4", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=8,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_8_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --bias --relu --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=32,32,32" ], | ||
"environment": { "OMP_NUM_THREADS": "8", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=4,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_16_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --bias --relu --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=32,32,32" ], | ||
"environment": { "OMP_NUM_THREADS": "16", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=2,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
} | ||
}}, | ||
{ | ||
"gemm_fp32_mlir_vector_kernel_64": { | ||
"fp32_3x1024_omp_2_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=64,64,64" ], | ||
"environment": { "OMP_NUM_THREADS": "2", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=4,8 --vector-to-kernels --lhsTile=16,64 --rhsTile=64,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_4_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=64,64,64" ], | ||
"environment": { "OMP_NUM_THREADS": "4", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=4,4 --vector-to-kernels --lhsTile=16,64 --rhsTile=64,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_8_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=64,64,64" ], | ||
"environment": { "OMP_NUM_THREADS": "8", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=2,4 --vector-to-kernels --lhsTile=16,64 --rhsTile=64,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_16_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=64,64,64" ], | ||
"environment": { "OMP_NUM_THREADS": "16", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=1,4 --vector-to-kernels --lhsTile=16,64 --rhsTile=64,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
} | ||
}}, | ||
{ | ||
"mlp_fp32_mlir_vector_kernel_64": { | ||
"fp32_3x1024_omp_2_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --bias --relu --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=64,64,64" ], | ||
"environment": { "OMP_NUM_THREADS": "2", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=4,8 --vector-to-kernels --lhsTile=16,64 --rhsTile=64,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_4_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --bias --relu --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=64,64,64" ], | ||
"environment": { "OMP_NUM_THREADS": "4", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=4,4 --vector-to-kernels --lhsTile=16,64 --rhsTile=64,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_8_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --bias --relu --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=64,64,64" ], | ||
"environment": { "OMP_NUM_THREADS": "8", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=2,4 --vector-to-kernels --lhsTile=16,64 --rhsTile=64,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
}, | ||
"fp32_3x1024_omp_16_mlir": { | ||
"type": "IR-GEN", | ||
"benchmark": [ "mlir-gen", "--kernel=const --bias --relu --float-type=f32 --batch=256 --layers=1024,1024,1024,1024 --tiles=64,64,64" ], | ||
"environment": { "OMP_NUM_THREADS": "16", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=1,4 --vector-to-kernels --lhsTile=16,64 --rhsTile=64,1'" ], | ||
"extensions": [ "(avx2|asimd)" ] | ||
} | ||
}} | ||
] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
[ | ||
{ | ||
"gemm_fp32_torch_vector_kernel" : { | ||
"fp32_3x1024_omp_2_mlir": { | ||
"type": "MLIR", | ||
"benchmark": "pytorch/torch-dynamo-gemm-fp32-3x1024.mlir", | ||
"environment": { "OMP_NUM_THREADS": "2", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=8,16 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ ] | ||
}, | ||
"fp32_3x1024_omp_4_mlir": { | ||
"type": "MLIR", | ||
"benchmark": "pytorch/torch-dynamo-gemm-fp32-3x1024.mlir", | ||
"environment": { "OMP_NUM_THREADS": "4", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=8,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ ] | ||
}, | ||
"fp32_3x1024_omp_8_mlir": { | ||
"type": "MLIR", | ||
"benchmark": "pytorch/torch-dynamo-gemm-fp32-3x1024.mlir", | ||
"environment": { "OMP_NUM_THREADS": "8", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=4,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ ] | ||
}, | ||
"fp32_3x1024_omp_16_mlir": { | ||
"type": "MLIR", | ||
"benchmark": "pytorch/torch-dynamo-gemm-fp32-3x1024.mlir", | ||
"environment": { "OMP_NUM_THREADS": "16", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=2,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ ] | ||
} | ||
}}, | ||
{ | ||
"mlp_fp32_torch_vector_kernel" : { | ||
"fp32_3x1024_omp_2_mlir": { | ||
"type": "MLIR", | ||
"benchmark": "pytorch/torch-dynamo-mlp-fp32-3x1024.mlir", | ||
"environment": { "OMP_NUM_THREADS": "2", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=8,16 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ ] | ||
}, | ||
"fp32_3x1024_omp_4_mlir": { | ||
"type": "MLIR", | ||
"benchmark": "pytorch/torch-dynamo-mlp-fp32-3x1024.mlir", | ||
"environment": { "OMP_NUM_THREADS": "4", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=8,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ ] | ||
}, | ||
"fp32_3x1024_omp_8_mlir": { | ||
"type": "MLIR", | ||
"benchmark": "pytorch/torch-dynamo-mlp-fp32-3x1024.mlir", | ||
"environment": { "OMP_NUM_THREADS": "8", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=4,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ ] | ||
}, | ||
"fp32_3x1024_omp_16_mlir": { | ||
"type": "MLIR", | ||
"benchmark": "pytorch/torch-dynamo-mlp-fp32-3x1024.mlir", | ||
"environment": { "OMP_NUM_THREADS": "16", "KMP_AFFINITY": "granularity=fine,verbose,compact,1,0" }, | ||
"flags": [ "-n", "100", "-run-args='--def-parallel --parallel-task-grid=2,8 --vector-to-kernels --lhsTile=4,32 --rhsTile=32,1'" ], | ||
"extensions": [ ] | ||
} | ||
}} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters