cuquantum.bindings.cutensornet.create_network_descriptor¶
- cuquantum.bindings.cutensornet.create_network_descriptor(intptr_t handle, int32_t num_inputs, num_modes_in, extents_in, strides_in, modes_in, qualifiers_in, int32_t num_modes_out, extents_out, strides_out, modes_out, int data_type, int compute_type) intptr_t[source]¶
Initializes a
cutensornetNetworkDescriptor_t, describing the connectivity (i.e., network topology) between the tensors.- Parameters
handle (intptr_t) – Opaque handle holding cuTensorNet’s library context.
num_inputs (int32_t) – Number of input tensors.
num_modes_in (object) –
Array of size
num_inputs;num_modes_in[i]denotes the number of modes available in the i-th tensor. It can be:an
intas the pointer address to the array, ora Python sequence of
int32_t.
extents_in (object) –
Array of size
num_inputs;extents_in[i]hasnum_modes_in[i]many entries withextents_in[i][j](j<num_modes_in[i]) corresponding to the extent of the j-th mode of tensori. It can be:strides_in (object) –
Array of size
num_inputs;strides_in[i]hasnum_modes_in[i]many entries withstrides_in[i][j](j<num_modes_in[i]) corresponding to the linearized offset – in physical memory – between two logically-neighboring elements w.r.t the j-th mode of tensori. It can be:modes_in (object) –
Array of size
num_inputs;modes_in[i]hasnum_modes_in[i]many entries – each entry corresponds to a mode. Each mode that does not appear in the input tensor is implicitly contracted. It can be:qualifiers_in (object) –
Array of size
num_inputs;qualifiers_in[i]denotes the qualifiers of i-th input tensor. Refer tocutensornetTensorQualifiers_t. It can be:an
intas the pointer address to the array, ora Python sequence of
cutensornetTensorQualifiers_t.
num_modes_out (int32_t) – number of modes of the output tensor. On entry, if this value is
-1and the output modes are not provided, the network will infer the output modes. If this value is0, the network is force reduced.extents_out (object) –
Array of size
num_modes_out;extents_out[j](j<num_modes_out) corresponding to the extent of the j-th mode of the output tensor. It can be:an
intas the pointer address to the array, ora Python sequence of
int64_t.
strides_out (object) –
Array of size
num_modes_out;strides_out[j](j<num_modes_out) corresponding to the linearized offset – in physical memory – between two logically-neighboring elements w.r.t the j-th mode of the output tensor. It can be:an
intas the pointer address to the array, ora Python sequence of
int64_t.
modes_out (object) –
Array of size
num_modes_out;modes_out[j]denotes the j-th mode of the output tensor. output tensor. It can be:an
intas the pointer address to the array, ora Python sequence of
int32_t.
data_type (int) – Denotes the data type for all input an output tensors.
compute_type (ComputeType) – Denotes the compute type used throughout the computation.
- Returns
Pointer to a
cutensornetNetworkDescriptor_t.- Return type
intptr_t
See also