Skip to content

Conversation

@mufeili
Copy link
Member

@mufeili mufeili commented Jan 9, 2021

Description

This PR adds a utility function for generating a memory-optimized graph in CSC format without EID array. By default the function reorders the edges and the associated features with "srcdst" order.

  1. Add an API DGLGraph.sort_by_srcdst to return a graph sorted with srcdst order.
  2. Allow disabling data arrays for CSR/CSC and add corresponding unit tests
  3. Disable EID arrays in creating CSR/CSC formats for srcdst-sorted graphs

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented
  • To the my best knowledge, examples are either not affected by this change,
    or have been fixed to be compatible with this change
  • Related issue is referred in this PR

@mufeili mufeili requested review from jermainewang and yzh119 January 9, 2021 09:42
@jermainewang
Copy link
Member

Checkout the implementation here:

sorted_etypes, index = th.sort(etypes)
g = edge_subgraph(g, index, preserve_nodes=True)

I feel we could implement it inside edge_subgraph.

@mufeili mufeili changed the title [Feature] Allow CSC without EID Array [Feature] Sort Edges by SrcDst And Enable CSR/CSC without Data Arrays Jan 20, 2021
@jermainewang
Copy link
Member

Since there are still operators cannot support empty eid array, we will push this PR after 0.6.

@jermainewang jermainewang changed the title [Feature] Sort Edges by SrcDst And Enable CSR/CSC without Data Arrays [Do not merge][Feature] Sort Edges by SrcDst And Enable CSR/CSC without Data Arrays Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants