cuquantum.cutensornet.network_set_attribute¶
- cuquantum.cutensornet.network_set_attribute(intptr_t handle, intptr_t tn_desc, int attr, intptr_t buf, size_t size)[source]¶
Set the network descriptor attribute.
- Parameters
handle (intptr_t) – The library handle.
tn_desc (intptr_t) – The tensor network descriptor.
attr (NetworkAttribute) – The attribute to set.
buf (intptr_t) – The pointer address (as Python
int
) to the attribute data.size (size_t) – The size of
buf
(in bytes).
Note
To compute
size
, use the itemsize of the corresponding data type, which can be queried usingnetwork_get_attribute_dtype()
.See also