Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 4aee113

Browse files
authored
[SYCL] Added test for deprecated features (#435)
The test is created for the check that ABI of deprecated API is not broken after this API was removed. Removed API was wrapped in __SYCL_INTERNAL_API macro. Also this test checks that removed API is working with this macro. Signed-off-by: mdimakov <[email protected]>
1 parent ff71a20 commit 4aee113

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,6 @@ SYCL/Basic/stream @againull
7474

7575
#BFloat16 conversion
7676
SYCL/BFloat16 @AlexeySotkin @MrSidims
77+
78+
# Deprecated features
79+
SYCL/DeprecatedFeatures @intel/llvm-reviewers-runtime
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// RUN: %clangxx -D__SYCL_INTERNAL_API -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
2+
// RUN: %CPU_RUN_PLACEHOLDER %t.out
3+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
4+
// RUN: %HOST_RUN_PLACEHOLDER %t.out
5+
// RUN: %ACC_RUN_PLACEHOLDER %t.out
6+
7+
//==------------- deprecated.cpp - SYCL 2020 deprecation test --------------==//
8+
//
9+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
10+
// See https://llvm.org/LICENSE.txt for license information.
11+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
12+
//
13+
//===----------------------------------------------------------------------===//
14+
15+
#include <CL/sycl.hpp>
16+
17+
using namespace cl::sycl;
18+
19+
int main() {
20+
device Device{default_selector()};
21+
platform Platform{default_selector()};
22+
23+
bool b = Device.has_extension("cl_intel_subgroups");
24+
b = Platform.has_extension("some_extension");
25+
26+
return 0;
27+
}

0 commit comments

Comments
 (0)