-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename oneMKL to oneMath and improve the lesson/exercise (#387)
Change the directory name, file names, and all references to oneMKL to the new name oneMath. Replace the global queue::wait calls with proper synchronisation, which is automatic in case of buffers and explicitly passing sycl::events into APIs with USM.
- Loading branch information
Showing
14 changed files
with
1,982 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#[[ | ||
SYCL Academy (c) | ||
SYCL Academy is licensed under a Creative Commons Attribution-ShareAlike 4.0 | ||
International License. | ||
You should have received a copy of the license along with this work. If not, | ||
see <http://creativecommons.org/licenses/by-sa/4.0/>. | ||
]] | ||
|
||
add_sycl_executable(oneMath_gemm source_onemath_usm_gemm) | ||
add_sycl_executable(oneMath_gemm source_onemath_buffer_gemm) | ||
|
||
target_link_libraries(oneMath_gemm_source_onemath_usm_gemm PUBLIC -lonemath) | ||
target_link_libraries(oneMath_gemm_source_onemath_buffer_gemm PUBLIC -lonemath) | ||
if(SYCL_ACADEMY_ENABLE_SOLUTIONS) | ||
add_sycl_executable(oneMath_gemm solution_onemath_usm_gemm) | ||
add_sycl_executable(oneMath_gemm solution_onemath_buffer_gemm) | ||
|
||
target_link_libraries(oneMath_gemm_solution_onemath_usm_gemm PUBLIC -lonemath) | ||
target_link_libraries(oneMath_gemm_solution_onemath_buffer_gemm PUBLIC -lonemath) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# SYCL Academy | ||
|
||
## Exercise 11: Using the oneMath library for matrix multiplication | ||
--- | ||
|
||
In this exercise you will learn how to use the API of the oneMath library and | ||
perform a matrix multiplication using the GEMM routines. | ||
|
||
The source code provides a template to perform GEMM using oneMath's USM/buffer | ||
API. Please refer to the API here: | ||
https://oneapi-spec.uxlfoundation.org/specifications/oneapi/latest/elements/onemath/source/domains/blas/gemm | ||
|
||
--- | ||
## Exercise `oneMath_usm_gemm/source.cpp` | ||
|
||
The `source_*.cpp` already include all the code to create input matrices and | ||
compute a reference result serially on host. The exercise is to fill in the | ||
sections marked with "TODO" comments to perform GEMM on a device using oneMath. | ||
|
||
## Build and execution hints | ||
|
||
To run the example: ./oneMath_usm_gemm_solution (or) ./oneMath_usm_gemm_source | ||
To verify with CUBLAS debug info, `export CUBLAS_LOGINFO_DB=1` and `export CUBLAS_LOGDEST_DBG=stdout` | ||
|
||
For DevCloud via JupiterLab follow these [instructions](../devcloudJupyter.md). | ||
|
||
For DPC++: [instructions](../dpcpp.md). | ||
|
||
For AdaptiveCpp: [instructions](../adaptivecpp.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.