dgl icon indicating copy to clipboard operation
dgl copied to clipboard

[EXAMPLE]Add device support in hetero_rgcn

Open xuechendi opened this issue 2 years ago • 9 comments

Signed-off-by: Xue, Chendi [email protected]

Description

When testing this example with colab(GPU) and CPU, found that since graph is not binding to the device, which leaded to both GPU and CPU performance were lower than expectation. To fix this, add to(device) support in this example.

Checklist

Please feel free to remove inapplicable items for your PR.

  • [x] The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • [x] Changes are complete (i.e. I finished coding on this PR)
  • [ ] All changes have test coverage
  • [ ] Code is well-documented
  • [x] To the best of my 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
  • [ ] If the PR is for a new model/paper, I've updated the example index here.

Changes

  • [x] add to(device) in prepare_data
  • [x] add enable_cpu_affinity in prepare_data and train

xuechendi avatar Oct 06 '22 16:10 xuechendi

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 06 '22 16:10 dgl-bot

Commit ID: db24747f54ab40c775924668e2754a4a5327d560

Build ID: 1

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 06 '22 16:10 dgl-bot

Hi @mufeili , I saw you are the owner for this example, please help to review this PR see if it makes sense to you. From my evaluation, running this script on colab speeding up from around ~1200 it/s -> ~6000it/s

xuechendi avatar Oct 06 '22 16:10 xuechendi

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 10 '22 14:10 dgl-bot

Commit ID: 8649d8e63a5c01b9ac2c124fc45a4de4d325607d

Build ID: 2

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 10 '22 14:10 dgl-bot

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 11 '22 19:10 dgl-bot

Commit ID: 81ec991ab620a3bdc5c3616a4ed8807ef0191fe5

Build ID: 3

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 11 '22 19:10 dgl-bot

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 12 '22 14:10 dgl-bot

Commit ID: 9b210eb290ec9c71ddb07e3ce29fd97a6ccc1505

Build ID: 4

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 12 '22 14:10 dgl-bot

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 17 '22 18:10 dgl-bot

Commit ID: d5dd8763cb025da72a12b10180079ce1e928adf3

Build ID: 5

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 17 '22 18:10 dgl-bot

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 17 '22 21:10 dgl-bot

Commit ID: 29dca0c9ad57fb12c884c1a8f725cb53d9fa2961

Build ID: 6

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 17 '22 21:10 dgl-bot

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 17 '22 21:10 dgl-bot

Commit ID: 74a32b0665b82dd82f84eba7089499f57c30e9ce

Build ID: 7

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 17 '22 21:10 dgl-bot

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 18 '22 01:10 dgl-bot

Commit ID: c7943c01e0cc7ceabc11cf7c75a680d35823e007

Build ID: 8

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 18 '22 01:10 dgl-bot

I dropped few comments. Otherwise, looks good to me.

@chang-l , got it, removed num_workers and dgl version print

xuechendi avatar Oct 18 '22 01:10 xuechendi

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 18 '22 23:10 dgl-bot

Commit ID: 4c719c4bbc58445084530f9b2008b34c7d3d714b

Build ID: 9

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 18 '22 23:10 dgl-bot

@xuechendi Can you please add comment within is_support_cpu_affinity function? Especially, explain why 0.9.1 is specified there. (e.g., return v_t >= "0.9.1" # (cpu)affinity-aware dataloading only available with dgl 0.9.1+)

@mufeili Can you pls take a look before merging?

chang-l avatar Oct 19 '22 00:10 chang-l

@dgl-bot

chang-l avatar Oct 19 '22 00:10 chang-l

Commit ID: 4c719c4bbc58445084530f9b2008b34c7d3d714b

Build ID: 10

Status: ✅ CI test succeeded

Report path: link

Full logs path: link

dgl-bot avatar Oct 19 '22 01:10 dgl-bot

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 19 '22 01:10 dgl-bot

Commit ID: 5097b35c77ce896b500e243d05f55d36f8c3e854

Build ID: 11

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 19 '22 01:10 dgl-bot

@xuechendi Can you please add comment within is_support_cpu_affinity function? Especially, explain why 0.9.1 is specified there. (e.g., return v_t >= "0.9.1" # (cpu)affinity-aware dataloading only available with dgl 0.9.1+)

@mufeili Can you pls take a look before merging?

@chang-l , I added is_support_affinity(), thanks

xuechendi avatar Oct 19 '22 01:10 xuechendi

@dgl-bot

chang-l avatar Oct 19 '22 22:10 chang-l

Commit ID: 7213009906c88f15bf9a6bb2f55c379cad9ea396

Build ID: 12

Status: ✅ CI test succeeded

Report path: link

Full logs path: link

dgl-bot avatar Oct 19 '22 22:10 dgl-bot

Not authorized to trigger CI. Please ask core developer to help trigger via issuing comment:

  • @dgl-bot

dgl-bot avatar Oct 20 '22 14:10 dgl-bot

Commit ID: 7f7758147f93fbee4963ba4fb4ba09c342a183a4

Build ID: 13

Status: ❌ CI test failed in Stage [Authentication].

Report path: link

Full logs path: link

dgl-bot avatar Oct 20 '22 14:10 dgl-bot