Skip to content

Commit 51f7617

Browse files
author
Erich Keane
committed
Add comments to each test
1 parent ebd9087 commit 51f7617

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

clang/test/CodeGenSYCL/sub-group-size.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsycl-default-sub-group-size=primary -sycl-std=2020 -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=PRIM_DEF,ALL
33
// RUN: %clang_cc1 -fsycl-is-device -internal-isystem %S/Inputs -fsycl-default-sub-group-size=10 -sycl-std=2020 -triple spir64-unknown-unknown-sycldevice -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=TEN_DEF,ALL
44

5+
// Ensure that both forms of the new sub_group_size properly emit their metadata
6+
// on sycl-kernel and sycl-external functions.
7+
58
#include "Inputs/sycl.hpp"
69
using namespace cl::sycl;
710

clang/test/Driver/sycl-sub-group-size.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
// Ensure that by default the -fsycl-default-sub-group-size doesn't get passed
2+
// to the cc1 invocation.
13
// RUN: %clang -### -fsycl %s 2>&1 | FileCheck %s -check-prefix=CHECK-DEFAULT
24
// CHECK-DEFAULT-NOT: "fsycl-default-sub-group-size"
35

6+
// The next two tests make sure that the -fsycl-default-sub-group-size command
7+
// line arguments get properly passed unaltered to the cc1 invocation.
48
// RUN: %clang -### -fsycl -fsycl-default-sub-group-size=primary %s 2>&1 | FileCheck %s -check-prefix=PRIM
59
// PRIM: "-fsycl-default-sub-group-size" "primary"
610

clang/test/SemaSYCL/sub-group-size.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
// RUN: %clang_cc1 -internal-isystem %S/Inputs -fsycl-is-device -fsycl-default-sub-group-size=primary -sycl-std=2020 -internal-isystem %S/Inputs -fsyntax-only -verify=expected,integer %s
33
// RUN: %clang_cc1 -internal-isystem %S/Inputs -fsycl-is-device -fsycl-default-sub-group-size=10 -sycl-std=2020 -internal-isystem %S/Inputs -fsyntax-only -verify=expected,primary %s
44

5+
// Validate the semantic analysis checks for the interaction betwen the
6+
// named_sub_group_size and sub_group_size attributes. These are not able to be
7+
// combined, and require that they only be applied to non-sycl-kernel/
8+
// non-sycl-device functions if they match the kernel they are being called
9+
// from.
10+
511
#include "Inputs/sycl.hpp"
612

713
// expected-error@+2 {{'named_sub_group_size' and 'sub_group_size' attributes are not compatible}}

0 commit comments

Comments
 (0)