Skip to content
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

common, xe: sycl: improve logging when OpenCL install is missing #2968

Merged
merged 1 commit into from
Mar 27, 2025
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
1 change: 1 addition & 0 deletions src/common/verbose_msg.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
#define VERBOSE_INCOMPATIBLE_GEMM_FMT "incompatible gemm format"

#define VERBOSE_DEVICE_CTX_MISMATCH "device not found in the given context"
#define VERBOSE_MISSING_OCL_DEVICE "%s OpenCL device not found"
#define VERBOSE_INVALID_PLATFORM "unsupported %s platform (expected %s got %s)"
#define VERBOSE_ENGINE_CREATION_FAIL "failed to create %s engine with index %zu"
#define VERBOSE_KERNEL_CREATION_FAIL "failed to create %s kernel"
Expand Down
12 changes: 10 additions & 2 deletions src/gpu/intel/sycl/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,21 @@ status_t sycl_dev2ocl_dev(cl_device_id *ocl_dev, const ::sycl::device &dev) {
return uuid2ocl_dev_tmp;
}();

if (uuid2ocl_dev.empty()) return status::runtime_error;
if (uuid2ocl_dev.empty()) {
VERROR(common, runtime, VERBOSE_MISSING_OCL_DEVICE,
dev.get_info<::sycl::info::device::name>().c_str());
return status::runtime_error;
}

const xpu::device_uuid_t l0_dev_uuid
= gpu::intel::sycl::get_device_uuid(dev);
auto d = uuid2ocl_dev.get(l0_dev_uuid);

if (!d) return status::runtime_error;
if (!d) {
VERROR(common, runtime, VERBOSE_MISSING_OCL_DEVICE,
dev.get_info<::sycl::info::device::name>().c_str());
return status::runtime_error;
}

*ocl_dev = d;

Expand Down
Loading