Skip to content

Commit

Permalink
[SYCL] Address unused-private-field error (intel#11872)
Browse files Browse the repository at this point in the history
During post-commit testing, the self build is failing with an
`unused-private-field` error naming the `kernel_bundle_impl.Language`
member as being unused. That member is only used in asserts right now in
the existing code, so I am assuming this is the problem. Here am I
adding an explicit check that should avoid the error.
  • Loading branch information
cperkinsintel authored Nov 15, 2023
1 parent 156b730 commit ff61613
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sycl/source/detail/kernel_bundle_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ class kernel_bundle_impl {
"bundle_state::ext_oneapi_source required");
assert(Language == syclex::source_language::opencl &&
"TODO: add other Languages. Must be OpenCL");
if (Language != syclex::source_language::opencl)
throw sycl::exception(
make_error_code(errc::invalid),
"OpenCL C is the only supported language at this time");

// if successful, the log is empty. if failed, throws an error with the
// compilation log.
Expand Down
4 changes: 4 additions & 0 deletions sycl/test-e2e/KernelCompiler/kernel_compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

// REQUIRES: ocloc

// UNSUPPORTED: (gpu-intel-dg2 && level_zero) || (gpu-intel-pvc && level_zero)
// Seems to be an incompatibility with the KernelCompiler on L0 with DG2 and
// PVC.

// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

Expand Down
4 changes: 4 additions & 0 deletions sycl/test-e2e/KernelCompiler/opencl_capabilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

// REQUIRES: ocloc

// UNSUPPORTED: (gpu-intel-dg2 && level_zero) || (gpu-intel-pvc && level_zero)
// Seems to be an incompatibility with the KernelCompiler on L0 with DG2 and
// PVC.

// RUN: %{build} -o %t.out
// RUN: %{run} %t.out

Expand Down

0 comments on commit ff61613

Please sign in to comment.