Created
March 6, 2024 17:52
-
-
Save quantra-go-algo/1afff5354512ba5fd9d0410c2d37dca2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import the corresponding library | |
import cupy as cp | |
# Define matrices using CuPy arrays | |
matrix_a = cp.array([[1, 2], [3, 4]]) | |
matrix_b = cp.array([[5, 6], [7, 8]]) | |
# Perform a matrix multiplication using CuPy | |
result = cp.matmul(matrix_a, matrix_b) | |
print("Result of Matrix Multiplication:") | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment