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

[SYCL] Specify namespace for online_compiler in SYCL LIT tests #352

Merged
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
17 changes: 11 additions & 6 deletions SYCL/OnlineCompiler/online_compiler_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ int main(int argc, char **argv) {

{ // Compile and run a trivial OpenCL kernel.
std::cout << "Test case1\n";
online_compiler<source_language::opencl_c> Compiler;
sycl::INTEL::online_compiler<sycl::INTEL::source_language::opencl_c>
Compiler;
std::vector<byte> IL;
try {
IL = Compiler.compile(
Expand All @@ -78,7 +79,8 @@ int main(int argc, char **argv) {
{ // Compile and run a trivial OpenCL kernel using online_compiler()
// constructor accepting SYCL device.
std::cout << "Test case2\n";
online_compiler<source_language::opencl_c> Compiler(Device);
sycl::INTEL::online_compiler<sycl::INTEL::source_language::opencl_c>
Compiler(Device);
std::vector<byte> IL;
try {
IL = Compiler.compile(CLSource);
Expand All @@ -97,7 +99,7 @@ int main(int argc, char **argv) {
// PATHs to clangFEWrapper library properly.
{ // Compile a trivial CM kernel.
std::cout << "Test case3\n";
online_compiler<source_language::cm> Compiler;
sycl::INTEL::online_compiler<sycl::INTEL::source_language::cm> Compiler;
try {
std::vector<byte> IL = Compiler.compile(CMSource);

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

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

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

{ // Try compiling CM source with OpenCL compiler.
std::cout << "Test case6\n";
online_compiler<source_language::opencl_c> Compiler;
sycl::INTEL::online_compiler<sycl::INTEL::source_language::opencl_c>
Compiler;
std::vector<byte> IL;
bool TestPassed = false;
try {
Expand Down