Update sample codes
This commit is contained in:
11
README.md
11
README.md
@@ -4,7 +4,7 @@ To get started, `python setup.py install` to install the tools and dependencies.
|
|||||||
|
|
||||||
# Sample Codes
|
# Sample Codes
|
||||||
## Single Node
|
## Single Node
|
||||||
|
The code below shows an example of how to activate the Cuquantum TensorNetwork backend of Qibo.
|
||||||
<pre>
|
<pre>
|
||||||
```
|
```
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@@ -58,3 +58,12 @@ result = c()
|
|||||||
print(result.state())
|
print(result.state())
|
||||||
```
|
```
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
## Multi-Node
|
||||||
|
Multi-node is enabled by setting either the MPI or NCCL enabled flag to True in the computation settings. Below shows the script to launch multi node on 4 GPU in cluster.
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
```
|
||||||
|
mpirun -n 4 --mca opal_common_ucx_opal_mem_hooks 1 --mca orte_base_help_aggregate 0 -mca btl ^openib -hostfile $node_list python test.py
|
||||||
|
```
|
||||||
|
</pre>
|
||||||
Reference in New Issue
Block a user