network_set_gradient_tensor_memory#
-
cuquantum.
bindings. cutensornet. network_set_gradient_tensor_memory( - intptr_t handle,
- intptr_t network_desc,
- int64_t corresponding_tensor_id,
- intptr_t buffer,
- strides,
Provide memory buffer and strides of the gradient corresponding to tensorId of the network to be used for data writing.
- Parameters:
handle (intptr_t) – Opaque handle holding cuTensorNet’s library context.
network_desc (intptr_t) – The network descriptor.
corresponding_tensor_id (int64_t) – The tensorId as returned by
network_append_tensor()for the tensor whose gradient is to be computed.buffer (intptr_t) – Pointer to memory bugger in device memory.
strides (object) –
Array of size the number of modes of the corresponding tensor;
strides[j]corresponding to the linearized offset – in physical memory – between two logically-neighboring elements w.r.t the j-th mode of the tensor. It can be:an
intas the pointer address to the array, ora Python sequence of
int64_t.