-
Notifications
You must be signed in to change notification settings - Fork 198
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
[FEA] Support per-device default memory resource #409
Comments
@jrhemstad The difference with Thrust is that they lazily create the per-device MR. This assumes that all MRs are default constructed, which doesn't really work for us. For RMM, should we instead extend |
I don't think it would be too difficult to make all resources default constructible. Can just pick sane defaults for block/pool sizes, and use
I'd still start with adding the equivalent of a Furthermore, I notice with Thrust's per-device resource machinery, the resource is typed and stored as an object instead of a pointer, which precludes being able to do any dynamic polymorphism.
|
FYI, this feature will be quite useful in integrating RMM into XGBoost. For the initial implementation (dmlc/xgboost#5873), I am using CNMeM pool, but I'd like to use the pool allocator instead. |
One point worth noting is we may benefit from being able to reuse the same allocator in Rapids as XGBoost. Mentioning this in connection with memory pressure that has been periodically reported by users trying to use these libraries together. |
@jakirkham In dmlc/xgboost#5873, XGBoost will actually use the default allocator setting (
When per-device default resource is implemented, we will be able to use the pool allocator instead ( |
I don't like that constraint. We lose the flexibility that we've designed into MRs. It would be very difficult to create a binning pool resource, for example, unless the pool was the default_resource.
@jrhemstad Thrust doesn't have a way to set the per_device_resource. I think we need a way to set it... |
I fully intended for having a way to set a per device resource. |
Fixed since 0.15. |
Is your feature request related to a problem? Please describe.
I would like to be able to specify a "default" resource per GPU device available to my process. Today, RMM only has a concept of a single default resource.
Describe the solution you'd like
Create a mechanism to specify/manage a set of default resources, one per device.
Additional context
Thrust has a concept of a
per_device_resource
by managing astd::map<device_id, memory_resource>
.The text was updated successfully, but these errors were encountered: