Skip to content

Commit 466293b

Browse files
committed
Applied review comment
1 parent 0019597 commit 466293b

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

dpnp/backend/extensions/blas/gemm.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -323,20 +323,17 @@ std::tuple<sycl::event, sycl::event, bool>
323323
return std::make_tuple(args_ev, gemm_ev, is_row_major);
324324
}
325325

326-
bool _is_lnl_bm_architecture(sycl::device &dev)
326+
bool _is_lnl_bm_architecture(const sycl::device &dev)
327327
{
328328
#if !defined(USE_ONEMKL_CUBLAS)
329-
if (dev.ext_oneapi_architecture_is(
330-
sycl::ext::oneapi::experimental::architecture::
331-
intel_gpu_lnl_m)) /* Lunar Lake */
332-
{
333-
return true;
334-
}
335-
else if (dev.ext_oneapi_architecture_is(
336-
sycl::ext::oneapi::experimental::architecture::
337-
intel_gpu_bmg_g21)) /* Battlemage G21 */
338-
{
329+
namespace syclex = sycl::ext::oneapi::experimental;
330+
const auto arch = dev.get_info<syclex::info::device::architecture>();
331+
switch (arch) {
332+
case syclex::architecture::intel_gpu_lnl_m: /* Lunar Lake */
333+
case syclex::architecture::intel_gpu_bmg_g21: /* Battlemage G21 */
339334
return true;
335+
default:
336+
return false;
340337
}
341338
#endif // !defined(USE_ONEMKL_CUBLAS)
342339
return false;

dpnp/backend/extensions/blas/gemm.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ extern std::tuple<sycl::event, sycl::event, bool>
3939
const dpctl::tensor::usm_ndarray &resultC,
4040
const std::vector<sycl::event> &depends);
4141

42-
extern bool _is_lnl_bm_architecture(sycl::device &dev);
42+
extern bool _is_lnl_bm_architecture(const sycl::device &dev);
4343

4444
extern std::tuple<sycl::event, sycl::event, bool>
4545
gemm_batch(sycl::queue &exec_q,

0 commit comments

Comments
 (0)