Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync with main #280

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ if (SYCL_ACADEMY_USE_ADAPTIVECPP)
"the path to the root of the chosen SYCL implementation using "
"SYCL_ACADEMY_INSTALL_ROOT=<path/to/install/root>.")
endif()
set(hipSYCL_DIR ${SYCL_ACADEMY_INSTALL_ROOT}/lib/cmake/hipSYCL)
find_package(hipSYCL CONFIG REQUIRED PATHS)
set(AdaptiveCpp_DIR ${SYCL_ACADEMY_INSTALL_ROOT}/lib/cmake/AdaptiveCpp)
find_package(AdaptiveCpp CONFIG REQUIRED PATHS)
endif()

# Exercises
Expand Down
6 changes: 4 additions & 2 deletions Code_Exercises/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
# CMake function to build ab AdaptiveCpp configuration and create executable binaries
# from AdaptiveCpp libraries.
function( add_sycl_executable_adaptivecpp prefix source )
add_executable("${prefix}_${source}" "${source}.cpp")
target_compile_definitions("${prefix}_${source}" PUBLIC -DSYCL_LANGUAGE_VERSION=2020)
set(TARGET_NAME "${prefix}_${source}")
add_executable("${TARGET_NAME}" "${source}.cpp")
add_sycl_to_target(TARGET ${TARGET_NAME} SOURCES "${source}.cpp")

target_include_directories("${prefix}_${source}" PRIVATE
${PROJECT_SOURCE_DIR}/Utilities/include
${PROJECT_SOURCE_DIR}/External/stb)
Expand Down
27 changes: 17 additions & 10 deletions Code_Exercises/Exercise_01_Compiling_with_SYCL/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,21 @@ Depending on the SYCL implementation used, the steps to verify your environment

#### When using AdaptiveCpp

With AdaptiveCpp, you can skip this step. If you suspect later that your environment might not be set up correctly, you can set the environment variable `ADAPTIVECPP_DEBUG_LEVEL=3` and execute your program. hipSYCL will then print (among many other things) all devices that it can find, for example:
```sh
[AdaptiveCpp Info] Discovered devices from backend 'OpenMP':
[AdaptiveCpp Info] device 0:
[AdaptiveCpp Info] vendor: the AdaptiveCpp project
[AdaptiveCpp Info] name: AdaptiveCpp OpenMP host device
With AdaptiveCpp, you can skip this step. If you suspect later that your environment might not be set up correctly, you can run `acpp-info -l` in the `bin` directory of your AdaptiveCpp installation. It will then print the backends and devices that it sees, for example:
```
$ acpp-info -l
=================Backend information===================
Loaded backend 0: OpenCL
Found device: Intel(R) UHD Graphics 620 [0x5917]
Found device: ComputeAorta x86_64
Found device: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
Loaded backend 1: OpenMP
Found device: hipSYCL OpenMP host device
Loaded backend 2: CUDA
Found device: NVIDIA GeForce MX150
Loaded backend 3: Level Zero
Found device: Intel(R) UHD Graphics 620 [0x5917]
```
*Note: You may not see this output in this exercise because we do not yet actually use any SYCL functionality. Consequently, there is no need for the AdaptiveCpp runtime to launch and print diagnostic information.*

### 3.) Configuring the exercise project

Expand Down Expand Up @@ -86,15 +93,15 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/AdaptiveCpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/AdaptiveCpp -DACPP_TARGETS="<target specification>" ..
make exercise_1
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_01_compiling_with_SYCL
/path/to/AdaptiveCpp/bin/syclcc -o sycl-ex-1 -I../../External/Catch2/single_include --hipsycl-targets="<target specification>" source.cpp
/path/to/AdaptiveCpp/bin/acpp -o sycl-ex-1 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-1
```

Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_02_Hello_World/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_ENABLE_SOLUTIONS=OFF
-DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
-DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_2
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_02_Hello_World
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-2 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-2 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-2
```

Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_03_Scalar_Add/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adapivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adapivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_3
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_03_Scalar_Add
/path/to/AdaptiveCpp/bin/syclcc -o sycl-ex-3 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/AdaptiveCpp/bin/acpp -o sycl-ex-3 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-3
```

Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_04_Handling_Errors/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/AdaptiveCpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/AdaptiveCpp -DACPP_TARGETS="<target specification>" ..
make exercise_4
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_04_Handling_Errors
/path/to/AdaptiveCpp/bin/syclcc -o sycl-ex-4 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/AdaptiveCpp/bin/acpp -o sycl-ex-4 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-4
```

Expand Down
2 changes: 2 additions & 0 deletions Code_Exercises/Exercise_04_Handling_Errors/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>

#include <sycl/sycl.hpp>

TEST_CASE("handling_errors", "handling_errors_source") {

// Task: catch synchronous and asynchronous exceptions
Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_05_Device_Selection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_5
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_05_Device_Selection
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-5 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-5 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-5
```

