add attributes property to Device
@@ -7,6 +7,7 @@ import six
from cupy.cuda cimport cublas
from cupy.cuda cimport cusparse
from cupy.cuda cimport runtime
+from cupy.cuda import get_attributes_dict
try:
from cupy.cuda import cusolver
@@ -223,6 +224,10 @@ cdef class Device:
with self:
return runtime.memGetInfo()
+ @property
+ def attributes(self):
+ return get_attributes_dict(self.id)
+
def __richcmp__(Device self, object other, int op):
if op == 2:
return isinstance(other, Device) and self.id == other.id
