Skip to content

Commit c5f02ea

Browse files
authored
Update README.md
1 parent 55c80a8 commit c5f02ea

File tree

1 file changed

+58
-13
lines changed
  • AI-and-Analytics/Getting-Started-Samples/Intel_oneCCL_Bindings_For_PyTorch_GettingStarted

1 file changed

+58
-13
lines changed

AI-and-Analytics/Getting-Started-Samples/Intel_oneCCL_Bindings_For_PyTorch_GettingStarted/README.md

Lines changed: 58 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
The oneAPI Collective Communications Library Bindings for PyTorch* (oneCCL Bindings for PyTorch*) holds PyTorch bindings maintained by Intel for the Intel® oneAPI Collective Communications Library (oneCCL).
44

5-
| Area | Description
5+
| Property | Description
66
|:--- |:---
7+
| Category | Getting Started
78
| What you will learn | How to get started with oneCCL Bindings for PyTorch*
89
| Time to complete | 60 minutes
910

@@ -34,8 +35,56 @@ The Jupyter Notebook also demonstrates how to change PyTorch* distributed worklo
3435
>- [Intel® oneCCL Bindings for PyTorch*](https://github.com/intel/torch-ccl)
3536
>- [Distributed Training with oneCCL in PyTorch*](https://github.com/intel/optimized-models/tree/master/pytorch/distributed)
3637
38+
## Environment Setup
39+
You will need to download and install the following toolkits, tools, and components to use the sample.
40+
<!-- Use numbered steps instead of subheadings -->
3741

38-
## Run the `oneCCL Bindings for PyTorch* Getting Started` Sample
42+
**1. Get AI Tools**
43+
44+
Required AI Tools: < ><!-- List specific AI Tools that needs to be installed before running this sample -->
45+
46+
If you have not already, select and install these Tools via [AI Tools Selector](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-tools-selector.html). AI and Analytics samples are validated on AI Tools Offline Installer. It is recommended to select Offline Installer option in AI Tools Selector.
47+
48+
>**Note**: If Docker option is chosen in AI Tools Selector, refer to [Working with Preset Containers](https://github.com/intel/ai-containers/tree/main/preset) to learn how to run the docker and samples.
49+
50+
**2. (Offline Installer) Activate the AI Tools bundle base environment**
51+
<!-- this step is from AI Tools GSG, please don't modify unless GSG is updated -->
52+
If the default path is used during the installation of AI Tools:
53+
```
54+
source $HOME/intel/oneapi/intelpython/bin/activate
55+
```
56+
If a non-default path is used:
57+
```
58+
source <custom_path>/bin/activate
59+
```
60+
61+
**3. (Offline Installer) Activate relevant Conda environment**
62+
<!-- specify relevant conda environment name in Offline Installer for this sample -->
63+
```
64+
conda activate <offline-conda-env-name>
65+
```
66+
67+
**4. Clone the GitHub repository**
68+
<!-- for oneapi-samples: git clone https://github.com/oneapi-src/oneAPI-samples.git
69+
cd oneAPI-samples/AI-and-Analytics/<samples-folder>/<individual-sample-folder> -->
70+
<!-- for migrated samples - provide git clone command for individual repo and cd to sample dir -->
71+
```
72+
git clone <link-to-the-repo>.git
73+
cd <path-to-sample-dir>
74+
```
75+
76+
**5. Install dependencies**
77+
<!-- It is required to have requirement.txt file in sample dir. It should list additional libraries, such as matplotlib, ipykernel etc. -->
78+
>**Note**: Before running the following commands, make sure your Conda/Python environment with AI Tools installed is activated
79+
80+
```
81+
pip install -r requirements.txt
82+
pip install notebook
83+
```
84+
For Jupyter Notebook, refer to [Installing Jupyter](https://jupyter.org/install) for detailed installation instructions.
85+
86+
## Run the Sample
87+
>**Note**: Before running the sample, make sure [Environment Setup](https://github.com/oneapi-src/oneAPI-samples/tree/master/AI-and-Analytics/Getting-Started-Samples/INC-Quantization-Sample-for-PyTorch#environment-setup) is completed.
3988
4089
Go to the section which corresponds to the installation method chosen in [AI Tools Selector](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-tools-selector.html) to see relevant instructions:
4190
* [AI Tools Offline Installer (Validated)](#ai-tools-offline-installer-validated)
@@ -50,23 +99,17 @@ If you used a separate location, open a terminal and type the following
5099
```
51100
source <custom_path>/bin/activate
52101
```
53-
2. Clone the GitHub repository and install required packages:
54-
```
55-
git clone https://github.com/oneapi-src/oneAPI-samples.git
56-
cd oneAPI-samples/AI-and-Analytics/Getting-Started-Samples/Intel_oneCCL_Bindings_For_PyTorch_GettingStarted/
57-
pip install -r requirements.txt
58-
```
59-
3. Launch Jupyter Notebook.
102+
2. Launch Jupyter Notebook.
60103
```
61104
jupyter notebook --ip=0.0.0.0 --port 8888 --allow-root
62105
```
63-
4. Follow the instructions to open the URL with the token in your browser.
64-
5. Locate and select the Notebook.
106+
3. Follow the instructions to open the URL with the token in your browser.
107+
4. Select the Notebook.
65108
```
66109
oneCCL_Bindings_GettingStarted.ipynb
67110
```
68-
6. Change your Jupyter Notebook kernel to **PyTorch** or **PyTorch-GPU**.
69-
7. Run every cell in the Notebook in sequence.
111+
5. Change kernel to **PyTorch** or **PyTorch-GPU**.
112+
6. Run every cell in the Notebook in sequence.
70113
71114
### Docker
72115
AI Tools Docker images already have Get Started samples pre-installed. Refer to [Working with Preset Containers](https://github.com/intel/ai-containers/tree/main/preset) to learn how to run the docker and samples.
@@ -77,3 +120,5 @@ Code samples are licensed under the MIT license. See
77120
[License.txt](https://github.com/oneapi-src/oneAPI-samples/blob/master/License.txt) for details.
78121
79122
Third party program Licenses can be found here: [third-party-programs.txt](https://github.com/oneapi-src/oneAPI-samples/blob/master/third-party-programs.txt).
123+
124+
*Other names and brands may be claimed as the property of others. [Trademarks](https://www.intel.com/content/www/us/en/legal/trademarks.html)

0 commit comments

Comments
 (0)