dmlc / dmlc/dgl

[Enhancement] dgl.batch is slow due to FFI

Open
#5,468 2 comments 0 reactions 1 assignee Claimed by @peizhou001 View on GitHub
bug:confirmed topic: system performance
Dominant language
Python
Stars
14.3k
Forks
3.1k
PR merge metrics
No merged PRs in 30d

Description

According to our test, `dgl.batch` is a bottleneck in graph classification. One main reason is it frequently call `number_of_edges` and `number_of_nodes` which further call underlying C++ function via `FFI`. Unfortunately, `FFI` has taken up 97% time of these 2 functions. To tackle the problem, we thought out 2 ways:

1. Replace FFI with other method.
2. Duplicate attributes to python level object.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.