Skip to content

Commit

Permalink
sycl: enable l0 to ocl device mapping in hw detect
Browse files Browse the repository at this point in the history
  • Loading branch information
densamoilov committed May 24, 2024
1 parent 1137e04 commit 0fb7e6e
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/sycl/sycl_device_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ namespace impl {
namespace sycl {

status_t sycl_device_info_t::init_arch(engine_t *engine) {
auto &device
= utils::downcast<const sycl_engine_base_t *>(engine)->device();
auto *sycl_engine = utils::downcast<const sycl_engine_base_t *>(engine);
auto &device = sycl_engine->device();

// skip cpu engines
if (!device.is_gpu()) return status::success;
Expand All @@ -56,17 +56,11 @@ status_t sycl_device_info_t::init_arch(engine_t *engine) {
} else if (be == backend_t::level0) {
// TODO: add support for L0 binary ngen check
// XXX: query from ocl_engine for now
gpu::ocl::ocl_engine_factory_t f(engine_kind::gpu);

engine_t *engine;
CHECK(f.engine_create(&engine, 0));

std::unique_ptr<gpu::compute::compute_engine_t, engine_deleter_t>
compute_engine(
utils::downcast<gpu::compute::compute_engine_t *>(
engine));
std::unique_ptr<gpu::ocl::ocl_gpu_engine_t, engine_deleter_t>
ocl_engine;
CHECK(impl::sycl::create_ocl_engine(&ocl_engine, sycl_engine));

auto *dev_info = compute_engine->device_info();
auto *dev_info = ocl_engine->device_info();
gpu_arch_ = dev_info->gpu_arch();
stepping_id_ = dev_info->stepping_id();
mayiuse_systolic_ = dev_info->mayiuse_systolic();
Expand Down

0 comments on commit 0fb7e6e

Please sign in to comment.