Skip to content

Add an example showing the creation of a toy PyBind11 extension for oneMKL using dpctl #749

Closed
@diptorupd

Description

@diptorupd

oneMKL is an open-source implementation of the oneMKL Data Parallel C++ (DPC++) interface according to the oneMKL specification. The library provides backends for CUDA as well as Intel MKL. In addition, it is possible to dynamically select a backend based on a SYCL queue.

Our example should demonstrate how dpctl's infrastructure can be used to easily create a Python module for oneMKL.

A high-level design can we as follows:

  • Expose the onemkl::gemm routine as matmul.
  • Introduce convenience types mat and vec that are based on dpctl.tensor.usm_ndarray.
  • The function should accept a SyclQueue, mat, and optionally a list of SyclEvent objects and return a SyclEvent object.
  • Demonstrate the usage of SyclTimer to time execution.
  • Demonstrate ways to print a matrix/vector by first copying them into Numpy.ndarray.
  • Demonstrate ways to populate a matrix/vector.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions