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

Method testNumpyForceCPU

tensorflow/python/eager/core_test.py:583–586  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

581
582 @test_util.run_gpu_only
583 def testNumpyForceCPU(self):
584 cpu = constant_op.constant([[1., 2.], [3., 4.]])
585 c2g = cpu.gpu()
586 self.assertAllEqual(c2g, cpu.numpy())
587
588 def testCopyFromCPUToCPU(self):
589 ta = constant_op.constant([[1, 2], [3, 4]])

Callers

nothing calls this directly

Calls 4

constantMethod · 0.45
gpuMethod · 0.45
assertAllEqualMethod · 0.45
numpyMethod · 0.45

Tested by

no test coverage detected