Skip to content

Commit

Permalink
Align Code Dir names with Lesson dir Names (codeplaysoftware#340)
Browse files Browse the repository at this point in the history
Since we no longer number the chapters, it is a good idea to have the
same names for a Lesson and its corresponding Code Exercise. Otherwise
the user does not know which lesson goes with which exercise.
  • Loading branch information
hdelan authored Apr 2, 2024
1 parent 3d82330 commit 5c16812
Show file tree
Hide file tree
Showing 57 changed files with 100 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_12_temporary_data
add_sycl_executable(Temporary_Data source)
add_sycl_executable(Advanced_Data_Flow source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(Temporary_Data solution)
add_sycl_executable(Advanced_Data_Flow solution)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_09_synchronization
add_sycl_executable(Synchronization source)
add_sycl_executable(Asynchronous_Execution source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(Synchronization solution)
add_sycl_executable(Asynchronous_Execution solution)
endif()
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SYCL Academy

## Exercise 9: Synchronization
## Exercise 9: Asynchronous_Execution
---

In this exercise you will learn how to use different techniques for
Expand Down
File renamed without changes.
File renamed without changes.
22 changes: 11 additions & 11 deletions Code_Exercises/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ endfunction()



add_subdirectory(Compiling_with_SYCL)
add_subdirectory(Hello_World)
add_subdirectory(Scalar_Add)
add_subdirectory(What_is_SYCL)
add_subdirectory(Enqueueing_a_Kernel)
add_subdirectory(Managing_Data)
add_subdirectory(Handling_Errors)
add_subdirectory(Device_Selection)
add_subdirectory(Vector_Add)
add_subdirectory(USM_Selector)
add_subdirectory(USM_Vector_Add)
add_subdirectory(Synchronization)
add_subdirectory(Managing_Dependencies)
add_subdirectory(Device_Discovery)
add_subdirectory(Data_Parallelism)
add_subdirectory(Introduction_to_USM)
add_subdirectory(USM_Data_Parallelism)
add_subdirectory(Asynchronous_Execution)
add_subdirectory(Data_and_Dependencies)
add_subdirectory(In_Order_Queue)
add_subdirectory(Temporary_Data)
add_subdirectory(Load_Balancing)
add_subdirectory(Advanced_Data_Flow)
add_subdirectory(Multiple_Devices)
add_subdirectory(ND_Range_Kernel)
add_subdirectory(Image_Convolution)
add_subdirectory(Coalesced_Global_Memory)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_06_vector_add
add_sycl_executable(Vector_Add source)
add_sycl_executable(Data_Parallelism source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(Vector_Add solution)
add_sycl_executable(Data_Parallelism solution)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_10_managing_dependencies
add_sycl_executable(Managing_Dependencies source)
add_sycl_executable(Data_and_Dependencies source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(Managing_Dependencies solution)
add_sycl_executable(Data_and_Dependencies solution)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_05_device_selection
add_sycl_executable(Device_Selection source)
add_sycl_executable(Device_Discovery source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(Device_Selection solution)
add_sycl_executable(Device_Discovery solution)
endif()
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_02_hello_world
add_sycl_executable(Hello_World source)
add_sycl_executable(Enqueueing_a_Kernel source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(Hello_World solution)
add_sycl_executable(Enqueueing_a_Kernel solution)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_07_usm_selector
add_sycl_executable(USM_Selector source)
add_sycl_executable(Introduction_to_USM source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(USM_Selector solution)
add_sycl_executable(Introduction_to_USM solution)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_03_scalar_add
add_sycl_executable(Scalar_Add source)
add_sycl_executable(Managing_Data source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(Scalar_Add solution)
add_sycl_executable(Managing_Data solution)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_13_load_balancing
add_sycl_executable(Load_Balancing source)
add_sycl_executable(Multiple_Devices source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(Load_Balancing solution)
add_sycl_executable(Multiple_Devices solution)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_08_usm_vector_add
add_sycl_executable(USM_Vector_Add source)
add_sycl_executable(USM_Data_Parallelism source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(USM_Vector_Add solution)
add_sycl_executable(USM_Data_Parallelism solution)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]]

# Exercise exercise_01_compiling_with_sycl
add_sycl_executable(Compiling_with_SYCL source)
add_sycl_executable(What_is_SYCL source)
if(SYCL_ACADEMY_ENABLE_SOLUTIONS)
add_sycl_executable(Compiling_with_SYCL solution)
add_sycl_executable(What_is_SYCL solution)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ Loaded backend 3: Level Zero

If you have not already installed SYCLAcademy, follow this [guide](../../README.md#connecting-to-devcloud-via-ssh) to perform the installation.

Go to the Compiling_with_SYCL directory:
Go to the What_is_SYCL directory:
From the syclacademy directory
```
cd build/Code_Exercises/Compiling_with_SYCL
cd build/Code_Exercises/What_is_SYCL
```
and continue to [4](#4-include-the-sycl-header-file)

Expand Down Expand Up @@ -85,10 +85,10 @@ If you haven't done so already, follow this [guide](../../README.md#building-the

From the syclacademy directory
```
cd build/Code_Exercises/Compiling_with_SYCL
cd build/Code_Exercises/What_is_SYCL
and execute:
* ```make Compiling_with_SYCL_source``` - to build source.cpp
* ```make Compiling_with_SYCL_solution``` - to build the solution provided
* ```make What_is_SYCL_source``` - to build source.cpp
* ```make What_is_SYCL_solution``` - to build the solution provided
* ```make``` - to build both
In Intel DevCloud, to run computational applications, you will submit jobs to a queue for execution on compute nodes,
Expand All @@ -98,7 +98,7 @@ Please refer to the [guide][devcloud-job-submission].
So wrap the binary into a script `job_submission`
```
#!/bin/bash
./Compiling_with_SYCL_source
./What_is_SYCL_source
```
and run:
```sh
Expand All @@ -113,12 +113,12 @@ mkdir build
cd build
cmake .. "-GUnix Makefiles" -DSYCL_ACADEMY_USE_DPCPP=ON
-DSYCL_ACADEMY_ENABLE_SOLUTIONS=OFF -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx
make Compiling_with_SYCL_source
make What_is_SYCL_source
```
Alternatively from a terminal at the command line:
```sh
icpx -fsycl -o Compiling_with_SYCL_source -I../External/Catch2/single_include ../Code_Exercises/Compiling_with_SYCL/source.cpp
./Compiling_with_SYCL_source
icpx -fsycl -o What_is_SYCL_source -I../External/Catch2/single_include ../Code_Exercises/What_is_SYCL/source.cpp
./What_is_SYCL_source
```

For AdaptiveCpp:
Expand All @@ -130,13 +130,13 @@ For AdaptiveCpp:
# Recent, full installations of AdaptiveCpp may not need targets to be provided,
# compiling for "generic" by default.
cmake -DSYCL_ACADEMY_USE_ADAPTIVECPP=ON -DSYCL_ACADEMY_INSTALL_ROOT=/insert/path/to/AdaptiveCpp -DACPP_TARGETS="<target specification>" ..
make Compiling_with_SYCL_source
make What_is_SYCL_source
```
alternatively, without CMake:
```sh
cd Code_Exercises/Compiling_with_SYCL
/path/to/AdaptiveCpp/bin/acpp -o Compiling_with_SYCL_source -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./Compiling_with_SYCL_source
cd Code_Exercises/What_is_SYCL
/path/to/AdaptiveCpp/bin/acpp -o What_is_SYCL_source -I../../External/Catch2/single_include --acpp-targets="<target specification>" source.cpp
./What_is_SYCL_source
```


Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Lesson_Materials/Advanced_Data_Flow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Temporary_Data/source
Code_Exercises/Advanced_Data_Flow/source
</div>
<div class="container" data-markdown>
Write a SYCL application which uses uninitialized `buffer`s and disabling write back.
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/Asynchronous_Execution/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Exercise_9_Synchronization/source
Code_Exercises/Asynchronous_Execution/source
</div>
<div class="container" data-markdown>
Try out the different methods of synchronizing with a kernel function and the resulting data from the computation.
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/Data_Parallelism/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Vector_Add/source.cpp
Code_Exercises/Data_Parallelism/source.cpp
</div>
<div class="container" data-markdown>
Implement a SYCL application that adds two arrays of
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/Data_and_Dependencies/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Managing_Dependencies/source
Code_Exercises/Data_and_Dependencies/source
</div>
<div class="container" data-markdown>
![SYCL](../common-revealjs/images/diamond_data_flow.png "SYCL")
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/Device_Discovery/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Exercise_5_Device_Selection/source
Code_Exercises/Device_Discovery/source
</div>
<div class="container" data-markdown>
Create your own device selector that chooses the device in your system that you would like to target.
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/Enqueuing_a_Kernel/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Exercise_2_Hello_World/source
Code_Exercises/Enqueueing_a_Kernel/source
</div>
<div class="container" data-markdown>
Implement a SYCL application which enqueues a kernel function to a device and streams "Hello world!" to the console.
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/Introduction_to_USM/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Exercise_7_USM_Selector/source
Code_Exercises/Introduction_to_USM/source
</div>
<div class="container" data-markdown>
Implement a device selector that chooses a device in your system which supports explicit USM and device allocations
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/Managing_Data/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Exercise_3_Scalar_Add/source
Code_Exercises/Managing_Data/source
</div>
<div class="container" data-markdown>
Implement a SYCL application that adds two variables
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/Multiple_Devices/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Load_Balancing/source
Code_Exercises/Multiple_Devices/source
</div>
<div class="container" data-markdown>
Write a SYCL application that splits up a task between
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/Using_USM/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Exercise_8_USM_Vector_Add/source
Code_Exercises/Using_USM/source
</div>
<div class="container" data-markdown>
Implement the vector add from lesson 6 using the USM data management model.
Expand Down
2 changes: 1 addition & 1 deletion Lesson_Materials/What_is_SYCL/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@
#### Exercise
</div>
<div class="container" data-markdown>
Code_Exercises/Exercise_1_Compiling_with_SYCL/source
Code_Exercises/What_is_SYCL/source
</div>
<div class="container" data-markdown>
Configure your environment for using SYCL and compile a source file with the SYCL compiler.
Expand Down
Loading

0 comments on commit 5c16812

Please sign in to comment.