-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark scripts and pyg::sampler::Mapper
#45
Conversation
Codecov Report
@@ Coverage Diff @@
## master #45 +/- ##
==========================================
- Coverage 99.48% 97.27% -2.22%
==========================================
Files 9 10 +1
Lines 195 220 +25
==========================================
+ Hits 194 214 +20
- Misses 1 6 +5
Continue to review full report at Codecov.
|
pyg::Mapper
pyg::sampler::Mapper
Could you put some benchmark numbers here? Thanks. |
|
auto deg_data = deg.data_ptr<scalar_t>(); | ||
auto grain_size = at::internal::GRAIN_SIZE; | ||
at::parallel_for(0, nodes.size(0), grain_size, [&](int64_t _s, int64_t _e) { | ||
for (scalar_t i = _s; i < _e; ++i) { | ||
for (size_t i = _s; i < _e; ++i) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like these nit.
I thought
pyg::sampler::Mapper
is a clever way to re-use mapping functionality across several samplers. In addition, I noticed that the usage ofstd::unordered_map
slows downsubgraph
creation by a significant factor, so I use a simple heuristic to determine if its usage is actually advantageous.