Skip to content

Commit e313c9e

Browse files
authored
Merge branch 'oneapi-src:development' into development
2 parents 1fa3b8c + ce0fd8a commit e313c9e

File tree

813 files changed

+197777
-9163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

813 files changed

+197777
-9163
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "A4D97FA0-D515-4944-9970-C6742A85257F",
3-
"name": "PyTorch Training Optimizations with Advanced Matrix Extensions Bfloat16",
3+
"name": "Intel® Extension for PyTorch* Training Optimizations for Bfloat16",
44
"categories": ["Toolkit/oneAPI AI And Analytics/AI Features and Functionality"],
55
"description": "This sample illustrates how to train a PyTorch model using Advanced Matrix Extensions Bfloat16",
66
"builder": ["cli"],
@@ -22,4 +22,4 @@
2222
},
2323
"expertise": "Code Optimization"
2424
}
25-
25+

AI-and-Analytics/Features-and-Functionality/IntelPython_XGBoost_Performance/IntelPython_XGBoost_Performance.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@
355355
" df = pd.read_csv(filename)\n",
356356
" if not df.shape[0]==2:\n",
357357
" df2 = pd.DataFrame([[xgb_ver,xgb_total]], columns = [\"XGBoost Version\", \"Time in Sec\"])\n",
358-
" df = df.append(df2, ignore_index=True)"
358+
" df = pd.concat([df, df2], ignore_index=True) # df.append has been deprecated in pandas 2.0, if pandas version is 1.x append can be used: df = df.append(df2, ignore_index=True)"
359359
]
360360
},
361361
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "B69FAC86-88BF-41BD-B4E0-ACDF753ED3CE",
3-
"name": "Intel® Python Daal4py Distributed K-Means",
3+
"name": "Intel® Distribution for Python* Distributed K- Means Model",
44
"categories": ["Toolkit/oneAPI AI And Analytics/Features And Functionality"],
55
"description": "This sample code illustrates how to train and predict with a distributed K-Means model with the Intel® Distribution of Python using the Python API package Daal4py powered by Intel® oneDAL",
66
"builder": ["cli"],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "ED2952EA-04CB-4353-9FE6-80E0F7DCA098",
3-
"name": "Intel® Python Daal4py Distributed Linear Regression",
3+
"name": "Intel® Distribution for Python* Distributed Linear regression",
44
"categories": ["Toolkit/oneAPI AI And Analytics/Features And Functionality"],
55
"description": "This sample code illustrates how to train and predict with a Distributed Linear Regression model with the Intel® Distribution of Python using the Python API package Daal4py powered by Intel® oneDAL",
66
"builder": ["cli"],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "9d32f194-8667-41d3-865d-d43e9983c471",
3-
"name": "Optimize TensorFlow pre-trained model for inference",
3+
"name": "Intel® Optimization for TensorFlow* pre-trained model for inference",
44
"categories": ["Toolkit/oneAPI AI And Analytics/Features And Functionality"],
55
"description": "This tutorial will guide you how to optimize a pre-trained model for a better inference performance, and also analyze the model pb files before and after the inference optimizations.",
66
"builder": ["cli"],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "B213F6A5-E0C3-4267-8D0B-DDA5073A3F23",
3-
"name": "Intel® TensorFlow Model Zoo Inference With FP32 Int8",
3+
"name": "Model Zoo for Intel® Architecture Inference With FP32 Int8",
44
"categories": ["Toolkit/oneAPI AI And Analytics/Features And Functionality"],
55
"description": "This code example illustrates how to run FP32 and Int8 inference on Resnet50 with TensorFlow using Intel® Model Zoo",
66
"builder": ["cli"],

