Skip to content

[SYCL][ESIMD] Fix spelling of attribute to mark ESIMD register binding. #2107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sycl/include/CL/sycl/intel/esimd/esimd_enum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ using uint = unsigned int;
// class.
#define ESIMD_PRIVATE __attribute__((opencl_private))
// Bind a ESIMD global variable to a specific register.
#define ESIMD_REGISTER(n) __attribute__((register(n)))
#define ESIMD_REGISTER(n) __attribute__((register_num(n)))
#else
// TODO ESIMD define what this means on Windows host
#define ESIMD_NODEBUG
Expand Down
13 changes: 13 additions & 0 deletions sycl/test/basic_tests/esimd/global_var.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// RUN: %clangxx -fsycl -fsycl-explicit-simd -fsycl-device-only -fsyntax-only -Xclang -verify %s
// expected-no-diagnostics

#include <CL/sycl/intel/esimd.hpp>

// This test checks that DPC++ compiler in ESIMD mode understands
// the ESIMD_PRIVATE and ESIMD_REGISTER macros
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, this test makes sense in the SYCL dir, it basically checks frontend.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test includes esimd.hpp, so it can't reside in the FE


ESIMD_PRIVATE ESIMD_REGISTER(17) int vc;

SYCL_EXTERNAL void init_vc(int x) {
vc = x;
}