Python gaps#
PLAN Section 5.4, rule 8: every stable C++ symbol has a Python counterpart, or it is listed here.
The Python API is described in ADR 0011: The Python package (nanobind bindings and the typed layer) (ADR 0011). This page lists what
the Python package does not bind, and why; each entry names the release that closes it, or
“by design”. The hypergraph rows (0.3, M8b), those of triad_count (0.3, M9b), those of
label_propagation (0.4, M10b) and those of hyper_sssp (0.4, M11b) are in their own tables
below.
C++ symbols without a Python counterpart#
C++ |
Python in 0.1 |
Why, and when |
|---|---|---|
|
none |
custom allocators from Python need a callback design (RMM-style); after 0.2.0 (not in 0.2.0) |
|
NumPy / |
owning device buffers matter with the CUDA plugins; after 0.2.0 (0.2.0 has device result arrays, ADR 0031) |
|
|
by design: arrays are NumPy / DLPack objects |
|
an integer handle, a CuPy / PyTorch stream, |
by design |
|
|
a sink calling Python from native threads needs care; the level covers users; after 0.2.0 (not in 0.2.0) |
|
none (reading: |
recording is for algorithm authors, who write C++ |
|
|
a zero-copy view of a graph that the next batch may reallocate needs the Array staleness rule for graphs; after 0.2.0 (not in 0.2.0) |
|
|
by design |
|
|
by design |
|
|
by design (a Python loop over single edges would be slow) |
|
|
by design (one call for any list) |
|
|
by design |
|
|
by design |
|
enumerations are strings in Python |
by design |
|
|
by design |
|
|
after 0.2.0 (not in 0.2.0) |
|
|
by design: teaching algorithms (ADR 0033) |
|
none |
by design: C++ and nvcc only. An Op is compiled into the engine’s kernels, so it cannot come from Python; the experimental tier is not bound (ADR 0058). The four built-in Ops are |
PLAN 5.4 features that are not in the 0.1 Python package#
Feature |
State |
When |
|---|---|---|
CUDA: |
done in 0.2 (M6a; ADR 0030, 0031): |
– |
|
inputs of another dtype or layout are converted with one copy; inputs in CUDA device memory are copied to the host once (graphs and batches are built from host arrays), and that copy is not yet subject to |
0.3 (with device-resident batches) |
Inputs that only have |
inputs in device memory are read through DLPack (CuPy, PyTorch, JAX); |
0.3 |
|
|
after 0.2.0 (not in 0.2.0) |
|
done in 0.3 (M8b): |
– |
|
done in 0.4 (M10b; ADR 0108): |
– |
|
done in 0.3 (M9b; ADR 0059): |
– |
|
done in 0.3 (M8b): |
– |
Hypergraph symbols without a Python counterpart (0.3, M8b)#
Every stable C++ symbol of <dyng/hypergraph/*.hpp> (frozen at M8b, ADR 0047) and the tracked
hypergraph parts of io, generators and testing has a counterpart in dyng.Hypergraph,
dyng.HyperedgeBatch, dyng.HypergraphProperties, dyng.CapacityPolicy,
dyng.HyperApplySummary, dyng.StorageStats, dyng.io, dyng.generators and dyng.testing,
except:
C++ |
Python in 0.3 |
Why, and when |
|---|---|---|
|
|
a view is invalidated by the next |
|
none |
always empty, under |
|
|
by design |
|
|
by design (as |
|
|
by design |
|
int32 vertex ids only; int64 member arrays raise |
the library instantiates (int32, unweighted) and (int32, int32) only (PLAN 4.4.3) |
|
|
Python batches are host objects ( |
|
|
a streaming writer from Python is not needed by the parity or benchmark tools; after 0.3 if asked |
|
|
by design |
|
|
by design: the rows of a Python hypergraph come from the hypergraph |
|
keywords of |
by design |
|
none |
a model of the store’s trees for the store’s own tests (C++ contributors who change the store); not a user-facing oracle; by design |
|
enumerations are strings in Python |
by design |
triad_count symbols without a Python counterpart (0.3, M9b)#
<dyng/triad_count.hpp> is dyng.triad_count (ADR 0059): Pattern (the enumeration, also its
names as strings), MAX_BINS, Options (kind, cuda_engine), Stats, Result, compute(),
update(); dyng.update() over hypergraphs; dyng.io.TriadBins, write_triad_bins(),
read_triad_bins() and triad_bins_json() for the triad-bins JSON of <dyng/io/result_io.hpp>;
dyng.testing.triad_reference() for the oracle. Every stable symbol has its counterpart, except:
C++ |
Python in 0.3 |
Why, and when |
|---|---|---|
|
|
by design: the counts are at most 30 host values, so a copy costs nothing and never goes stale (the zero-copy |
|
|
by design (the other results’ spelling) |
|
|
by design: the zero bins above |
|
|
by design |
|
none: |
by design: a compile-time message |
|
|
by design: a compile-time message |
|
|
by design |
|
none |
by design: |
|
|
the counts of one pattern cover the Python tests; the rest after 0.3 if asked |
label_propagation symbols without a Python counterpart (0.4, M10b)#
Every symbol of <dyng/label_propagation.hpp>, of the graph additions of 0.4 (ADR 0069, 0103),
of <dyng/generators/vertex_arrival.hpp>, of <dyng/testing/harmonic_solution.hpp> and of the
label files has a counterpart in dyng.label_propagation, dyng.Graph, dyng.EdgeBatch,
dyng.ApplySummary, dyng.BatchSemantics, dyng.VertexStatus, dyng.generators,
dyng.testing and dyng.io (ADR 0108), except:
C++ |
Python in 0.4 |
Why, and when |
|---|---|---|
|
|
the zero-copy graph view is not bound (the |
|
|
by design (as |
|
|
by design |
|
|
the class comparisons are the parity harness’s (C++); after 0.4 if users ask |
|
none |
the conformance kit’s and the parity harness’s models (C++ tests); by design |
|
|
by design (dtype dispatch) |
hyper_sssp symbols without a Python counterpart (0.4, M11b)#
<dyng/hyper_sssp.hpp> is dyng.hyper_sssp (ADR 0097): BudgetAction, FallbackReason (the
enumerations, also their names as strings), INFINITE_DISTANCE, Options, Stats, Result
(hyperedge_distances, hyperedge_parents, distance_to(), vertex_distances(), source,
options, set_options(), graph_version, space, clone()), compute(), update();
dyng.update() over hypergraphs takes its results; the container’s incidence edits and
storage="slack_csr" (M11b); dyng.testing.hyper_sssp_reference() and check_hyper_sssp_tree()
for the oracle. Every frozen symbol has its counterpart, except:
C++ |
Python in 0.4 |
Why, and when |
|---|---|---|
|
|
by design (the other results’ spelling) |
|
|
by design |
|
|
by design: a compile-time message |
|
|
by design: a compile-time message |
|
|
the public mode (a source vertex) covers the Python tests; the source-hyperedge mode is the parity harness’s |
|
none |
the pair delta of two states is checked by the C++ tests and the parity harness; after 0.4 if asked |