AI-and-Analytics/Features-and-Functionality/IntelTensorFlow_Transformer_AMX_bfloat16_MixedPrecision/IntelTensorFlow_Transformer_AMX_bfloat16_MixedPrecision.ipynb

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -195,22 +195,20 @@
195195
]
196196
},
197197
{
198+
"attachments": {},
198199
"cell_type": "markdown",
199200
"id": "71f6a9f6-e196-49ef-ba14-fb2c47b2a2c4",
200201
"metadata": {},
201202
"source": [
202203
"## Modification for mixed precision learning using bfloat16\n",
203204
"\n",
204-
"To use bfloat16 mixed precision learning we need to add the following lines:\n",
205+
"To use bfloat16 mixed precision learning we need to add the following line:\n",
205206
"\n",
206207
"```python\n",
207-
"from tensorflow.keras import mixed_precision\n",
208-
"\n",
209-
"policy = mixed_precision.Policy('mixed_bfloat16')\n",
210-
"mixed_precision.set_global_policy(policy)\n",
208+
"tf.config.optimizer.set_experimental_options({'auto_mixed_precision_onednn_bfloat16':True})\n",
211209
"```\n",
212210
"\n",
213-
"availabe in the prepared patch file `mixed_precision.patch` and the rest of the code should stay the same. So let's take a look what's in the prepared file."
211+
"available in the prepared patch file `mixed_precision.patch` and the rest of the code should stay the same. So let's take a look what's in the prepared file."
214212
]
215213
},
216214
{
@@ -321,13 +319,14 @@
321319
]
322320
},
323321
{
322+
"attachments": {},
324323
"cell_type": "markdown",
325324
"id": "9bd0bdf9",
326325
"metadata": {},
327326
"source": [
328327
"### AMX run\n",
329328
"\n",
330-
"First, we will run the same example on the maximum available CPU ISA, i.e., on AMX by setting `DNNL_MAX_CPU_ISA` to `AVX512_CORE_AMX` and also pointing to the corresponding file where the statistics of the execution of the example `./logs/log_cpu_bf16_avx512_amx.csv` will be saved."
329+
"First, we will run the same example on the maximum available CPU ISA, i.e., on AMX by setting `DNNL_MAX_CPU_ISA` to `AMX_BF16` and also pointing to the corresponding file where the statistics of the execution of the example `./logs/log_cpu_bf16_amx.csv` will be saved."
331330
]
332331
},
333332
{
@@ -349,7 +348,7 @@
349348
"# enable JIT Dump\n",
350349
"export DNNL_JIT_DUMP=1\n",
351350
"\n",
352-
"DNNL_MAX_CPU_ISA=AVX512_CORE_AMX python ./text_classification_with_transformer.py cpu >> ./logs/log_cpu_bf16_avx512_amx.csv 2>&1\n",
351+
"DNNL_MAX_CPU_ISA=AMX_BF16 python ./text_classification_with_transformer.py cpu >> ./logs/log_cpu_bf16_amx.csv 2>&1\n",
353352
"\n",
354353
"echo \"########## Done with the run\""
355354
]
@@ -454,7 +453,7 @@
454453
"log1.load_log(logfile1)\n",
455454
"exec_data1 = log1.exec_data\n",
456455
"\n",
457-
"logfile2 = './logs/log_cpu_bf16_avx512_amx.csv'\n",
456+
"logfile2 = './logs/log_cpu_bf16_amx.csv'\n",
458457
"log2 = oneDNNLog()\n",
459458
"log2.load_log(logfile2)\n",
460459
"exec_data2 = log2.exec_data"
@@ -523,7 +522,7 @@
523522
"name": "python",
524523
"nbconvert_exporter": "python",
525524
"pygments_lexer": "ipython3",
526-
"version": "3.8.11 (default, Jul 8 2021, 00:48:00) [MSC v.1916 64 bit (AMD64)]"
525+
"version": "3.8.11"
527526
},
528527
"vscode": {
529528
"interpreter": {
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
--- text_classification_with_transformer.py 2022-09-20 02:24:42.814605146 -0700
2-
+++ text_classification_with_transformer2.py 2022-09-20 02:24:48.489188611 -0700
3-
@@ -27,6 +27,16 @@
1+
--- text_classification_with_transformer2.py
2+
+++ text_classification_with_transformer.py
3+
@@ -43,6 +43,12 @@
4+
tf.config.threading.set_inter_op_parallelism_threads(inter_thread)
45

56

6-
"""
7+
+"""
78
+## Bfloat16 mixed precision learning
89
+"""
910
+
10-
+from tensorflow.keras import mixed_precision
11-
+
12-
+policy = mixed_precision.Policy('mixed_bfloat16')
13-
+mixed_precision.set_global_policy(policy)
14-
+
11+
+tf.config.optimizer.set_experimental_options({'auto_mixed_precision_onednn_bfloat16':True})
1512
+
16-
+"""
13+
"""
1714
## Implement a Transformer block as a layer
1815
"""
19-

AI-and-Analytics/Features-and-Functionality/IntelTensorFlow_Transformer_AMX_bfloat16_MixedPrecision/patch/time.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
--- text_classification_with_transformer.py 2022-10-17 04:04:37.455448493 -0700
2-
+++ text_classification_with_transformer2.py 2022-10-17 04:07:15.196716415 -0700
3-
@@ -9,10 +9,38 @@
1+
--- text_classification_with_transformer1.py
2+
+++ text_classification_with_transformer.py
3+
@@ -10,10 +10,38 @@
44
## Setup
55
"""
66

@@ -39,7 +39,7 @@
3939

4040
"""
4141
## Implement a Transformer block as a layer
42-
@@ -110,6 +138,11 @@
42+
@@ -111,6 +139,11 @@
4343
model.compile(
4444
optimizer="adam", loss="sparse_categorical_crossentropy", metrics=["accuracy"]
4545
)

AI-and-Analytics/Features-and-Functionality/IntelTensorFlow_Transformer_AMX_bfloat16_MixedPrecision/run_amx.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ export DNNL_VERBOSE=2
99
# enable JIT Dump
1010
export DNNL_JIT_DUMP=1
1111

12-
DNNL_MAX_CPU_ISA=AVX512_CORE_AMX python ./text_classification_with_transformer.py cpu >> ./logs/log_cpu_bf16_avx512_amx.csv 2>&1
12+
DNNL_MAX_CPU_ISA=AMX_BF16 python ./text_classification_with_transformer.py cpu >> ./logs/log_cpu_bf16_amx.csv 2>&1
1313

1414
echo "########## Done with the run"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"steps": [
1616
"conda activate tensorflow",
1717
"conda install -y jupyter",
18-
"jupyter nbconvert --execute IntelTensorFlow_Transformer_AMX_bfloat16_MixedPrecision.ipynb"
18+
"jupyter nbconvert --execute --to notebook IntelTensorFlow_Transformer_AMX_bfloat16_MixedPrecision.ipynb"
1919
]
2020
}
2121
]

