MCPcopy Create free account
hub / github.com/mpi4py/mpi4py / __init__

Method __init__

test/arrayimpl.py:425–432  ·  view source on GitHub ↗
(self, arg, typecode, shape=None)

Source from the content-addressed store, hash-verified

423 dev_type = None
424
425 def __init__(self, arg, typecode, shape=None):
426 super().__init__(arg, typecode, shape)
427 self.has_dlpack = hasattr(self.array, "__dlpack_device__")
428 # TODO(leofang): test CUDA managed memory?
429 if cupy.cuda.runtime.is_hip:
430 self.dev_type = dlpack.DLDeviceType.kDLROCM
431 else:
432 self.dev_type = dlpack.DLDeviceType.kDLCUDA
433
434 def __dlpack_device__(self):
435 if self.has_dlpack:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected