Skip to content
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

[Performance] Remove phmap dependency. #7658

Merged
merged 4 commits into from
Aug 5, 2024

Conversation

mfbalin
Copy link
Collaborator

@mfbalin mfbalin commented Aug 5, 2024

Description

@frozenbugs I went ahead and dropped phmap as a dependency as you requested. Please let me know if the PR has can be improved. I am merging so that I can delete the phmap folder from my repo.

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • I've leverage the tools to beautify the python and c++ code.
  • The PR is complete and small, read the Google eng practice (CL equals to PR) to understand more about small PR. In DGL, we consider PRs with less than 200 lines of core code change are small (example, test and documentation could be exempted).
  • All changes have test coverage
  • Code is well-documented
  • 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

@mfbalin mfbalin requested a review from frozenbugs August 5, 2024 13:52
@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 5, 2024

To trigger regression tests:

  • @dgl-bot run [instance-type] [which tests] [compare-with-branch];
    For example: @dgl-bot run g4dn.4xlarge all dmlc/master or @dgl-bot run c5.9xlarge kernel,api dmlc/master

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 5, 2024

Commit ID: fc5da8a

Build ID: 1

Status: ⚪️ CI test cancelled due to overrun.

Report path: link

Full logs path: link

@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 5, 2024

Commit ID: f6f37e0

Build ID: 2

Status: ❌ CI test failed in Stage [Lint Check].

Report path: link

Full logs path: link

@mfbalin mfbalin changed the title [Performance] Replace phmap with better alternative. [Performance] Remove phmap dependency. Aug 5, 2024
@dgl-bot
Copy link
Collaborator

dgl-bot commented Aug 5, 2024

Commit ID: 83f579b

Build ID: 3

Status: ✅ CI test succeeded.

Report path: link

Full logs path: link

@mfbalin mfbalin merged commit cb4604a into dmlc:master Aug 5, 2024
2 checks passed
@mfbalin mfbalin deleted the replace_phmap_with_tsl branch August 5, 2024 15:29
@frozenbugs
Copy link
Collaborator

LGTM, please keep an eye on next regression result, which will be send later today.

template <typename K, typename V>
using map_t = tsl::robin_map<K, V>;
template <typename iterator>
auto& mutable_value_ref(iterator it) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why wrap the value access with a function? Is it necessary? It's different from std::unordered_map?

Copy link
Collaborator Author

@mfbalin mfbalin Aug 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it->second is const with this map implementation by default. Use .value() to modify it. I wrapped it so that when we change map again for any reason, we have to only change this function.

This pull request was closed.
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.

4 participants