AI-and-Analytics/Getting-Started-Samples/INC-Sample-for-Tensorflow/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "82e7612f-2810-4d12-9c75-c17fcbb946fa",
3-
"name": "Intel® Neural Compressor Tensorflow Getting Started",
3+
"name": "Intel® Neural Compressor Accelerate Inference with Intel® Optimization for TensorFlow*",
44
"categories": ["Toolkit/oneAPI AI And Analytics/AI Getting Started Samples"],
55
"description": "This sample illustrates how to run Intel® Neural Compressor to quantize the FP32 model trained by Keras on Tensorflow to INT8 model to speed up the inference.",
66
"languages": [{"python":{}}],

AI-and-Analytics/Getting-Started-Samples/IntelModin_GettingStarted/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "AE280EFE-9EB1-406D-B32D-5991F707E195",
3-
"name": "Intel® Modin Getting Started",
3+
"name": "Intel® Distribution of Modin* Getting Started",
44
"categories": ["Toolkit/oneAPI AI And Analytics/AI Getting Started Samples"],
55
"description": "This sample illustrates how to use Modin accelerated Pandas functions and notes the performance gain when compared to standard Pandas functions",
66
"builder": ["cli"],

AI-and-Analytics/Getting-Started-Samples/IntelPython_XGBoost_GettingStarted/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "3B164041-12CD-4429-A1AB-0F35EFE521FF",
3-
"name": "Intel® Python XGBoost Getting Started",
3+
"name": "Intel® Optimization for XGBoost* Getting Started",
44
"categories": ["Toolkit/oneAPI AI And Analytics/AI Getting Started Samples"],
55
"description": "The sample illustrates how to setup and train an XGBoost model on datasets for prediction",
66
"builder": ["cli"],

AI-and-Analytics/Getting-Started-Samples/IntelPython_daal4py_GettingStarted/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "2E6A2E22-035F-493B-B471-DFD8CF8F8256",
3-
"name": "Intel® Python Daal4py Getting Started",
3+
"name": "Intel® Distribution for Python* programming language Daal4py Getting Started",
44
"categories": ["Toolkit/oneAPI AI And Analytics/AI Getting Started Samples"],
55
"description": "This sample illustrates how to do Batch Linear Regression using the Python API package Daal4py powered by Intel® oneDAL",
66
"builder": ["cli"],

