Skip to content

Add SYCL support#284

Merged
allnes merged 9 commits intoembedded-dev-research:mainfrom
allnes:an/sycl-integration
May 4, 2026
Merged

Add SYCL support#284
allnes merged 9 commits intoembedded-dev-research:mainfrom
allnes:an/sycl-integration

Conversation

@allnes
Copy link
Copy Markdown
Member

@allnes allnes commented Mar 17, 2026

No description provided.

@allnes allnes requested a review from aobolensk as a code owner March 17, 2026 15:04
@allnes allnes requested a review from AndreySorokin7 March 17, 2026 15:40
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 17, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.13%. Comparing base (60c1097) to head (ee17d26).

Files with missing lines Patch % Lines
include/parallel/backends.hpp 75.00% 0 Missing and 4 partials ⚠️

❗ There is a different number of reports uploaded between BASE (60c1097) and HEAD (ee17d26). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (60c1097) HEAD (ee17d26)
4 2
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #284       +/-   ##
===========================================
- Coverage   84.69%   66.13%   -18.57%     
===========================================
  Files          61       61               
  Lines        3744     4665      +921     
  Branches     2218     2560      +342     
===========================================
- Hits         3171     3085       -86     
- Misses        285      331       +46     
- Partials      288     1249      +961     
Flag Coverage Δ
sycl 61.75% <82.35%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@aobolensk aobolensk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, simplify the scripts. They are overcomplicated for what they are aiming to do

Comment thread .github/workflows/static-analysis.yml Outdated
run: |
clang-tidy app/**/*.cpp src/**/*.cpp -format-style=file -header-filter="($PWD/include/.*|$PWD/src/.*|$PWD/app/.*)" -p build
mapfile -t files < <(find app src -name '*.cpp' ! -path 'app/SYCL/*' | sort)
clang-tidy "${files[@]}" -format-style=file -header-filter="($PWD/include/.*|$PWD/src/.*|$PWD/app/.*)" -p build
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use .clang-tidy file in app/SYCL instead

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this comment was not addressed

Comment thread test/CMakeLists.txt Outdated
Comment on lines +18 to +19
target_compile_definitions(run_test PRIVATE _CRT_SECURE_NO_WARNINGS)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we avoid it?

Comment thread CMakeLists.txt Outdated
Comment on lines +7 to +15
option(ITLABAI_ENABLE_OPENMP "Enable OpenMP parallel support" ON)
option(ITLABAI_ENABLE_OPENCV_APPS "Build OpenCV-dependent apps" ON)
option(ITLABAI_BUILD_TESTS "Build unit tests" ON)
set(ITLABAI_OPENCV_DIR "" CACHE PATH
"Path to a prebuilt OpenCV package directory containing OpenCVConfig.cmake")
set(ITLABAI_TBB_DIR "" CACHE PATH
"Path to a prebuilt oneTBB package root containing lib/cmake/tbb/TBBConfig.cmake")
set(ITLABAI_SYCL_TARGETS "" CACHE STRING
"Optional SYCL targets passed to -fsycl-targets")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also not include this to this PR?

Comment thread .github/workflows/sycl-ci.yml Outdated
env:
INTEL_LLVM_TAG: v6.3.0
OPENCV_TAG: 4.13.0
TBB_TAG: v2022.3.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to reuse our TBB?

Comment thread .github/workflows/sycl-ci.yml Outdated

env:
INTEL_LLVM_TAG: v6.3.0
OPENCV_TAG: 4.13.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same for OpenCV

