Skip to content

Commit

Permalink
benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
mariogeiger committed Jun 23, 2023
1 parent 8611cab commit 25b1ddf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/tensor_product_benchmark.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import re
import time

import haiku as hk
Expand Down Expand Up @@ -160,7 +161,10 @@ def tp(x1, x2):
print(f"{1e3 * perloop:.2f} ms")

with open("xla.txt", "wt") as file:
file.write(jit_code(f, w, *inputs))
code = jit_code(f, w, *inputs)
code = re.sub(r"\d", "", code)

file.write(code)


if __name__ == "__main__":
Expand Down

0 comments on commit 25b1ddf

Please sign in to comment.