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

Commit 54771dd

Browse files
authored
[SYCL] Remove usages of program class API (#474)
1 parent 3be0c4d commit 54771dd

37 files changed

+268
-397
lines changed

SYCL/Basic/device_code_dae.cpp

Lines changed: 0 additions & 76 deletions
This file was deleted.

SYCL/Basic/get_backend.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,6 @@ int main() {
4646
return_fail();
4747
}
4848

49-
program prog(c);
50-
if (prog.get_backend() != plt.get_backend()) {
51-
return_fail();
52-
}
53-
5449
default_selector sel;
5550
queue q(c, sel);
5651
if (q.get_backend() != plt.get_backend()) {

SYCL/Basic/handler/handler_set_args.cpp

Lines changed: 0 additions & 233 deletions
This file was deleted.

SYCL/Basic/kernel_info.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ int main() {
2626
queue q;
2727

2828
buffer<int, 1> buf(range<1>(1));
29-
program prg(q.get_context());
30-
31-
prg.build_with_kernel_type<class SingleTask>();
32-
assert(prg.has_kernel<class SingleTask>());
33-
kernel krn = prg.get_kernel<class SingleTask>();
29+
auto KernelID = sycl::get_kernel_id<class SingleTask>();
30+
auto KB =
31+
get_kernel_bundle<bundle_state::executable>(q.get_context(), {KernelID});
32+
kernel krn = KB.get_kernel(KernelID);
3433

3534
q.submit([&](handler &cgh) {
35+
cgh.use_kernel_bundle(KB);
3636
auto acc = buf.get_access<access::mode::read_write>(cgh);
3737
cgh.single_task<class SingleTask>(krn, [=]() { acc[0] = acc[0] + 1; });
3838
});
@@ -43,8 +43,6 @@ int main() {
4343
assert(krnArgCount > 0);
4444
const context krnCtx = krn.get_info<info::kernel::context>();
4545
assert(krnCtx == q.get_context());
46-
const program krnPrg = krn.get_info<info::kernel::program>();
47-
assert(krnPrg == prg);
4846
const cl_uint krnRefCount = krn.get_info<info::kernel::reference_count>();
4947
assert(krnRefCount > 0);
5048
const std::string krnAttr = krn.get_info<info::kernel::attributes>();

SYCL/SpecConstants/1.2.1/composite-in-functor.cpp renamed to SYCL/DeprecatedFeatures/SpecConsts1.2.1/composite-in-functor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// UNSUPPORTED: cuda || hip
22
//
3-
// RUN: %clangxx -fsycl %s -o %t.out
3+
// RUN: %clangxx -fsycl %s -D__SYCL_INTERNAL_API -o %t.out
44
// RUN: %HOST_RUN_PLACEHOLDER %t.out %HOST_CHECK_PLACEHOLDER
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER

SYCL/SpecConstants/1.2.1/composite-type.cpp renamed to SYCL/DeprecatedFeatures/SpecConsts1.2.1/composite-type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// UNSUPPORTED: cuda || hip
22
//
3-
// RUN: %clangxx -fsycl %s -o %t.out
3+
// RUN: %clangxx -fsycl -D__SYCL_INTERNAL_API %s -o %t.out
44
// RUN: %HOST_RUN_PLACEHOLDER %t.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/SpecConstants/1.2.1/multiple-usages-of-composite.cpp renamed to SYCL/DeprecatedFeatures/SpecConsts1.2.1/multiple-usages-of-composite.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// UNSUPPORTED: cuda || hip
22
//
3-
// RUN: %clangxx -fsycl %s -o %t.out -v
3+
// RUN: %clangxx -fsycl -D__SYCL_INTERNAL_API %s -o %t.out -v
44
// RUN: %HOST_RUN_PLACEHOLDER %t.out %HOST_CHECK_PLACEHOLDER
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out %CPU_CHECK_PLACEHOLDER
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out %GPU_CHECK_PLACEHOLDER

SYCL/SpecConstants/1.2.1/spec_const_hw.cpp renamed to SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_hw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// UNSUPPORTED: cuda || hip
22
//
3-
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple -D__SYCL_INTERNAL_API %s -o %t.out
44
// RUN: %HOST_RUN_PLACEHOLDER %t.out
55
// RUN: %CPU_RUN_PLACEHOLDER %t.out
66
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/SpecConstants/1.2.1/spec_const_neg.cpp renamed to SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_neg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl %s -o %t.out
1+
// RUN: %clangxx -fsycl -D__SYCL_INTERNAL_API %s -o %t.out
22
// RUN: %HOST_RUN_PLACEHOLDER %t.out
33
// RUN: %CPU_RUN_PLACEHOLDER %t.out
44
// RUN: %GPU_RUN_PLACEHOLDER %t.out

SYCL/SpecConstants/1.2.1/spec_const_redefine.cpp renamed to SYCL/DeprecatedFeatures/SpecConsts1.2.1/spec_const_redefine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// FIXME Disable fallback assert so that it doesn't interferes with number of
44
// program builds at run-time
5-
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
5+
// RUN: %clangxx -DSYCL_DISABLE_FALLBACK_ASSERT -D__SYCL_INTERNAL_API -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
66
// RUN: %HOST_RUN_PLACEHOLDER %t.out
77
// RUN: env SYCL_PI_TRACE=2 %CPU_RUN_PLACEHOLDER %t.out 2>&1 %CPU_CHECK_PLACEHOLDER
88
// RUN: env SYCL_PI_TRACE=2 %GPU_RUN_PLACEHOLDER %t.out 2>&1 %GPU_CHECK_PLACEHOLDER

0 commit comments

Comments
 (0)