Comment thread app/SYCL/CMakeLists.txt Outdated
Comment on lines +12 to +20
target_compile_options(SYCL_Example PRIVATE
$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-Wno-unused-parameter>
)
set_property(SOURCE sycl_example.cpp APPEND PROPERTY COMPILE_OPTIONS
$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-Wno-deprecated-declarations>
)
set_property(SOURCE sycl_example.cpp APPEND PROPERTY COMPILE_DEFINITIONS
SYCL_DISABLE_FSYCL_SYCLHPP_WARNING=1
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed. -Wno-error for the app would be even better

Comment thread app/SYCL/CMakeLists.txt Outdated
Comment on lines +22 to +25
$<TARGET_PROPERTY:itlabai_sycl,INTERFACE_COMPILE_OPTIONS>
$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-Wno-unused-parameter>
$<$<AND:$<COMPILE_LANG_AND_ID:CXX,Clang>,$<PLATFORM_ID:Linux>,$<CONFIG:Debug>>:-O2>
$<$<AND:$<COMPILE_LANG_AND_ID:CXX,Clang>,$<PLATFORM_ID:Linux>,$<CONFIG:Debug>>:-g0>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this complication justified?

Comment thread app/SYCL/sycl_example.cpp Outdated
Comment on lines +19 to +23
void rethrow_async_exceptions(sycl::exception_list exceptions) {
for (const std::exception_ptr& exception : exceptions) {
std::rethrow_exception(exception);
}
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just do not pass this param

Comment thread include/perf/benchmarking.hpp Outdated
// returns time in seconds
template <class Function, typename... Args>
double elapsed_time_omp(Function&& func, Args&&... args) {
#if defined(HAS_OPENMP)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove

Comment thread include/parallel/backends.hpp Outdated
Comment on lines +122 to +123
const Options& opt) {
static_cast<void>(opt);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use maybe_unused attribute here

@allnes allnes requested a review from aobolensk March 26, 2026 13:27
Comment thread include/parallel/backends.hpp Outdated
@@ -1,12 +1,14 @@
#pragma once
// clang-format off
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is that for?

Comment thread include/parallel/backends.hpp Outdated
}

#ifdef HAS_OPENMP
#ifdef _OPENMP
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, revert

Comment thread include/parallel/backends.hpp Outdated
namespace parallel {

enum class Backend : std::uint8_t {
enum class Backend : uint8_t {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please revert

Comment thread scripts/ci/common.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove all unnecessary changes (since we don't have checks for all platforms). Ideally, that should be one very simple script with < 100 LoC

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why it was removed?

Comment thread test/single_layer/test_matmullayer.cpp Outdated
@@ -1,4 +1,5 @@
#include <cstdint>
#include <stdint.h>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same and everywhere else. Why?

Comment thread .github/workflows/static-analysis.yml Outdated
- name: Run clang-tidy
run: |
clang-tidy app/**/*.cpp src/**/*.cpp -format-style=file -header-filter="($PWD/include/.*|$PWD/src/.*|$PWD/app/.*)" -p build
python3 - <<'PY'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be no changes. app/SYCL can contain exclusions

Comment thread .github/workflows/static-analysis.yml Outdated
- name: Run clang-tidy
run: |
clang-tidy app/**/*.cpp src/**/*.cpp -format-style=file -header-filter="($PWD/include/.*|$PWD/src/.*|$PWD/app/.*)" -p build
mapfile -t sources < <(find app src -path 'app/SYCL' -prune -o -name '*.cpp' -print)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not addressed

Comment thread app/Graph/build.cpp
concat_connections[layer_name].push_back(base_input_name);
}
}
auto concat_layer = LayerFactory::createConcatLayer(axis, options);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, revert

Comment thread app/Graph/build.hpp
#include "layers/Tensor.hpp"
#include "layers/TransposeLayer.hpp"
#include "layers_oneDNN/BinaryOpLayer.hpp"
#include "layers_oneDNN/ConcatLayer.hpp"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, revert

Comment thread cmake/opencv_config.cmake Outdated
@@ -1,30 +1,216 @@
include(ExternalProject)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes also should've not been popped out

Comment thread include/graph/runtime_options.hpp Outdated
@@ -1,5 +1,5 @@
#pragma once
#include <cstdint>
#include <stdint.h>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still not addressed

@allnes allnes force-pushed the an/sycl-integration branch from 8aae86a to 218b148 Compare April 20, 2026 14:53
@allnes allnes force-pushed the an/sycl-integration branch from dce1126 to 883f1ba Compare May 1, 2026 20:48
@allnes allnes requested a review from aobolensk May 3, 2026 23:22
@allnes
Copy link
Copy Markdown
Member Author

allnes commented May 3, 2026

@aobolensk please review

Copy link
Copy Markdown
Member

@aobolensk aobolensk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@allnes allnes merged commit 2136eb1 into embedded-dev-research:main May 4, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants