MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / testDevice

Method testDevice

tensorflow/compiler/xla/python/xla_client_test.py:627–632  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

625 np.testing.assert_equal(arg0, arg0_buffer.to_py())
626
627 def testDevice(self):
628 x = np.arange(8)
629 for device in xla_client.get_local_backend().local_devices():
630 buf = xla_client.Buffer.from_pyval(x, device=device)
631 self.assertEqual(buf.device(), device)
632 np.testing.assert_equal(x, buf.to_py())
633
634
635class SingleOpTest(ComputationTest):

Callers

nothing calls this directly

Calls 4

assert_equalMethod · 0.80
local_devicesMethod · 0.45
from_pyvalMethod · 0.45
deviceMethod · 0.45

Tested by

no test coverage detected