Skip to content

Commit

Permalink
exclude illegal casting
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrantq committed Oct 1, 2024
1 parent d1101d7 commit 548ae2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion example/microbm/microbm.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
functions = ["sin", "cos", "tan", "exp", "log", "sqrt", "expm1", "log1p", "cbrt", "pow", "fabs", "hypot", "fmuladd"]

precisions = ["bf16", "half", "float", "double", "fp80", "fp128"]
iterations = 10
iterations = 1000000000
unrolled = 32

precision_to_llvm_type = {
Expand Down Expand Up @@ -558,6 +558,10 @@ def compile_and_run(ll_filename, executable):
else:
dst_precisions = [p for p in precisions_ordered if precision_ranks[p] > src_rank]
for dst_precision in dst_precisions:
if (src_precision == "half" and dst_precision == "bf16") or (
src_precision == "bf16" and dst_precision == "half"
):
continue
llvm_code = generate_llvm_code(instr, src_precision, dst_precision, iterations)
if not llvm_code.strip():
continue
Expand Down

0 comments on commit 548ae2c

Please sign in to comment.