def _get_device_from_graph_module(graph_module: torch.fx.GraphModule):
    """
    This function gathers the device types from the fx graph nodes.
    """
    _example_value_list = [
        node.meta["example_value"]
        for node in graph_module.graph.nodes
        if "example_value" in node.meta
    ]
    if "xpu" in (
        value.device.type
        for value in _example_value_list
        if isinstance(value, torch.Tensor)
    ):
        return "xpu"
    else:
        return "cpu"

    This function gathers the device types from the fx graph nodes.
    
intel_extension_for_pytorch/_dynamo/__init__.py