Author: Richard Plangger <r...@pasra.at> Branch: vecopt Changeset: r78383:a01f8e4831c4 Date: 2015-07-01 18:05 +0200 http://bitbucket.org/pypy/pypy/changeset/a01f8e4831c4/
Log: restricted input size for vectorization to 75 operations max (dont see any chance for it to succeed with more than 20-30 operations) reduce resetting rval at the end of the loop diff --git a/pypy/module/micronumpy/loop.py b/pypy/module/micronumpy/loop.py --- a/pypy/module/micronumpy/loop.py +++ b/pypy/module/micronumpy/loop.py @@ -220,6 +220,7 @@ return rval cur_value = func(calc_dtype, cur_value, rval) obj_state = obj_iter.next(obj_state) + rval = None return cur_value reduce_cum_driver = jit.JitDriver( @@ -346,6 +347,7 @@ temp_state = temp_iter.next(temp_state) else: temp_state = out_state + w_val = None return out diff --git a/rpython/jit/metainterp/optimizeopt/vectorize.py b/rpython/jit/metainterp/optimizeopt/vectorize.py --- a/rpython/jit/metainterp/optimizeopt/vectorize.py +++ b/rpython/jit/metainterp/optimizeopt/vectorize.py @@ -50,6 +50,11 @@ optimize_unroll(metainterp_sd, jitdriver_sd, loop, optimizations, inline_short_preamble, start_state, False) orig_ops = loop.operations + if len(orig_ops) >= 75: + # if more than 75 operations are present in this loop, + # it won't be possible to vectorize. There are too many + # guards that prevent parallel execution of instructions + return start = -1 end = -1 try: _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit