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

Lazy import XGBoost #6939

Merged
merged 1 commit into from Nov 19, 2020
Merged

Lazy import XGBoost #6939

merged 1 commit into from Nov 19, 2020

Conversation

comaniac
Copy link
Contributor

I encountered the same issue as this one: https://discuss.tvm.apache.org/t/conflict-with-xgboost-when-thrust-is-enabled/6889 with CUDA 10.0 and thrust enabled after upgrading XGBoost to 1.1.0. Since XGBoost is imported by AutoTVM, and AutoTVM is used everywhere (e.g., TOPI, VM, etc), I got the error even with only from tvm import relay, as mentioned in the latest reply in the post.

Since we cannot reproduce this error in docker and it's a potential issue, this PR makes the XGBoost import lazy.

cc @merrymercy @tqchen @vinx13 @zhiics

Copy link
Member

@zhiics zhiics left a comment

Choose a reason for hiding this comment

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

LGTM

@tqchen tqchen merged commit d42c155 into apache:main Nov 19, 2020
@comaniac comaniac deleted the xgb_lazy branch November 19, 2020 16:35
@merrymercy
Copy link
Member

@comaniac Missing the package is a fatal error. We should raise an exception when we fail to import it instead of prinitng a message.

trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 2, 2020
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request Dec 4, 2020
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Dec 4, 2020
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.

None yet

5 participants