def _benchmark_create_tensor(self, value, dtype, device):
    'Benchmark overheads of creating a Tensor object.'
    ctx = context.context()
    handle = ctx._handle
    if (device == GPU):
        ops.EagerTensor(value, context=handle, device=device)

    def func():
        ops.EagerTensor(value, context=handle, device=device, dtype=dtype)
    self._run(func, 30000)
Benchmark overheads of creating a Tensor object.
def _benchmark_create_tensor(self, value, dtype, device):
    
    ctx = context.context()
    handle = ctx._handle
    if (device == GPU):
        ops.EagerTensor(value, context=handle, device=device)

    def func():
        ops.EagerTensor(value, context=handle, device=device, dtype=dtype)
    self._run(func, 30000)