Expand Down
5 changes: 5 additions & 0 deletions Code_Exercises/Exercise_05_Device_Selection/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,14 @@
*
*/


#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>

#include <sycl/sycl.hpp>

class scalar_add;

TEST_CASE("intel_gpu_device_selector", "device_selectors_solution") {
int a = 18, b = 24, r = 0;

Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_06_Vector_Add/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_6
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_06_Vector_Add
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-6 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-6 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-6
```

Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_07_USM_Selector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_7
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_07_USM_Selector
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-7 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-7 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-7
```

Expand Down
2 changes: 2 additions & 0 deletions Code_Exercises/Exercise_07_USM_Selector/source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>

#include <sycl/sycl.hpp>

TEST_CASE("usm_selector", "usm_selector_source") {

// Task: create a queue to a device which supports USM allocations
Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_08_USM_Vector_Add/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_8
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_08_USM_Vector_Add
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-8 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-8 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-8
```

Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_09_Synchronization/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_9
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_09_Synchronization
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-9 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-9 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-9
```

Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_10_Managing_Dependencies/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ qsub job_submission
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_10
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_10_Managing_Dependencies
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-10 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-10 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-10
```

Expand Down
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_11_In_Order_Queue/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ icpx -fsycl -o sycl-ex-11 -I../External/Catch2/single_include ../Code_Exercises/
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_11
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_11_In_Order_Queue
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-11 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-11 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-11
```
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_12_Temporary_Data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ icpx -fsycl -o sycl-ex-12 -I../External/Catch2/single_include ../Code_Exercises/
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_12
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_12_Temporary_Data
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-12 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-12 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-12
```
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_13_Load_Balancing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ icpx -fsycl -o sycl-ex-13 -I../External/Catch2/single_include ../Code_Exercises/
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_13
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_13_Load_Balancing
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-13 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-13 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-13
```
6 changes: 3 additions & 3 deletions Code_Exercises/Exercise_14_ND_Range_Kernel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@ icpx -fsycl -o sycl-ex-14 -I../External/Catch2/single_include ../Code_Exercises/
For AdaptiveCpp:
```sh
# <target specification> is a list of backends and devices to target, for example
# "omp;hip:gfx900,gfx906" compiles for CPUs with the OpenMP backend and for AMD Vega 10 (gfx900) and Vega 20 (gfx906) GPUs using the HIP backend.
# "omp;generic" compiles for CPUs with the OpenMP backend and GPUs using the generic single-pass compiler.
# The simplest target specification is "omp" which compiles for CPUs using the OpenMP backend.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DADAPTIVECPP_TARGETS="<target specification>" ..
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/adaptivecpp -DACPP_TARGETS="<target specification>" ..
make exercise_14
```
alternatively, without CMake:
```sh
cd Code_Exercises/Exercise_14_ND_Range_Kernel
/path/to/adaptivecpp/bin/syclcc -o sycl-ex-14 -I../../External/Catch2/single_include --adaptivecpp-targets="<target specification>" source.cpp
/path/to/adaptivecpp/bin/acpp -o sycl-ex-14 -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./sycl-ex-14
```
Loading