This file contains 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
# try running cpu intensive test on two devices | |
import tensorflow as tf | |
import time | |
def matmul_op(): | |
"""Multiply two matrices together""" | |
n = 2000 | |
a = tf.ones((n, n), dtype=tf.float32) |