AI-and-Analytics/Getting-Started-Samples/IntelTensorFlow_GettingStarted/sample.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"guid": "111213A0-C930-45B4-820F-02472BABBF34",
3-
"name": "Intel® Tensorflow Getting Started",
3+
"name": "Intel® Optimization for TensorFlow* Getting Started",
44
"categories": ["Toolkit/oneAPI AI And Analytics/AI Getting Started Samples"],
55
"description": "This sample illustrates how to train a TensorFlow model and run inference with oneMKL and oneDNN.",
66
"builder": ["cli"],
77
"languages": [{
88
"python": {}
99
}],
10-
"os": ["linux", "windows"],
10+
"os": ["linux"],
1111
"targetDevice": ["CPU"],
1212
"ciTests": {
1313
"linux": [{

AI-and-Analytics/Getting-Started-Samples/Intel_Extension_For_SKLearn_GettingStarted/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "81B93386-B5EB-4998-B91B-3453263EC03E",
3-
"name": "Intel® Python Scikit-learn Extension Getting Started",
3+
"name": "Intel® Extension for Scikit-learn* Getting started",
44
"categories": ["Toolkit/oneAPI AI And Analytics/AI Getting Started Samples"],
55
"description": "This sample illustrates how to do Image classification using SVM classifier from Python API package SKlearnex with the use of Intel® oneAPI Data Analytics Library (oneDAL).",
66
"builder": ["cli"],

AI-and-Analytics/Getting-Started-Samples/Intel_Extension_For_TensorFlow_GettingStarted/sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"guid": "B213F6A5-E0C3-4267-8D0B-DDA5073A3F23",
3-
"name": "Intel® TensorFlow Model Zoo Inference With FP32 Int8",
3+
"name": "Intel® Extension for TensorFlow* Getting Started",
44
"categories": ["Toolkit/oneAPI AI And Analytics/Features And Functionality"],
55
"description": "This code example illustrates how to run FP32 and Int8 inference on Resnet50 with TensorFlow using Intel® Model Zoo",
66
"builder": ["cli"],

CONTRIBUTING.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Contributing to oneAPI-samples
2+
3+
The `master` branch contains code samples that work with the latest released version of the [Intel® oneAPI Toolkits](https://www.intel.com/content/www/us/en/developer/tools/oneapi/toolkits.html). Do not commit change to the `master` branch.
4+
5+
All contributions must go into the `development` branch through a pull request (PR) where they will be reviewed before being merged. At specific dates, corresponding to the releases of the oneapi DPC++/C++ compiler, the `development` branch is merged into the `master` branch.
6+
7+
## Fork the Repository
8+
9+
1. To fork the repository from the GitHub user interface, click the **Fork** icon then select **Create a new fork**. The fork will be created in few seconds. If you previously forked the repo, skip to the Step 5.
10+
11+
2. Select an **Owner** for the forked repository.
12+
13+
3. Deselect the **Copy the master branch only** check box. (It should be unchecked before proceeding to the next step.)
14+
15+
4. Click the **Create fork** button.
16+
17+
5. If you have an existing fork but do not have a `development` branch, create a `development` branch by selecting the oneapi-src/oneAPI-samples `development` branch in the dropdown as the branch source.
18+
19+
6. Once your fork has been created, click the **Settings** icon and find the **Default Branch** section.
20+
21+
7. Click the **Switch to another branch** graphic.
22+
23+
8. From the dropdown, change the default branch to `development`. Click the **Update** button.
24+
25+
9. To create a branch in your fork, make sure the `development` branch is selected from the dropdown, and enter the name of your branch in the text field.
26+
27+
## Clone Your Fork
28+
29+
Clone the repo and checkout the branch that you just created by entering a command similar to the following:
30+
31+
```
32+
git clone -b <your branch name> https://github.com/<your GitHub username>/<your repo name>.git
33+
```
34+
35+
Once you are ready to commit your changes to your repo, enter commands similar to the following:
36+
37+
```
38+
git add .
39+
git commit -s -m "<insert commit reason here>"
40+
git push origin
41+
```
42+
43+
## Submit Pull Requests
44+
45+
When submitting a pull request, keep the following guidelines in mind:
46+
47+
- Make sure that your pull request has a clear purpose; it should be as simple as possible. This approach enables quicker PR reviews.
48+
49+
- Explain anything non-obvious from the code in comments, commit messages, or the PR description, as needed.
50+
51+
- Check the number of files being updated. Ensure that your pull request includes only the files you expected to be changed. (If there are additional files you did not expect included in the commit, troubleshoot before submitting the PR.)
52+
53+
- Never open a pull request to the `master` branch directly, all pull requests must be targeting the `development` branch.
54+
55+
## Log a Bug or Request a Feature
56+
57+
We use [GitHub Issues](https://github.com/oneapi-src/oneAPI-samples/issues) to track sample development issues, bugs, and feature requests.
58+
59+
When reporting a bug, provide the following information when possible:
60+
61+
- Steps to reproduce the bug.
62+
- Whether you found or reproduced the bug using the latest sample in the `master` branch and the latest Intel® oneAPI Toolkits.
63+
- Version numbers or other information about the CPU/GPU/FPGA/device, platform, operating system or distribution you used to find the bug.
64+
65+
For usage, installation, or other requests for help, go to the [Intel® oneAPI Forums](https://software.intel.com/en-us/forums/intel-oneapi-forums) for more information.
66+
67+
## License
68+
69+
Code samples in this repository are licensed under the terms outlined in [License.txt](https://github.com/oneapi-src/oneAPI-samples/blob/master/License.txt). By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.

DirectProgramming/C++/ParallelPatterns/openmp_reduction/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ float openmp_device_calc_pi(int num_steps) {
6060
#pragma omp target teams distribute parallel for reduction(+ : sum)
6161
for (int i = 1; i < num_steps; i++) {
6262
float x = ((float)i - 0.5f) * step;
63-
sum = sum + 4.0f / (1.0 + x * x);
63+
sum = sum + 4.0f / (1.0f + x * x);
6464
}
6565
pi = sum * step;
6666
return pi;

DirectProgramming/C++/StructuredGrids/iso3dfd_omp_offload/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@ To learn more about the extensions and how to configure the oneAPI environment,
100100
```
101101
make VERBOSE=1
102102
```
103+
3. Change the optimized version (if needed)
104+
105+
If you already compiled with the optimization path, for example "*cmake -DUSE_OPT1=1 ..*", use "*cmake -DUSE_OPT1=0 ..*" can go back to the baseline version.
103106
104107
#### Troubleshooting
105108

DirectProgramming/C++SYCL/DenseLinearAlgebra/guided_jacobi_SYCLMigration/02_sycl_dpct_migrated/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ include_directories(${CMAKE_SOURCE_DIR}/02_sycl_dpct_migrated/Common/)
55
add_executable (02_sycl_dpct_migrated src/main.cpp src/jacobi.cpp)
66
target_link_libraries(02_sycl_dpct_migrated sycl)
77

8-
add_custom_target (run_sdm_cpu ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/02_sycl_dpct_migrated)
9-
add_custom_target (run_sdm_gpu SYCL_DEVICE_FILTER=gpu ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/02_sycl_dpct_migrated)
8+
add_custom_target (run_sdm ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/02_sycl_dpct_migrated)

DirectProgramming/C++SYCL/DenseLinearAlgebra/guided_jacobi_SYCLMigration/02_sycl_dpct_migrated/src/jacobi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ double JacobiMethodGpu(const float *A, const double *b,
263263

264264
q->memcpy(&sum, d_sum, sizeof(double)).wait();
265265

266-
printf("GPU iterations : %d\n", k + 1);
267-
printf("GPU error : %.3e\n", sum);
266+
printf("Device iterations : %d\n", k + 1);
267+
printf("Device error : %.3e\n", sum);
268268
break;
269269
}
270270
}

DirectProgramming/C++SYCL/DenseLinearAlgebra/guided_jacobi_SYCLMigration/02_sycl_dpct_migrated/src/main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ int main(int argc, char **argv) {
132132

133133
// stop Device Timer
134134
sdkStopTimer(&timerGpu);
135-
printf("GPU Processing time: %f (ms)\n", sdkGetTimerValue(&timerGpu));
135+
printf("Device Processing time: %f (ms)\n", sdkGetTimerValue(&timerGpu));
136136

137137
// Free up allocated memory
138138
free(d_b, dpct::get_default_queue());

DirectProgramming/C++SYCL/DenseLinearAlgebra/guided_jacobi_SYCLMigration/03_sycl_migrated/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
44
add_executable (03_sycl_migrated src/main.cpp src/jacobi.cpp)
55
target_link_libraries(03_sycl_migrated sycl)
66

7-
add_custom_target (run_cpu ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/03_sycl_migrated)
8-
add_custom_target (run_gpu SYCL_DEVICE_FILTER=gpu ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/03_sycl_migrated)
7+
add_custom_target (run ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/03_sycl_migrated)
98

DirectProgramming/C++SYCL/DenseLinearAlgebra/guided_jacobi_SYCLMigration/03_sycl_migrated/src/jacobi.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,8 @@ double JacobiMethodGpu(const float *A, const double *b,
263263

264264
q.memcpy(&sum, d_sum, sizeof(double)).wait();
265265

266-
printf("Parallel Implementation : \n");
267-
printf("Iterations : %d\n", k + 1);
268-
printf("Error : %.3e\n", sum);
266+
printf("Device iterations : %d\n", k + 1);
267+
printf("Device error : %.3e\n", sum);
269268
break;
270269
}
271270
}

0 commit comments

Comments
 (0)