Skip to content

Commit 27b5f71

Browse files
authored
[SYCL][ESIMD] Fix spelling of attribute to mark ESIMD register binding. (#2107)
Signed-off-by: Konstantin S Bobrovsky <[email protected]>
1 parent 55eef6c commit 27b5f71

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

sycl/include/CL/sycl/intel/esimd/esimd_enum.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ using uint = unsigned int;
3030
// class.
3131
#define ESIMD_PRIVATE __attribute__((opencl_private))
3232
// Bind a ESIMD global variable to a specific register.
33-
#define ESIMD_REGISTER(n) __attribute__((register(n)))
33+
#define ESIMD_REGISTER(n) __attribute__((register_num(n)))
3434
#else
3535
// TODO ESIMD define what this means on Windows host
3636
#define ESIMD_NODEBUG
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: %clangxx -fsycl -fsycl-explicit-simd -fsycl-device-only -fsyntax-only -Xclang -verify %s
2+
// expected-no-diagnostics
3+
4+
#include <CL/sycl/intel/esimd.hpp>
5+
6+
// This test checks that DPC++ compiler in ESIMD mode understands
7+
// the ESIMD_PRIVATE and ESIMD_REGISTER macros
8+
9+
ESIMD_PRIVATE ESIMD_REGISTER(17) int vc;
10+
11+
SYCL_EXTERNAL void init_vc(int x) {
12+
vc = x;
13+
}

0 commit comments

Comments
 (0)