- numpy - paths: - ../../core/gpu_util.py

The Cat Computing Universe: PyLab

from gpu_util import gmm import time import numpy as np k_size = 1000 test_cpu = True print(f"Testing Matrix of size: {k_size}") x = np.random.rand(k_size, k_size) y = np.random.rand(k_size, k_size) if test_cpu: start_time = time.time() z = x @ y end_time = time.time() print(f"The execution time of CPU is: {end_time-start_time}") start_time = time.time() z = gmm(x, y) end_time = time.time() print(f"The execution time of GPU is: {end_time-start_time}")