Device selection to build the graph for corresponding devices