multiply example
YC Tao
Shanghai, Shanghai
- 0 Collaborators
It demonstrates how to perform matrix multiplication on large matrices and optimize the operation using Intel OneAPI. ...learn more
Project status: Concept
Intel Technologies
oneAPI
Overview / Usage
This code performs the following tasks:
- Matrix Creation: It generates two 1024x1024 random matrices,
A
andB
, using NumPy with values of typefloat32
. - Matrix Multiplication: It multiplies these two matrices using
oneapi.matmul
, which leverages Intel's OneAPI for optimized matrix multiplication. - Timing: It measures the time taken to perform the matrix multiplication by recording the start and end times.
- 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.