-
Notifications
You must be signed in to change notification settings - Fork 124
[UMF] Bump version and update DisjointPool params handling #2426
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
[UMF] Bump version and update DisjointPool params handling #2426
Conversation
| Configs[DisjointPoolMemType::Device].Name = "Device"; | ||
| Configs[DisjointPoolMemType::Shared].Name = "Shared"; | ||
| Configs[DisjointPoolMemType::SharedReadOnly].Name = "SharedReadOnly"; | ||
| ret = umfDisjointPoolParamsSetName(Configs[DisjointPoolMemType::Host], "Host"); |
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.
nit: you can just do CheckConfigRet(umfDisjointPoolParamsSetName(Configs[DisjointPoolMemType::Host], "Host")).
Also, I would rename CheckConfigRet to UMF_CALL or something like that so it's shorter and more consistent with UR_CALL/ZE_CALL
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.
Done
| for (auto &Config : AllConfigs.Configs) { | ||
| Config.MaxPoolableSize = AllConfigs.Configs[LM].MaxPoolableSize; | ||
| ret = umfDisjointPoolParamsSetMaxPoolableSize(Config, TmpValue); | ||
| CheckConfigRet(ret); |
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.
This return will only exit from this lambda, not from the entire parseDisjointPoolConfig function.
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.
Done
| Config.SharedLimits = AllConfigs.limits.get(); | ||
| Config.PoolTrace = trace; | ||
| umfDisjointPoolParamsSetSharedLimits(Config, AllConfigs.limits.get()); | ||
| umfDisjointPoolParamsSetTrace(Config, trace); |
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.
no return check?
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.
Done
| #define CheckConfigRet(umf_ret) \ | ||
| if (umf_ret != UMF_RESULT_SUCCESS) { \ | ||
| logger::error("DisjointPool params failed"); \ | ||
| return; \ |
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.
Should we just ignore the error? If any of the setParams function fail and we will just exit the function we might use incomplete config later on.
For calls in DisjointPoolAllConfigs::DisjointPoolAllConfigs I think we should have an assert and for calls in parseDisjointPoolConfig if there is any error we should catch it, log it, and probably revert all configs to the default settings.
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.
Done
7da67f9 to
6479328
Compare
| << std::setw(12) | ||
| << AllConfigs.Configs[DisjointPoolMemType::SharedReadOnly].Capacity | ||
| << std::endl; | ||
| // TODO: fixme, accessing config values directly is no longer allowed - API's changed |
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.
I tried to do this nicely, but I'm not sure if I can... @igchor tried to make the pre-generated content in ctor, but it would have to be updated somehow in the parsing function... If this is not crucial I could update that in a sep. PR...?
It includes update in the new params config approach.
6479328 to
2cb639e
Compare
2cb639e to
7d08ec1
Compare
|
replaced with #2436 |
using UMF with PR oneapi-src/unified-memory-framework#969