multiply example

YC Tao

YC Tao

Shanghai, Shanghai

0 0
  • 0 Collaborators

It demonstrates how to perform matrix multiplication on large matrices and optimize the operation using Intel OneAPI. ...learn more

Project status: Concept

Artificial Intelligence

Intel Technologies
oneAPI

Code Samples [1]

Overview / Usage

This code performs the following tasks:

  1. Matrix Creation: It generates two 1024x1024 random matrices, A and B, using NumPy with values of type float32.
  2. Matrix Multiplication: It multiplies these two matrices using oneapi.matmul, which leverages Intel's OneAPI for optimized matrix multiplication.
  3. Timing: It measures the time taken to perform the matrix multiplication by recording the start and end times.
  4. Result Display: It prints the first 5 elements of the resulting matrix C and the time taken for the operation.

Essentially, it demonstrates how to perform matrix multiplication on large matrices and optimize the operation using Intel OneAPI.

Repository

https://github.com/tao011110/OneAPI/blob/master/mul.py

Comments (0)