Skip to content

Commit 1c6ff22

Browse files
committed
Merge branch 'sycl' into win-e2esplit
2 parents a9cf853 + 92dba4a commit 1c6ff22

File tree

18 files changed

+93
-38
lines changed

18 files changed

+93
-38
lines changed

.github/workflows/sycl-windows-run-tests.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,22 @@ jobs:
177177

178178
- name: Run End-to-End tests
179179
if: inputs.tests_selector == 'e2e'
180-
shell: bash
180+
shell: bash {0}
181181
run: |
182182
# Run E2E tests.
183183
if [[ ${{inputs.compiler}} == 'icx' ]]; then
184184
export LIT_FILTER_OUT="compile_on_win_with_mdd"
185185
fi
186186
export LIT_OPTS="-v --no-progress-bar --show-unsupported --show-pass --show-xfail --max-time 3600 --time-tests --param test-mode=${{ inputs.e2e_testing_mode }} ${{ inputs.extra_lit_opts }}"
187-
cmake --build build-e2e --target check-sycl-e2e
187+
cmake --build build-e2e --target check-sycl-e2e > e2e.log 2>&1
188+
189+
exit_code=$?
190+
cat e2e.log
191+
if [ $exit_code -ne 0 ]; then
192+
# This is duplicated between lin/win, updates must change both.
193+
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Timed Out Tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
194+
fi
195+
exit $exit_code
188196
189197
# Github CI doesn't support containers on Windows, so we cannot guarantee
190198
# that paths are the same between building and running systems. To avoid

devops/actions/run-tests/cts/action.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ runs:
6767
# SYCL_CTS_EXCLUDE_TEST_CATEGORIES - Optional file specifying a list
6868
# of test categories to be excluded from the build.
6969
echo "::group::Excluded test categories"
70-
cat $cts_exclude_filter
70+
[ -f "$cts_exclude_filter" ] && cat "$cts_exclude_filter"
7171
echo "::endgroup::"
7272
fi
7373
@@ -134,11 +134,13 @@ runs:
134134
cts_exclude_filter=$PWD/sycl/cts_exclude_filter/L0_GPU
135135
fi
136136
137-
while IFS= read -r line; do
138-
if [[ $line != \#* ]]; then
139-
rm "./build-cts/bin/test_$line"
140-
fi
141-
done < "$cts_exclude_filter"
137+
if [ -f "$cts_exclude_filter" ]; then
138+
while IFS= read -r line; do
139+
if [[ $line != \#* ]]; then
140+
rm "./build-cts/bin/test_$line"
141+
fi
142+
done < "$cts_exclude_filter"
143+
fi
142144
143145
- name: Run SYCL CTS tests
144146
# Proceed with execution even if the previous two steps did not succeed.

devops/actions/run-tests/e2e/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ runs:
6565
exit_code=$?
6666
cat e2e.log
6767
if [ $exit_code -ne 0 ]; then
68+
# This is duplicated between lin/win, updates must change both.
6869
awk '/^Failed Tests|Unexpectedly Passed Tests|Unresolved tests|Timed Out Tests|Testing Time/{flag=1}/FAILED: CMakeFiles/{flag=0}flag' e2e.log >> $GITHUB_STEP_SUMMARY
6970
fi
7071
exit $exit_code

devops/actions/run-tests/windows/cts/action.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ runs:
6767
# SYCL_CTS_EXCLUDE_TEST_CATEGORIES - Optional file specifying a list
6868
# of test categories to be excluded from the build.
6969
echo "::group::Excluded test categories"
70-
cat $cts_exclude_filter
70+
[ -f "$cts_exclude_filter" ] && cat "$cts_exclude_filter"
7171
echo "::endgroup::"
7272
fi
7373
@@ -136,11 +136,13 @@ runs:
136136
cts_exclude_filter=$PWD/sycl/cts_exclude_filter/L0_GPU
137137
fi
138138
139-
while IFS= read -r line; do
140-
if [[ $line != \#* ]]; then
141-
rm "./build-cts/bin/test_$line"
142-
fi
143-
done < "$cts_exclude_filter"
139+
if [ -f "$cts_exclude_filter" ]; then
140+
while IFS= read -r line; do
141+
if [[ $line != \#* ]]; then
142+
rm "./build-cts/bin/test_$line"
143+
fi
144+
done < "$cts_exclude_filter"
145+
fi
144146
145147
- name: Run SYCL CTS tests
146148
# Proceed with execution even if the previous two steps did not succeed.

llvm/cmake/modules/AddSecurityFlags.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ macro(add_link_option_ext flag name)
3131
endif()
3232
endmacro()
3333

34-
function(append_common_extra_security_flags)
34+
macro(append_common_extra_security_flags)
3535
if( LLVM_ON_UNIX )
3636
# Fortify Source (strongly recommended):
3737
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
@@ -70,7 +70,7 @@ function(append_common_extra_security_flags)
7070
CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS
7171
CMAKE_SHARED_LINKER_FLAGS)
7272
endif()
73-
endfunction()
73+
endmacro()
7474

7575
if ( EXTRA_SECURITY_FLAGS )
7676
if (EXTRA_SECURITY_FLAGS STREQUAL "none")

sycl/include/sycl/detail/os_util.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,13 @@ fn *dynLookupFunction(const char *WinName, const char *LinName,
120120
const char *FunName) {
121121
return reinterpret_cast<fn *>(dynLookup(WinName, LinName, FunName));
122122
}
123+
// On Linux, the name of OpenCL that was used to link against may be either
124+
// `OpenCL.so`, `OpenCL.so.1` or possibly anything else.
125+
// `libur_adapter_opencl.so` is a more stable name, since it is hardcoded into
126+
// the loader.
123127
#define __SYCL_OCL_CALL(FN, ...) \
124128
(sycl::_V1::detail::dynLookupFunction<decltype(FN)>( \
125-
"OpenCL", "libOpenCL.so", #FN)(__VA_ARGS__))
129+
"OpenCL", "libur_adapter_opencl.so", #FN)(__VA_ARGS__))
126130

127131
} // namespace detail
128132
} // namespace _V1

sycl/include/sycl/ext/oneapi/experimental/graph.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -549,15 +549,16 @@ class dynamic_work_group_memory_base
549549
{
550550
public:
551551
dynamic_work_group_memory_base() = default;
552-
dynamic_work_group_memory_base(
553-
[[maybe_unused]] experimental::command_graph<graph_state::modifiable>
554-
Graph,
555-
[[maybe_unused]] size_t Size)
556552
#ifndef __SYCL_DEVICE_ONLY__
557-
: dynamic_parameter_base(Graph), BufferSize(Size)
553+
dynamic_work_group_memory_base(
554+
experimental::command_graph<graph_state::modifiable> Graph, size_t Size)
555+
: dynamic_parameter_base(Graph), BufferSize(Size) {}
556+
#else
557+
dynamic_work_group_memory_base(
558+
experimental::command_graph<graph_state::modifiable> /*Graph*/,
559+
size_t Size)
560+
: BufferSize(Size) {}
558561
#endif
559-
{
560-
}
561562

562563
private:
563564
#ifdef __SYCL_DEVICE_ONLY__

sycl/include/sycl/handler.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ class HandlerAccess;
213213
class HostTask;
214214

215215
using EventImplPtr = std::shared_ptr<event_impl>;
216+
using DeviceImplPtr = std::shared_ptr<device_impl>;
216217

217218
template <typename RetType, typename Func, typename Arg>
218219
static Arg member_ptr_helper(RetType (Func::*)(Arg) const);
@@ -249,6 +250,7 @@ template <typename Type> struct get_kernel_wrapper_name_t {
249250
};
250251

251252
__SYCL_EXPORT device getDeviceFromHandler(handler &);
253+
const DeviceImplPtr &getDeviceImplFromHandler(handler &);
252254

253255
// Checks if a device_global has any registered kernel usage.
254256
__SYCL_EXPORT bool isDeviceGlobalUsedInKernel(const void *DeviceGlobalPtr);
@@ -3481,6 +3483,8 @@ class __SYCL_EXPORT handler {
34813483
typename PropertyListT>
34823484
friend class accessor;
34833485
friend device detail::getDeviceFromHandler(handler &);
3486+
friend const detail::DeviceImplPtr &
3487+
detail::getDeviceImplFromHandler(handler &);
34843488

34853489
template <typename DataT, int Dimensions, access::mode AccessMode,
34863490
access::target AccessTarget, access::placeholder IsPlaceholder>

sycl/source/detail/cg.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ class CGAsyncAlloc : public CG {
686686
ur_event_handle_t event, CG::StorageInitHelper CGData,
687687
detail::code_location loc = {})
688688
: CG(CGType::AsyncAlloc, std::move(CGData), std::move(loc)), MSize(size),
689-
MMemPool(MemPool), MEvent(event) {}
689+
MMemPool(std::move(MemPool)), MEvent(event) {}
690690

691691
std::shared_ptr<ext::oneapi::experimental::detail::memory_pool_impl>
692692
getMemPool() const {

sycl/source/detail/context_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ void context_impl::verifyProps(const property_list &Props) const {
567567
std::shared_ptr<sycl::ext::oneapi::experimental::detail::memory_pool_impl>
568568
context_impl::get_default_memory_pool(const context &Context,
569569
const device &Device,
570-
const usm::alloc &Kind) {
570+
[[maybe_unused]] const usm::alloc &Kind) {
571571

572572
assert(Kind == usm::alloc::device);
573573

0 commit comments

Comments
 (0)