cuquantum.cutensornet.get_device_mem_handler

cuquantum.cutensornet.get_device_mem_handler(intptr_t handle) tuple[source]

Get the device memory handler for cuTensorNet.

Parameters

handle (intptr_t) – The library handle.

Returns

The handler object, which has two forms:

  • If handler is a 3-tuple, it is interpreted as (malloc, free, name), where the first two objects are Python callables, and name is the name of the handler. This 3-tuple handler would be compared equal (elementwisely) to the one previously passed to set_device_mem_handler().

  • If handler is a 4-tuple, it is interpreted as (ctx, device_alloc, device_free, name), where the first three elements are the pointer addresses (int) of the corresponding members. name is the same as above.

Return type

tuple