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

Commit 0176788

Browse files
authored
[SYCL] Add test for zero size range kernels. (#1363)
1 parent 219b4b4 commit 0176788

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

SYCL/Basic/zero_size_range.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// REQUIRES: cuda || hip
2+
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
3+
// RUN: %GPU_RUN_PLACEHOLDER %t.out
4+
//==--------------- range_zero_size.cpp - SYCL range test ------------------==//
5+
//
6+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
7+
// See https://llvm.org/LICENSE.txt for license information.
8+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
9+
//
10+
//===----------------------------------------------------------------------===//
11+
12+
#include <sycl/sycl.hpp>
13+
using namespace sycl;
14+
15+
int main() {
16+
queue q;
17+
q.submit(
18+
[&](handler &cgh) { cgh.parallel_for(range<1>(0), [=](id<1> i) {}); });
19+
}

0 commit comments

Comments
 (0)