Skip to content
Snippets Groups Projects
Commit 4e0fed62 authored by Isuru Fernando's avatar Isuru Fernando
Browse files

Fix benchmark

parent 44376fa2
No related branches found
No related tags found
2 merge requests!134M2l precompute,!129Support a custom derivative taker
...@@ -66,8 +66,14 @@ class TranslationBenchmarkSuite: ...@@ -66,8 +66,14 @@ class TranslationBenchmarkSuite:
src_rscale = sym.Symbol("src_rscale") src_rscale = sym.Symbol("src_rscale")
tgt_rscale = sym.Symbol("tgt_rscale") tgt_rscale = sym.Symbol("tgt_rscale")
sac = SymbolicAssignmentCollection() sac = SymbolicAssignmentCollection()
result = l_expn.translate_from(m_expn, src_coeff_exprs, src_rscale, try:
result = l_expn.translate_from(m_expn, src_coeff_exprs, src_rscale,
dvec, tgt_rscale, sac) dvec, tgt_rscale, sac)
except TypeError:
# Support older interface to make it possible to compare
# in CI run
result = l_expn.translate_from(m_expn, src_coeff_exprs, src_rscale,
dvec, tgt_rscale)
for i, expr in enumerate(result): for i, expr in enumerate(result):
sac.assign_unique("coeff%d" % i, expr) sac.assign_unique("coeff%d" % i, expr)
sac.run_global_cse() sac.run_global_cse()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment