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

[feature request] continued accerelate ConstructHistogram #2786

Closed
guolinke opened this issue Feb 21, 2020 · 3 comments
Closed

[feature request] continued accerelate ConstructHistogram #2786

guolinke opened this issue Feb 21, 2020 · 3 comments

Comments

@guolinke
Copy link
Collaborator

guolinke commented Feb 21, 2020

ConstructHistogram (in src\io\**_bin.hpp and src_io\dataset.cpp) is the most time-consuming part of LightGBM.

The speed here is mainly bounded by the memory bandwidth.

There are two construction algorithms:

  1. col-wise, which scans columns and constructs its corresponding histogram one-by-one

    • Pros: better scalability in multi-threading. smaller memory consumption.
    • Cons: redundancy memory access for gradients and hessians for each column needs one pass of them.
  2. row-wise, which scans the rows one-by-one, and constructs all feature histograms at once.

    • Pros: sparse-aware and no redundancy memory access for gradients and hessians.
    • Cons: poor scalability in multi-threading. larger memory consumption.

Currently, LightGBM implements them both, and automatically choose the faster one during run-time.

Maybe there is a better algorithm and we can continue to explore it.

@StrikerRUS
Copy link
Collaborator

Closed in favor of being in #2302. We decided to keep all feature requests in one place.

Welcome to contribute this feature! Please re-open this issue (or post a comment if you are not a topic starter) if you are actively working on implementing this feature.

@AyeChan378

This comment has been minimized.

@guolinke
Copy link
Collaborator Author

#3522 reduces the memory overhead for dense row-wise histograms, besides, it adjusts the block size and achieves a better speed-up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants