mirror of
https://github.com/ROCm/jax.git
synced 2025-04-25 11:36:09 +00:00
Merge pull request #1180 from brianwa84/patch-1
Make DeviceValue and subclasses weakref friendly
This commit is contained in:
commit
bb3882a332
@ -434,7 +434,7 @@ for _t in array_types:
|
|||||||
|
|
||||||
class DeviceValue(object):
|
class DeviceValue(object):
|
||||||
"""A DeviceValue represents a value backed by device memory."""
|
"""A DeviceValue represents a value backed by device memory."""
|
||||||
__slots__ = ["aval", "device_buffer"]
|
__slots__ = ["aval", "device_buffer", "__weakref__"]
|
||||||
|
|
||||||
def __init__(self, aval, device_buffer):
|
def __init__(self, aval, device_buffer):
|
||||||
self.aval = aval
|
self.aval = aval
|
||||||
|
Loading…
x
Reference in New Issue
Block a user