def main(): parser = argparse.ArgumentParser() add_arguments(parser) args = parser.parse_args() for (b1, b2, m, k, n, data_type, onnx_file) in create_benchmark_cases(args.precision): time = benchmark_matmul(b1, b2, m, k, n, data_type, onnx_file, args) tflops = b1 * b2 * m * k * n * 2 / time / 1000000000 print(f"(b1 b2 m k n) = ({b1} {b2} {m} {k} {n}), {time:7.4f} ms, {tflops:4.2f} tflops")
def main(): parser = argparse.ArgumentParser() add_arguments(parser) args = parser.parse_args() for (batch, seq_len, intermediate_dimension, data_type, onnx_file) in create_benchmark_cases(args.precision): time = benchmark_fast_gelu(batch, seq_len, intermediate_dimension, data_type, onnx_file, args) print( f"(batch seq_len inter_dim) = ({batch} {seq_len} {intermediate_dimension}), {time:7.4f} ms" )
def main(): parser = argparse.ArgumentParser() add_arguments(parser) args = parser.parse_args() bm = BenchmarkMatMul(args) bm.benchmark()
def main(): parser = argparse.ArgumentParser() add_arguments(parser) args = parser.parse_args() bm = BenchmarkSkipLayerNorm(args) bm.benchmark()