Skip to content

Commit fe074ef

Browse files
committed
[SYCL] Specify namespace for online_compiler in SYCL LIT tests (intel#352)
This patch fixes failure in intel/llvm:#4014 caused by existance of the online_compiler class in deprecated sycl::INTEL namespace and in modern one sycl::ext::intel
1 parent b60c90f commit fe074ef

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

SYCL/OnlineCompiler/online_compiler_common.hpp

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ int main(int argc, char **argv) {
5656

5757
{ // Compile and run a trivial OpenCL kernel.
5858
std::cout << "Test case1\n";
59-
online_compiler<source_language::opencl_c> Compiler;
59+
sycl::INTEL::online_compiler<sycl::INTEL::source_language::opencl_c>
60+
Compiler;
6061
std::vector<byte> IL;
6162
try {
6263
IL = Compiler.compile(
@@ -78,7 +79,8 @@ int main(int argc, char **argv) {
7879
{ // Compile and run a trivial OpenCL kernel using online_compiler()
7980
// constructor accepting SYCL device.
8081
std::cout << "Test case2\n";
81-
online_compiler<source_language::opencl_c> Compiler(Device);
82+
sycl::INTEL::online_compiler<sycl::INTEL::source_language::opencl_c>
83+
Compiler(Device);
8284
std::vector<byte> IL;
8385
try {
8486
IL = Compiler.compile(CLSource);
@@ -97,7 +99,7 @@ int main(int argc, char **argv) {
9799
// PATHs to clangFEWrapper library properly.
98100
{ // Compile a trivial CM kernel.
99101
std::cout << "Test case3\n";
100-
online_compiler<source_language::cm> Compiler;
102+
sycl::INTEL::online_compiler<sycl::INTEL::source_language::cm> Compiler;
101103
try {
102104
std::vector<byte> IL = Compiler.compile(CMSource);
103105

@@ -111,7 +113,8 @@ int main(int argc, char **argv) {
111113

112114
{ // Compile a source with syntax errors.
113115
std::cout << "Test case4\n";
114-
online_compiler<source_language::opencl_c> Compiler;
116+
sycl::INTEL::online_compiler<sycl::INTEL::source_language::opencl_c>
117+
Compiler;
115118
std::vector<byte> IL;
116119
bool TestPassed = false;
117120
try {
@@ -130,7 +133,8 @@ int main(int argc, char **argv) {
130133

131134
{ // Compile a good CL source using unrecognized compilation options.
132135
std::cout << "Test case5\n";
133-
online_compiler<source_language::opencl_c> Compiler;
136+
sycl::INTEL::online_compiler<sycl::INTEL::source_language::opencl_c>
137+
Compiler;
134138
std::vector<byte> IL;
135139
bool TestPassed = false;
136140
try {
@@ -152,7 +156,8 @@ int main(int argc, char **argv) {
152156

153157
{ // Try compiling CM source with OpenCL compiler.
154158
std::cout << "Test case6\n";
155-
online_compiler<source_language::opencl_c> Compiler;
159+
sycl::INTEL::online_compiler<sycl::INTEL::source_language::opencl_c>
160+
Compiler;
156161
std::vector<byte> IL;
157162
bool TestPassed = false;
158163
try {

0 commit comments

Comments
 (0)