---
title: thunder.core.devices.device_from_string
canonical: >-
  https://lightning.ai/docs/thunder/stable/api-reference/generated/thunder.core.devices.device_from_string
---
# thunder.core.devices.device_from_string {#thunder-core-devices-device-from-string}

### `thunder.core.devices.device_from_string(devicestr)` {#thunder.core.devices.device_from_string}

[\[source\]](https://github.com/Lightning-AI/lightning-thunder/blob/0.2.6/thunder/core/devices.py#L170-L176)

Return type:

[`Device`](/docs/thunder/0.2.6/api-reference/generated/thunder.core.devices.Device.md#thunder.core.devices.Device "thunder.core.devices.Device")

Parameters:

**devicestr** ([_str_](https://docs.python.org/3/builtins/stdtypes.html#str "(in Python v3.15)")) –

---

**Navigation**

- Parent: [Generated](/docs/thunder/0.2.6/api-reference/generated.md)
