Check that by disabling fusion, the HLG survives through optimizations
()
| 166 | |
| 167 | |
| 168 | def 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 | |
| 184 | def test_array_creation_blockwise_fusion(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…