Ufo.TaskGraph¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Ufo.TaskGraph(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Main object for organizing filters. The contents of the
Ufo.TaskGraph
structure are private and should only be accessed via the provided API.- classmethod new()¶
- Returns:
A
Ufo.Graph
that can be upcast to aUfo.TaskGraph
.- Return type:
Create a new task graph without any nodes.
- connect_nodes(n1, n2)¶
- Parameters:
n1 (
Ufo.TaskNode
) – A source noden2 (
Ufo.TaskNode
) – A destination node
Connect n1 with n2 using n2's default input port. To specify any other port, use
Ufo.TaskGraph.connect_nodes_full
().
- connect_nodes_full(n1, n2, input)¶
- Parameters:
n1 (
Ufo.TaskNode
) – A source noden2 (
Ufo.TaskNode
) – A destination nodeinput (
int
) – Input port of n2
Connect n1 with n2 using n2's input port.
- expand(resources, n_gpus)¶
- Parameters:
resources (
Ufo.Resources
) – AUfo.Resources
objectsn_gpus (
int
) – Number of GPUs to expand the graph for
- Raises:
Expands self in a way that most of the resources in self can be occupied. In the simple pipeline case, the longest possible GPU paths are duplicated as much as there are GPUs in arch_graph.
- fuse()¶
Fuses task nodes to increase data locality.
Note: This is not implemented and a no-op right now.
- get_json_data()¶
- Raises:
- Returns:
A JSON string describing self
- Return type:
Serialize self to a JSON string.
- get_partition(index, total)¶
- Parameters:
Get the partition structure of self.
- is_alright()¶
- Raises:
- Returns:
- Return type:
Check if nodes int the task graph are properly connected.
- map(gpu_nodes)¶
- Parameters:
gpu_nodes ([
Ufo.GpuNode
]) – List ofUfo.GpuNode
objects
Map task nodes of self to the list of gpu_nodes.
- read_from_data(manager, json)¶
- Parameters:
manager (
Ufo.PluginManager
) – AUfo.PluginManager
used to load the filters
- Raises:
Read a JSON configuration file to fill the structure of self.
- read_from_file(manager, filename)¶
- Parameters:
manager (
Ufo.PluginManager
) – AUfo.PluginManager
used to load the filtersfilename (
str
) – Path and filename to the JSON file
- Raises:
Read a JSON configuration file to fill the structure of self.