MCPcopy Create free account
hub / github.com/dask/dask / test_turn_off_fusion

Function test_turn_off_fusion

dask/array/tests/test_optimization.py:155–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

153
154@pytest.mark.xfail(reason="blockwise fusion does not respect this, which is ok")
155def test_turn_off_fusion():
156 x = da.ones(10, chunks=(5,))
157 y = da.sum(x + 1 + 2 + 3)
158
159 a = y.__dask_optimize__(y.dask, y.__dask_keys__())
160
161 with dask.config.set({"optimization.fuse.ave-width": 0}):
162 b = y.__dask_optimize__(y.dask, y.__dask_keys__())
163
164 assert dask.get(a, y.__dask_keys__()) == dask.get(b, y.__dask_keys__())
165 assert len(a) < len(b)
166
167
168def test_disable_lowlevel_fusion():

Callers

nothing calls this directly

Calls 6

__dask_optimize__Method · 0.80
setMethod · 0.80
onesMethod · 0.45
sumMethod · 0.45
__dask_keys__Method · 0.45
getMethod · 0.45

Tested by

no test coverage detected