-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
[jvm-packages] Supports external memory #11186
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
Conversation
|
Hi @trivialfis, please help review |
|
Note:
|
|
We need to let XGBoost access as many CPU threads as available. |
|
|
For reference, the |
|
The two remaining items:
|
...ckages/xgboost4j-spark-gpu/src/main/scala/ml/dmlc/xgboost4j/scala/spark/ExternalMemory.scala
Outdated
Show resolved
Hide resolved
…t4j/scala/spark/ExternalMemory.scala Co-authored-by: Jiaming Yuan <[email protected]>
|
Hi @trivialfis, please help review it. |
|
Will review. I have tested the PR on my local machine with 2 GPUs.
|
| inputNextIsCalled = true | ||
| withResource(new GpuColumnBatch(iter.next())) { batch => | ||
| if (iter.eq(input)) { | ||
| externalMemory.cacheTable(batch.table) |
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.
It would be great if we could write data asynchronously in the future (after this PR). This way, we can let XGBoost handle the batch while it's being written simultaneously.
...ages/xgboost4j-spark-gpu/src/main/scala/ml/dmlc/xgboost4j/scala/spark/GpuXGBoostPlugin.scala
Show resolved
Hide resolved
...xgboost4j-spark-gpu/src/test/scala/ml/dmlc/xgboost4j/scala/spark/GpuXGBoostPluginSuite.scala
Show resolved
Hide resolved
...s/xgboost4j-spark-gpu/src/test/scala/ml/dmlc/xgboost4j/scala/spark/ExternalMemorySuite.scala
Show resolved
Hide resolved
| val path = Paths.get(dirPath) | ||
| if (!Files.exists(path)) { | ||
| Files.createDirectories(path) | ||
| } else { |
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.
Empty else clause, is this intended?
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.
good catch. removed the empty else
trivialfis
left a comment
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.
Looks good to me.
Supporting ext memory which is based on #11181