-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from unisa-hpc/sycl2020
Update SYCL-Bench to SYCL 2020
- Loading branch information
Showing
78 changed files
with
5,170 additions
and
4,163 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# | ||
# Clang-Tidy configuration for SYCL-Bench. | ||
# | ||
# There are three usage scenarios: | ||
# 1. Automatic checks through an IDE (CLion, VsCode, ...) | ||
# 2. Running manually on select files (not recommended) | ||
# `clang-tidy -p path/to/compile_commands.json file1 [file2, ...]` | ||
# Note: A script for running clang-tidy on all Celerity sources is provided in `ci/run-clang-tidy.sh` | ||
# 3. Running on a diff (for CI) | ||
# `git diff -U0 --no-color | clang-tidy-diff.py -p1 -path path/to/compile_commands.json` | ||
# | ||
InheritParentConfig: false | ||
# See https://clang.llvm.org/extra/clang-tidy/checks/list.html for a full list of available checks. | ||
Checks: -*, | ||
readability-*, | ||
-readability-avoid-const-params-in-decls, | ||
-readability-function-cognitive-complexity, | ||
-readability-identifier-length, | ||
-readability-magic-numbers, | ||
-readability-uppercase-literal-suffix, | ||
-readability-convert-member-functions-to-static | ||
-readability-qualified-auto | ||
|
||
# Treat naming violations as errors | ||
WarningsAsErrors: "readability-identifier-naming" | ||
# Use .clang-format configuration for fixes | ||
FormatStyle: file |
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 |
---|---|---|
@@ -1,2 +1,10 @@ | ||
/build* | ||
*.csv | ||
img/ | ||
|
||
# Clangd | ||
.cache/ | ||
.clangd | ||
|
||
# Vscode | ||
.vscode/ |
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,21 @@ | ||
cff-version: 1.2.0 | ||
message: "If you use this software, please cite it as below." | ||
conference-paper: "Proceedings of the 12th International Workshop on OpenCL and SYCL (IWOCL 24)" | ||
authors: | ||
- family-names: "Luigi" | ||
given-names: "Crisci" | ||
- family-names: "Lorenzo" | ||
given-names: "Carpentieri" | ||
- family-names: "Peter" | ||
given-names: "Thoman" | ||
- family-names: "Aksel" | ||
given-names: "Alpay" | ||
- family-names: "Vincent" | ||
given-names: "Heuveline" | ||
- family-names: "Biagio" | ||
given-names: "Cosenza" | ||
title: "SYCL-Bench 2020: Benchmarking SYCL 2020 on AMD, Intel, and NVIDIA GPUs" | ||
version: 2.0.4 | ||
doi: 10.1145/3648115.3648120 | ||
date-released: 2024-04-08 | ||
url: "https://github.com/unisa-hpc/sycl-bench/" |
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
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 @@ | ||
macro(check_feature VAR FILENAME) | ||
if(NOT DEFINED RUN_RES_${VAR}) | ||
try_run(RUN_RES_${VAR} COMPILE_RES_${VAR} ${CMAKE_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/has-features/src/${FILENAME} | ||
CMAKE_FLAGS ${CMAKE_CXX_FLAGS} | ||
COMPILE_OUTPUT_VARIABLE OUTPUT_VAR | ||
RUN_OUTPUT_VARIABLE RUN_VAR | ||
) | ||
endif() | ||
|
||
if (COMPILE_RES_${VAR} AND RUN_RES_${VAR} EQUAL 0) | ||
set(RES ON) | ||
else() | ||
set(RES OFF) | ||
endif() | ||
message(STATUS "${VAR}: ${RES}") | ||
endmacro() | ||
|
||
message(STATUS "Checking for SYCL features....") | ||
check_feature(KERNEL_REDUCTIONS kernel_reduction_dummy.cpp) | ||
check_feature(SPEC_CONSTANTS spec_constants_dummy.cpp) | ||
check_feature(GROUP_ALGORITHMS group_algorithms_dummy.cpp) | ||
check_feature(FP64_SUPPORT fp64_support_dummy.cpp) |
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,15 @@ | ||
#include <sycl/sycl.hpp> | ||
|
||
int main() { | ||
sycl::queue q; | ||
sycl::buffer<double> x(1); | ||
|
||
q.submit([&](sycl::handler& cgh) { | ||
sycl::accessor a(x, cgh, sycl::read_write); | ||
cgh.parallel_for<class dummy>(sycl::range<1>(1), [=](sycl::id<1> idx) { a[idx] = 0; }); | ||
}); | ||
|
||
sycl::host_accessor host{x}; | ||
assert(host[0] == 0); | ||
|
||
} |
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,17 @@ | ||
#include <sycl/sycl.hpp> | ||
#include <iostream> | ||
|
||
|
||
int main() { | ||
sycl::queue q; | ||
int* i = sycl::malloc_shared<int>(1, q); | ||
q.submit([&](sycl::handler& cgh) { | ||
cgh.parallel_for(sycl::nd_range<1>{{1}, {1}}, [=](sycl::nd_item<1> item) { | ||
// call only the group algorithms used in SYCL-Bench | ||
*i = sycl::reduce_over_group(item.get_group(), 1, sycl::plus<int>{}); | ||
}); | ||
}).wait(); | ||
|
||
assert(*i == 1); | ||
sycl::free(i, q); | ||
} |
Oops, something went wrong.