ttnn.from_device

ttnn.from_device = Operation(python_fully_qualified_name='ttnn.from_device', function=<function PyCapsule.from_device>, preprocess_golden_function_inputs=<function default_preprocess_golden_function_inputs>, golden_function=<function _golden_function>, postprocess_golden_function_outputs=<function default_postprocess_golden_function_outputs>, is_cpp_operation=False, is_experimental=False)

Copies the ttnn.Tensor tensor to the host.

:param * tensor: the ttnn.Tensor

Example::
>>> device_id = 0
>>> device = ttnn.open_device(device_id=device_id)
>>> tensor_on_device = ttnn.to_device(ttnn.from_torch(torch.randn((10, 64, 32), dtype=torch.bfloat16)), device)
>>> tensor_on_host = ttnn.from_device(tensor_on_device)
>>> print(tensor_on_host[0,0,:3])
Tensor([ 0.365234, 0.130859, 0.75], dtype=bfloat16 )