Skip to content

Commit 2e19029

Browse files
authored
Update README.md
1 parent c5f02ea commit 2e19029

File tree

1 file changed

+31
-15
lines changed
  • AI-and-Analytics/Getting-Started-Samples/Intel_oneCCL_Bindings_For_PyTorch_GettingStarted

1 file changed

+31
-15
lines changed

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

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ You will need to download and install the following toolkits, tools, and compone
4141

4242
**1. Get AI Tools**
4343

44-
Required AI Tools: < ><!-- List specific AI Tools that needs to be installed before running this sample -->
44+
Required AI Tools: Intel® Extension for PyTorch* - (CPU) or (GPU)
4545

4646
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.
4747

@@ -59,22 +59,24 @@ source <custom_path>/bin/activate
5959
```
6060

6161
**3. (Offline Installer) Activate relevant Conda environment**
62-
<!-- specify relevant conda environment name in Offline Installer for this sample -->
62+
For CPU
6363
```
64-
conda activate <offline-conda-env-name>
64+
conda activate pytorch
6565
```
66-
66+
For GPU
67+
```
68+
conda activate pytorch-gpu
69+
```
70+
6771
**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 -->
72+
7173
```
72-
git clone <link-to-the-repo>.git
73-
cd <path-to-sample-dir>
74+
git clone https://github.com/oneapi-src/oneAPI-samples.git
75+
cd oneAPI-samples/AI-and-Analytics/Getting-Started-Samples/Intel_oneCCL_Bindings_For_PyTorch_GettingStarted
7476
```
7577

7678
**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. -->
79+
7880
>**Note**: Before running the following commands, make sure your Conda/Python environment with AI Tools installed is activated
7981
8082
```
@@ -91,13 +93,27 @@ Go to the section which corresponds to the installation method chosen in [AI Too
9193
* [Docker](#docker)
9294

9395
### AI Tools Offline Installer (Validated)
94-
1. If you have not already done so, activate the AI Tools bundle base environment. If you used the default location to install AI Tools, open a terminal and type the following
96+
**1. Register Conda kernel to Jupyter Notebook kernel**
97+
For CPU
98+
If the default path is used during the installation of AI Tools:
99+
95100
```
96-
source $HOME/intel/oneapi/intelpython/bin/activate
101+
$HOME/intel/oneapi/intelpython/envs/pytorch/bin/python -m ipykernel install --user --name=pytorch
97102
```
98-
If you used a separate location, open a terminal and type the following
103+
If a non-default path is used:
99104
```
100-
source <custom_path>/bin/activate
105+
<custom_path>/bin/python -m ipykernel install --user --name=pytorch
106+
```
107+
108+
For GPU
109+
If the default path is used during the installation of AI Tools:
110+
111+
```
112+
$HOME/intel/oneapi/intelpython/envs/pytorch/bin/python -m ipykernel install --user --name=pytorch-gpu
113+
```
114+
If a non-default path is used:
115+
```
116+
<custom_path>/bin/python -m ipykernel install --user --name=pytorch-gpu
101117
```
102118
2. Launch Jupyter Notebook.
103119
```
@@ -108,7 +124,7 @@ jupyter notebook --ip=0.0.0.0 --port 8888 --allow-root
108124
```
109125
oneCCL_Bindings_GettingStarted.ipynb
110126
```
111-
5. Change kernel to **PyTorch** or **PyTorch-GPU**.
127+
5. Change kernel to **pytorch** or **pytorch-gpu**.
112128
6. Run every cell in the Notebook in sequence.
113129
114130
### Docker

0 commit comments

Comments
 (0)