AGENT SKILL

graph-layers

Construct and troubleshoot the repository's sparse and dense graph layers, dynamic or dilated KNN blocks, GENConv aggregation, and reversible coupling primitives; use this skill for layer-level API and shape questions, not end-to-end dataset workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
graph-layers
license
MIT
metadata
{ "disco-role": "operating" }
description
Construct and troubleshoot the repository's sparse and dense graph layers, dynamic or dilated KNN blocks, GENConv aggregation, and reversible coupling primitives; use this skill for layer-level API and shape questions, not end-to-end dataset workflows.
disable-model-invocation
true

02 资源文件 5

03 SKILL.md 正文

Graph layers

Use this skill for a layer-level design or debugging task. It is a distilled operating guide, not a source-checkout import recipe. Start with the tensor layout and graph representation, choose a static or dynamic layer, then run the small bundled smoke before moving to a real workload.

Route by task

  • For ModelNet40, S3DIS, PartNet, point-cloud data loading, task flags, checkpoints, or visualization, hand off to the sibling point-cloud-workflows skill.
  • For OGB datasets, DeeperGCN benchmark configurations, graph pooling, partitioning, or RevGNN/RevGAT experiments, hand off to ogb-workflows.
  • For PPI data, F1 metrics, and PPI training/evaluation, hand off to ppi-workflows.
  • Keep the root skill responsible for installation and broad routing. This skill can identify dependency failures but does not install packages or run long training.

Quick decision procedure

  1. Identify layout. Use sparse node features (N, C) with a PyG edge_index (2, E) and optional batch (N,) for independent graphs; use dense point-cloud features (B, C, N, 1) with dense indices (2, B, N, K). Do not pass a dense tensor to sparse layers or flatten a dense batch without preserving graph membership.

  2. Choose graph construction. Use a supplied edge_index when topology is fixed. Otherwise use DynConv/DynConv2d, selecting kernel_size K, dilation d, and (for dense layers) knn='matrix' or the compiled torch_cluster path. Ensure K*d does not exceed points per graph.

  3. Choose convolution. Sparse GraphConv supports edge, mr, gat, gcn, and gin in the inspected implementation. sage and rsage are exposed but are not a supported modern-PyG route; see troubleshooting. Dense GraphConv2d and DynConv2d support edge and mr.

  4. Choose composition. Plain blocks transform features, residual blocks add a same-width scaled skip, and dense blocks concatenate newly produced channels. Static blocks preserve and return edge_index; sparse dynamic blocks return (features, batch).

  5. For generalized aggregation, configure GENConv and validate the aggregator, temperature/power parameters, edge encoding, and message normalization together. See aggregation and blocks.

  6. For memory-efficient depth, use a channel-divisible group additive coupling with deterministic per-group functions, then wrap it with the reversible wrapper only after a direct forward/inverse round trip passes. See reversible.

  7. Run the safe helper from any working directory:

    python /absolute/path/to/graph-layers/scripts/layer_smoke.py --help
    python /absolute/path/to/graph-layers/scripts/layer_smoke.py --tiny
    

    Resolve the absolute path in the caller's skill installation; never add a source checkout to PYTHONPATH for this helper.

Dependency boundary

The core layer behavior depends on a coherent PyTorch, PyTorch Geometric, torch-scatter, and torch-cluster installation. The verified inspection combination was PyTorch 2.11.0+cu128, PyG 2.8.0.post1, torch-scatter 2.1.2+pt211cu128, and torch-cluster 1.6.3+pt211cu128, with pip check passing. Treat those versions as evidence, not as a universal pin: match PyG extension wheels to the installed PyTorch and CUDA/CPU build. A missing or ABI-incoherent compiled extension is a dependency failure, not a layer-shape bug. The tiny helper probes these dependencies without importing repository modules.

Exact benchmark reproduction is intentionally outside this skill. The repository-era PyG 1.6.3 probe did not import with torch 1.13.1 because of the removed torch._six.container_abcs; use a coherent historical environment for old-number reproduction and do not infer benchmark equivalence from the modern smoke.

References

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351