MCPcopy
hub / github.com/dask/dask / test_disable_lowlevel_fusion

Function test_disable_lowlevel_fusion

dask/array/tests/test_optimization.py:168–181  ·  view source on GitHub ↗

Check that by disabling fusion, the HLG survives through optimizations

()

Source from the content-addressed store, hash-verified

166
167
168def test_disable_lowlevel_fusion():
169 """Check that by disabling fusion, the HLG survives through optimizations"""
170
171 with dask.config.set({"optimization.fuse.active": False}):
172 y = da.ones(3, chunks=(3,), dtype="int")
173 optimize = y.__dask_optimize__
174 dsk1 = y.__dask_graph__()
175 dsk2 = optimize(dsk1, y.__dask_keys__())
176 assert isinstance(dsk1, HighLevelGraph)
177 assert isinstance(dsk2, HighLevelGraph)
178 assert dsk1 == dsk2
179 y = y.persist()
180 assert isinstance(y.__dask_graph__(), HighLevelGraph)
181 assert_eq(y, [1] * 3)
182
183
184def test_array_creation_blockwise_fusion():

Callers

nothing calls this directly

Calls 7

optimizeFunction · 0.90
assert_eqFunction · 0.90
setMethod · 0.80
onesMethod · 0.45
__dask_graph__Method · 0.45
__dask_keys__Method · 0.45
persistMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…