Skip to content

Commit c5560ab

Browse files
committed
Revert "Address remaining SYCL review comments"
This reverts commit 221376e.
1 parent 659dfa3 commit c5560ab

21 files changed

Lines changed: 148 additions & 182 deletions

.github/workflows/static-analysis.yml

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,5 @@ jobs:
2727
cmake --build build --parallel
2828
- name: Run clang-tidy
2929
run: |
30-
python3 - <<'PY'
31-
import json
32-
from pathlib import Path
33-
34-
compile_commands = json.loads(Path("build/compile_commands.json").read_text())
35-
sources = sorted(
36-
{
37-
entry["file"]
38-
for entry in compile_commands
39-
if "/app/" in entry["file"] or "/src/" in entry["file"]
40-
}
41-
)
42-
Path("build/clang_tidy_sources.txt").write_text("\n".join(sources) + "\n")
43-
PY
44-
xargs -a build/clang_tidy_sources.txt clang-tidy -format-style=file -header-filter="($PWD/include/.*|$PWD/src/.*|$PWD/app/.*)" -p build
30+
mapfile -t sources < <(find app src -path 'app/SYCL' -prune -o -name '*.cpp' -print)
31+
clang-tidy "${sources[@]}" -format-style=file -header-filter="($PWD/include/.*|$PWD/src/.*|$PWD/app/.*)" -p build

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ find_package(OpenMP REQUIRED COMPONENTS CXX)
4242

4343
if(OpenMP_FOUND)
4444
message(STATUS "OpenMP found - enabling parallel support")
45-
add_definitions(-DHAS_OPENMP)
4645
else()
4746
message(STATUS "OpenMP not found - parallel features disabled")
4847
endif()

include/graph/runtime_options.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include <cstdint>
2+
#include <stdint.h>
33

44
#include "parallel/parallel.hpp"
55

include/layers/ConcatLayer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
2-
#include <cstdint>
2+
#include <stdint.h>
3+
34
#include <numeric>
45
#include <stdexcept>
56
#include <vector>

include/layers/InputLayer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#pragma once
2+
#include <stdint.h>
3+
24
#include <algorithm>
35
#include <cmath>
4-
#include <cstdint>
56

67
#include "layers/Layer.hpp"
78

include/layers/ReduceLayer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
2-
#include <cstdint>
2+
#include <stdint.h>
3+
34
#include <limits>
45
#include <vector>
56

include/layers/Tensor.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22

3-
#include <cstdint>
3+
#include <stdint.h>
4+
45
#include <iostream>
56
#include <stdexcept>
67
#include <type_traits>

include/layers_oneDNN/ReduceLayer.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#pragma once
2-
#include <cstdint>
2+
#include <stdint.h>
3+
34
#include <dnnl.hpp>
45
#include <memory>
56
#include <vector>

include/parallel/backends.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#pragma once
2+
// clang-format off
3+
#include <stdint.h>
24
#include <oneapi/tbb/blocked_range.h>
35
#include <oneapi/tbb/info.h>
46
#include <oneapi/tbb/parallel_for.h>
5-
6-
#include <cstdint>
7+
// clang-format on
78

89
// NOLINTNEXTLINE(misc-header-include-cycle)
910
#include <Kokkos_Core.hpp>
@@ -16,7 +17,7 @@
1617
namespace it_lab_ai {
1718
namespace parallel {
1819

19-
enum class Backend : std::uint8_t {
20+
enum class Backend : uint8_t {
2021
kSeq = 0,
2122
kThreads = 1,
2223
kTbb = 2,
@@ -93,7 +94,7 @@ inline void impl_tbb(std::size_t count,
9394
}, oneapi::tbb::auto_partitioner());
9495
}
9596

96-
#ifdef HAS_OPENMP
97+
#ifdef _OPENMP
9798
inline void impl_omp(std::size_t count,
9899
const std::function<void(std::size_t)>& func,
99100
const Options& opt) {

include/parallel/parallel.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace it_lab_ai {
55
namespace parallel {
66

77
constexpr bool kHasOmp =
8-
#ifdef HAS_OPENMP
8+
#ifdef _OPENMP
99
true;
1010
#else
1111
false;
@@ -16,7 +16,7 @@ inline Backend resolve_default_backend(std::size_t n, const Options& opt) {
1616
return Backend::kSeq;
1717
}
1818

19-
#ifdef HAS_OPENMP
19+
#ifdef _OPENMP
2020
return Backend::kOmp;
2121
#else
2222
return Backend::kTbb;

0 commit comments

Comments
 (0)