pylibcugraphops
pylibcugraphops is a wrapper around cugraph-ops and provides framework-agnostic and lightweight Python-bindings for the custom graph operators of cugraph-ops. For more information on the implemented functionality, check the corresponding documentations.
Structure
In terms of structure, the bindings somewhat follow the guidelines of cugraph-ops. The main difference is that pylibcugraphops is more focused on providing reasonable submodules and thus the overall structure is rather flat. The core functionality is placed under pylibcugraphops.operators similar to the C++ API with the <cugraph-ops/operators> namespace. This includes basic aggregation operators (e.g. for GraphSAGE), specialized operators (e.g. for RGCN), and operators performing pooling-like operations (e.g. readout operations aggregating from a graph-to-scalar level). While the C++ API has a further distinction into operators for message flow graphs and other kinds of graphs which can be represented through CSC, the pylibcugraphops.operators is kept as a flat submodule with the function names making the disctiontion.
Naming Convention
The name of exposed operators and corresponding files should be self-explanatory to provide an easy overview of all relevant charateristics. Therefore, we adopt the following naming convention for operators.
<operator family>_<graph type>_<"direction">_(<operator specification>_)<[fwd|bwd|bwd_rev|...]
Examples
agg_simple_csc_bwdpool_csc_n2s_bwdagg_hg_basis_mfg_n2n_post_bwd
Support for different datatypes is achieved through overloading and thus usually not explicitly part of operator names.
Explanation of Individual Parts
<operator family>denotes the underlying operator, we currently haveagg_simple: basic aggregator performing a mean/sum/min/max reduction of the specified setagg_concat: likeagg_simplebut additionally concatenates the self representation of each set memberagg_dmpnn: implmements the DMPNN edge-to-edge aggregationpool: sum/mean/min/max pooling, e.g. node-to-scalar readouthg_basis: heterogenous aggregation using different edge types and potentially using a basis decompositionmha_gat: multi-headed attention aggregation, in this case GAT as specific variant
<graph type>which graph type the operator is intended forcsc: simple csc representation of a graphbipartite: simple csc representation of a bipartite graphmfg: message flow graph
<"direction">: for easier overview of which operators we already have, multiple directions are combined and separated through underscores (e.g.e2n_n2n)n2n: node-to-node (basic aggregation)e2n: edge-to-nodee2e: edge-to-edgen2s: node-to-scalar
<operator specification>: some operators define different kinds of "flavors", e.g. the "pre" and the "post" variant of thehg_basisoperators
Function Signatures
The following pattern should be used
func(output_vector_arg_0, ..., output_vector_arg_n,
input_vector_arg_0, ..., input_vector_arg_n,
graph_structure_arg_0, ..., graph_structure_arg_n,
*args,
**kwargs,
cuda_stream=None)
*args: arguments necessary forfuncbut neither a buffer nor a graph structure**kwargs: optional arguments or arguments with default valuescuda_streamshould be the last argument in a binding if applicable and defaulted to the null stream
Example for RGCN (hg_basis_pre):
def agg_hg_basis_mfg_n2n_pre_bwd(output_gradient,
input_gradient,
input_embedding,
message_flow_graph_hg_csc_int32 graph,
output_weight_gradient=None,
weights_combination=None,
concat_own=False,
norm_by_degree=False,
cuda_stream=None):
Metadata
Release files for pylibcugraphops-cu12 24.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pylibcugraphops_cu12-24.12.0.tar.gz | 2.4 kB | Without provenance | Details for pylibcugraphops_cu12-24.12.0.tar.gz |
Release files / pylibcugraphops_cu12-24.12.0.tar.gz
| Download URL | pylibcugraphops_cu12-24.12.0.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4be6ec00dc08821bd9986460955a8df11d6a3b2d8b6a60c9d1d9bd9d44b83a95
|
|
BLAKE2b-256 checksum How to use checksums |
0eae65a24dee12a1f29af5e0288559eef70f95a8263e297128eb7fbde56ae0a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.12
|
Security for pylibcugraphops-cu12 24.12.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.