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

[SYCL] Add test for library loading PI traces #887

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 16 additions & 0 deletions SYCL/Basic/library_loading.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// REQUIRES: linux
// UNSUPPORTED: cuda || hip
// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -o %t.out
// RUN: env SYCL_PI_TRACE=-1 %t.out 2>&1 | FileCheck %s
#include <CL/sycl.hpp>

using namespace cl::sycl;

int main() {
// CHECK: SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_opencl.so
// CHECK: SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_level_zero.so
Comment on lines +10 to +11
Copy link

@vladimirlaz vladimirlaz Mar 3, 2022

Choose a reason for hiding this comment

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

Suggested change
// CHECK: SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_opencl.so
// CHECK: SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_level_zero.so

Copy link
Author

Choose a reason for hiding this comment

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

Got it. Moved this test to check-sycl. See PR intel/llvm#5628

// CHECK: SYCL_PI_TRACE[-1]: dlopen(libpi_cuda.so) failed with <libpi_cuda.so: cannot open shared object file: No such file or directory>
// CHECK: SYCL_PI_TRACE[-1]: dlopen(libpi_hip.so) failed with <libpi_hip.so: cannot open shared object file: No such file or directory>
queue q;
q.submit([&](handler &cgh) {});
}