Skip to content

Add DAG topological op nodes to C API. #15191

@kevinhartman

Description

@kevinhartman

What should we add?

We need a qk_dag_topological_op_nodes function to enumerate all operation nodes (their indices) in the DAG.

The C API demo code imagines a function like this:

void qk_dag_topological_op_nodes(const QkDag *, uint32_t *order);

which expects the caller to allocate their own buffer for order, using an allocation of size qk_dag_num_instructions. Then, qk_dag_topological_op_nodes would just fill that buffer eagerly, rather than us supplying any sort of iterator.

If we'd rather provide an iterator, we should be consistent between this function and others that enumerate the graph.

Metadata

Metadata

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions