Skip to content

Commit

Permalink
Merge pull request #257 from jakirkham/drop_numba_sizeof_code
Browse files Browse the repository at this point in the history
Drop Numba `DeviceNDArray` code for `sizeof`
  • Loading branch information
pentschev authored Mar 19, 2020
2 parents ba6829e + b9bc27e commit bf6f868
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Respect `temporary-directory` config for spilling (#247) `John Kirkham`_
- Relax CuPy pin (#248) `John Kirkham`_
- Added `ignore_index` argument to `partition_by_hash()` (#253) `Mads R. B. Kristensen`_
- Drop Numba `DeviceNDArray` code for `sizeof` (#257) `John Kirkham`_

0.12
----
Expand Down
13 changes: 0 additions & 13 deletions dask_cuda/device_host_file.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os

import dask
from dask.sizeof import sizeof
from distributed.protocol import (
dask_deserialize,
dask_serialize,
Expand All @@ -25,18 +24,6 @@
import numba.cuda as cuda_memory_manager


# Register sizeof for Numba DeviceNDArray while Dask doesn't add it
if not hasattr(sizeof, "register_numba"):

@sizeof.register_lazy("numba")
def register_numba():
import numba

@sizeof.register(numba.cuda.cudadrv.devicearray.DeviceNDArray)
def sizeof_numba_devicearray(x):
return int(x.nbytes)


class DeviceSerialized:
""" Store device object on the host
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dask>=2.4.0
dask>=2.9.0
distributed>=2.7.0
pynvml>=8.0.3
numpy>=1.16.0
Expand Down

0 comments on commit bf6f868

Please sign in to comment.