Skip to content

Commit 8d667ab

Browse files
Merge remote-tracking branch 'upstream/master'
2 parents cabfbe1 + 649a675 commit 8d667ab

File tree

10 files changed

+38
-40
lines changed

10 files changed

+38
-40
lines changed

AI-and-Analytics/Features-and-Functionality/IntelTensorFlow_Horovod_Multinode_Training/README.md

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,41 +42,37 @@ TensorFlow is ready for use once you finish the Intel AI Analytics Toolkit insta
4242
You can refer to the oneAPI [main page](https://software.intel.com/en-us/oneapi) for toolkit installation and the Toolkit [Getting Started Guide for Linux](https://software.intel.com/en-us/get-started-with-intel-oneapi-linux-get-started-with-the-intel-ai-analytics-toolkit) for post-installation steps and scripts.
4343

4444

45-
### On a Linux* System
46-
#### Activate conda environment With Root Access
45+
### Sourcing the oneAPI AI Analytics Toolkit environment variables
4746

48-
Navigate in Linux shell to your oneapi installation path, typically `/opt/intel/oneapi`. Activate the conda environment with the following command:
47+
By default, the Intel AI Analytics toolkit is installed in the `/opt/intel/oneapi` folder. The toolkit may be loaded by sourcing the `setvars.sh` script on a Linux shell. Notice the flag `--ccl-configuration=cpu_icc`. By default, the `ccl-configuration` is set to `cpu_gpu_dpcpp`. However, since we are distributing our TensorFlow workload on multiple CPU nodes, we are configuring the Horovod installation to use CPUs.
4948

5049
```
51-
source /opt/intel/oneapi/setvars.sh
52-
source activate tensorflow
50+
source /opt/intel/oneapi/setvars.sh --ccl-configuration=cpu_icc
5351
```
5452

55-
#### Activate conda environment Without Root Access (Optional)
53+
### Creating a TensorFlow environment with Horovod
5654

57-
By default, the Intel AI Analytics toolkit is installed in the `/opt/intel/oneapi` folder, which requires root privileges to manage it. If you would like to bypass using root access to manage your conda environment, then you can clone your desired conda environment using the following command:
55+
Let's proceed with creating a conda environment with the Intel-optimized TensorFlow and horovod installed. Execute the following commands:
5856

5957
```
60-
conda create --name user_tensorflow --clone tensorflow
58+
conda create --name tensorflow_horovod
59+
conda activate tensorflow_horovod
6160
```
6261

63-
Then activate your conda environment with the following command:
62+
Find the path where the `tensorflow_horovod` conda environment has been created.
6463

6564
```
66-
source activate user_tensorflow
65+
conda install -c "/opt/intel/oneapi/conda_channel" -p <path_of_tensorflow_horovod_env>/tensorflow_horovod -y -q conda python=3.7 numpy intel-openmp tensorflow --offline
6766
```
6867

69-
## Running the Sample
70-
71-
Before running the sample, you will need to install the 3rd-party [Horovod](https://github.com/horovod/horovod) framework.
72-
73-
After you have activated your conda environment, you may wish to execute the following commands to install `horovod`:
68+
Before running the sample, you will need to install the 3rd-party [Horovod](https://github.com/horovod/horovod) framework. Proceed with installing Horovod with the follwing command:
7469
```
75-
export HOROVOD_WITHOUT_MPI=1 #Optional, in case you encounter MPI-related install issues
76-
pip install horovod
70+
env HOROVOD_WITHOUT_MPI=1 HOROVOD_CPU_OPERATIONS=CCL HOROVOD_WITHOUT_MXNET=1 HOROVOD_WITHOUT_PYTORCH=1 HOROVOD_WITH_TENSORFLOW=1 python -m pip install --upgrade --force-reinstall --no-cache-dir horovod
7771
```
7872

79-
To the script on one machine without invoking Horovod, type the following command in the terminal with Python installed:
73+
## Running the Sample
74+
75+
To execute the script on one machine without invoking Horovod, type the following command in the terminal with Python installed:
8076
```
8177
python TensorFlow_Multinode_Training_with_Horovod.py
8278
```

AI-and-Analytics/Features-and-Functionality/IntelTensorFlow_Horovod_Multinode_Training/sample.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
"ciTests": {
1010
"linux": [
1111
{
12-
"id": "tensorflow horovod",
12+
"env": ["source /opt/intel/oneapi/setvars.sh --ccl-configuration=cpu_icc --force", "conda create -n horovod_test -c intel -c conda python=3.7 numpy intel-openmp tensorflow=2.3.0", "source activate horovod_test"],
13+
"id": "tensorflow horovod",
1314
"steps": [
14-
"source activate tensorflow",
15-
"export HOROVOD_WITHOUT_MPI=1",
16-
"pip install horovod",
15+
"env HOROVOD_WITHOUT_MPI=1 HOROVOD_CPU_OPERATIONS=CCL HOROVOD_WITHOUT_MXNET=1 HOROVOD_WITHOUT_PYTORCH=1 HOROVOD_WITH_TENSORFLOW=1 python -m pip install --upgrade --force-reinstall --no-cache-dir horovod",
1716
"horovodrun -np 2 python TensorFlow_Multinode_Training_with_Horovod.py"
1817
]
1918
}

AI-and-Analytics/Features-and-Functionality/IntelTensorFlow_PerformanceAnalysis/README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Third party program Licenses can be found here: [third-party-programs.txt](https
5555

5656
1. Create conda env: `$conda create -n stock-tensorflow python matplotlib ipykernel psutil pandas gitpython`
5757
2. Activate the created conda env: `$source activate stock-tensorflow.`
58-
3. Install stock Tensorflow with a specific version: `(stock-tensorflow) $pip install tensorflow==2.2.0`
58+
3. Install stock Tensorflow with a specific version: `(stock-tensorflow) $pip install tensorflow==2.3.0`
5959
4. Install extra needed package: `(stock-tensorflow) $pip install cxxfilt`
6060
5. Deactivate conda env: `(stock-tensorflow)$conda deactivate`
6161
6. Register the kernel to Jupyter NB: `$~/.conda/envs/stock-tensorflow/bin/python -m ipykernel install --user --name=stock-tensorflow`
@@ -68,7 +68,7 @@ Third party program Licenses can be found here: [third-party-programs.txt](https
6868
> NOTE: Intel-optimized Tensorflow is on DevCloud. However, users don't have access to install extra packages.
6969
Therefore, we need to clone Intel Tensorflow into the user's home directory for installing extra packages.
7070

71-
1. Source oneAPI environment variables: `$source /opt/intel/inteloneapi/setvars.sh`
71+
1. Source oneAPI environment variables: `$source /opt/intel/oneapi/setvars.sh`
7272
2. Create conda env: `$conda create --name intel-tensorflow --clone tensorflow`
7373
3. Activate the created conda env: `$source activate intel-tensorflow`
7474
4 Install the extra needed package: `(intel-tensorflow) $pip install cxxfilt matplotlib ipykernel psutil pandas gitpython`
@@ -85,7 +85,7 @@ Third party program Licenses can be found here: [third-party-programs.txt](https
8585
1. Create conda env: `$conda create -n stock-tensorflow python matplotlib ipykernel psutil pandas gitpython`
8686

8787
2. Activate the created conda env: `$conda activate stock-tensorflow`
88-
3. Install stock tensorflow with a specific version: `(stock-tensorflow) $pip install tensorflow==2.2.0`
88+
3. Install stock tensorflow with a specific version: `(stock-tensorflow) $pip install tensorflow==2.3.0`
8989
4. Install extra needed package: `(stock-tensorflow) $pip install cxxfilt`
9090
5. Deactivate conda env: `(stock-tensorflow)$conda deactivate`
9191
6. Register the kernel to Jupyter NB: `$~/anaconda3/envs/stock-tensorflow/bin/python -m ipykernel install --user --name=stock-tensorflow`
@@ -108,17 +108,18 @@ Third party program Licenses can be found here: [third-party-programs.txt](https
108108

109109
### Running the Sample
110110

111-
1. Copy the Intel Model Zoo from your AI Analytics Toolkit installation path: `$cp -rf /opt/intel/inteloneapi/modelzoo/latest/models ~/`
112-
2. Launch Jupyter notebook: `$jupyter notebook --ip=0.0.0.0`
111+
1. Copy the Intel Model Zoo from your AI Analytics Toolkit installation path: `$cp -rf /opt/intel/oneapi/modelzoo/latest/models ~/`
112+
2. cd ~/models; git init; git add . ; git commit -m 'initial commit'
113+
3. Launch Jupyter notebook: `$jupyter notebook --ip=0.0.0.0`
113114

114115
> NOTE: Users don't need to apply step 2 on DevCloud Environment.
115116
116-
3. Follow the instructions to open the URL with the token in your browser
117-
4. Browse to the `models/docs/notebooks/perf_analysis` folder
118-
5. Click the `benchmark_perf_comparison.ipynb` or `benchmark_perf_timeline_analysis.ipynb` file
119-
6. Change your Jupyter notebook kernel to either "stock-tensorflow" or "intel-tensorflow" (highlighted in the diagram below)
117+
4. Follow the instructions to open the URL with the token in your browser
118+
5. Browse to the `models/docs/notebooks/perf_analysis` folder
119+
6. Click the `benchmark_perf_comparison.ipynb` or `benchmark_perf_timeline_analysis.ipynb` file
120+
7. Change your Jupyter notebook kernel to either "stock-tensorflow" or "intel-tensorflow" (highlighted in the diagram below)
120121
<br><img src="images/jupyter_kernels.png" width="300" height="300"><br>
121-
7. Run through every cell of the notebook one by one
122+
8. Run through every cell of the notebook one by one
122123

123124
> NOTE: To compare stock and Intel-optimized TF results in the section "Analyze TF Timeline results among Stock and Intel Tensorflow," users need to run all cells before the comparison section with both stock-tensorflow and intel-tensorflow kernels.
124125

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/lab/maximum_function.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
//
44
// SPDX-License-Identifier: MIT
55
// =============================================================
6+
#include <oneapi/dpl/numeric>
67
#include <oneapi/dpl/algorithm>
8+
#include <oneapi/dpl/functional>
79
#include <oneapi/dpl/execution>
810
#include <oneapi/dpl/iterator>
911

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/lab/minimum_function.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
//
44
// SPDX-License-Identifier: MIT
55
// =============================================================
6+
#include <oneapi/dpl/numeric>
67
#include <oneapi/dpl/algorithm>
8+
#include <oneapi/dpl/functional>
79
#include <oneapi/dpl/execution>
810
#include <oneapi/dpl/iterator>
911

DirectProgramming/DPC++/Jupyter/oneapi-essentials-training/07_DPCPP_Library/lab/transform_iterator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// SPDX-License-Identifier: MIT
55
// =============================================================
6-
#include <oneapi/dpl/algorithm>
6+
#include <oneapi/dpl/numeric>
77
#include <oneapi/dpl/execution>
88
#include <oneapi/dpl/iterator>
99

DirectProgramming/DPC++FPGA/ReferenceDesigns/db/README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ You should see the following output in the console:
249249
### Database files
250250
In the `data/` directory, you will find database files for a scale factor of 0.01. These files were generated manually and can be used to verify the queries in emulation. However, **these files are too small to showcase the true performance of the FPGA hardware**.
251251
252-
To generate larger database files to run on the hardware, you can use TPC's `dbgen` tool. Instructions for downloading, building and running the `dbgen` tool can be found in the [TPC-H documents](http://www.tpc.org/tpc_documents_current_versions/pdf/tpc-h_v2.18.0.pdf) on the [TPC-H website](http://www.tpc.org/tpch/). Note that this reference design currently only supports TPC-H databases with scale factors of 0.01 or 1.
252+
To generate larger database files to run on the hardware, you can use TPC's `dbgen` tool. Instructions for downloading, building and running the `dbgen` tool can be found on the [TPC-H website](http://www.tpc.org/tpch/). Note that this reference design currently only supports databases with scale factors of 0.01 or 1.
253253
254254
### Query Implementation
255255
The following sections will describe, at a high level, how queries 1, 9, 11 and 12 are implemented on the FPGA using a set of generalized database operators (found in `db_utils/`). In the block diagrams below, the blocks are oneAPI kernels, and the arrows represent `pipes` that shows the flow of data from one kernel to another.
@@ -271,10 +271,5 @@ Query 11 showcases the `MapJoin` and `FifoSort` database operators. The block di
271271
Query 12 showcases the `MergeJoin` database operator. The block diagram of the design is shown below.
272272
273273
![](q12.png)
274-
275-
## References
276-
[Khronous SYCL Resources](https://www.khronos.org/sycl/resources) </br>
277-
[TPC Website](http://www.tpc.org/tpch/) </br>
278-
[TPC-H Document](http://www.tpc.org/tpc_documents_current_versions/pdf/tpc-h_v2.18.0.pdf) </br>
279274
280275

DirectProgramming/DPC++FPGA/ReferenceDesigns/qrd/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ else()
5252
message(STATUS "\tAn invalid board name was passed in using the FPGA_BOARD flag. Configuring the design to run on the Intel(R) Programmable Acceleration Card (PAC) with Intel Arria(R) 10 GX FPGA. Please refer to the README for the list of valid board names.")
5353
endif()
5454

55-
set(HARDWARE_COMPILE_FLAGS -fintelfpga -c -DFIXED_ITERATIONS=${FIXED_ITERATIONS} -DROWS_COMPONENT=${ROWS_COMPONENT} -DCOLS_COMPONENT=${COLS_COMPONENT})
55+
set(HARDWARE_COMPILE_FLAGS -fintelfpga -c -fno-fast-math -DFIXED_ITERATIONS=${FIXED_ITERATIONS} -DROWS_COMPONENT=${ROWS_COMPONENT} -DCOLS_COMPONENT=${COLS_COMPONENT})
5656

5757
# use cmake -D USER_HARDWARE_FLAGS=<flags> to set extra flags for FPGA backend compilation
5858
separate_arguments(USER_HARDWARE_FLAGS)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
to delete - moved to new folder structure
2+

Libraries/oneCCL/oneCCL_Getting_Started/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ if("$ENV{EXAMPLE_ROOT}" STREQUAL "")
1212
file(COPY $ENV{CCL_ROOT}/examples/cpu DESTINATION src)
1313
file(COPY $ENV{CCL_ROOT}/examples/common DESTINATION src)
1414
file(COPY $ENV{CCL_ROOT}/examples/benchmark DESTINATION src)
15+
file(COPY $ENV{CCL_ROOT}/examples/external_launcher DESTINATION src)
1516
file(COPY $ENV{CCL_ROOT}/examples/include DESTINATION src)
1617
file(COPY $ENV{CCL_ROOT}/examples/CMakeLists.txt DESTINATION src)
1718
add_subdirectory (${PROJECT_BINARY_DIR}/src out)

0 commit comments

Comments
 (0)