Initial commit
This commit is contained in:
commit
fbf6898dd9
6 changed files with 220 additions and 0 deletions
41
benchmark.py
Normal file
41
benchmark.py
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
from argparse import ArgumentParser
|
||||
from pathlib import Path
|
||||
|
||||
from src.base import DataType
|
||||
from src.torch.matmul import TorchMatmulBench
|
||||
|
||||
|
||||
def main():
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('--output', type=Path, default=Path('output'), help='Path to output files')
|
||||
arguments = parser.parse_args()
|
||||
|
||||
output_path: Path = arguments.output
|
||||
|
||||
if not output_path.exists():
|
||||
output_path.mkdir(parents=True)
|
||||
|
||||
for data_type in DataType:
|
||||
TorchMatmulBench(output_path).run(
|
||||
[
|
||||
((100, 100), (100, 100)),
|
||||
((100, 200), (200, 100)),
|
||||
((128, 128), (128, 128)),
|
||||
((200, 100), (100, 200)),
|
||||
((200, 200), (200, 200)),
|
||||
((256, 256), (256, 256)),
|
||||
((256, 512), (512, 256)),
|
||||
((400, 400), (400, 400)),
|
||||
((512, 256), (256, 512)),
|
||||
((512, 512), (512, 512)),
|
||||
((800, 800), (800, 800)),
|
||||
((1000, 1000), (1000, 1000)),
|
||||
((1200, 1200), (1200, 1200)),
|
||||
],
|
||||
12,
|
||||
data_type)
|
||||
print('Benchmark done')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue