-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adds -rp parameter and option to run ML model on GPU and physics module on CPU #43
base: develop
Are you sure you want to change the base?
Conversation
src/AMSlib/wf/resource_manager.hpp
Outdated
@@ -145,7 +145,7 @@ class ResourceManager | |||
static void deallocate(std::vector<T*>& dPtr, AMSResourceType resource) | |||
{ | |||
for (auto* I : dPtr) | |||
RMAllocators[resource]->deallocate(I); | |||
RMAllocators[resource]->deallocate(I, dev); |
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 think over here you need to delete "dev".
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.
src/AMSlib/wf/workflow.hpp
Outdated
// ------------------------------------------------------------- | ||
// STEP 1: call the hdcache to look at input uncertainties | ||
// to decide if making a ML inference makes sense | ||
// ------------------------------------------------------------- | ||
if (hdcache != nullptr) { | ||
CALIPER(CALI_MARK_BEGIN("UQ_MODULE");) | ||
hdcache->evaluate(totalElements, tmpInputs, p_ml_acceptable); | ||
CALIPER(CALI_MARK_END("UQ_MODULE");) | ||
} | ||
|
||
DBG(Workflow, "Computed Predicates") | ||
|
||
CALIPER(CALI_MARK_BEGIN("SURROGATE");) | ||
// We need to call the model on all data values. | ||
// Because we expect it to be faster. | ||
// I guess we may need to add some policy to do this | ||
DBG(Workflow, "Model exists, I am calling surrogate (for all data)"); | ||
surrogate->evaluate(totalElements, tmpInputs, tmpOutputs); | ||
CALIPER(CALI_MARK_END("SURROGATE");) |
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.
Over here we call the model. Giorgis has changed the interfaces. Please study this commit here: 00589c2 . The commit replaces the 2 calls we had on both UQ and Model, with a single one that does both.
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 is shaping up nicely. I believe you need 2 small modification and you got it.
src/AMSlib/wf/workflow.hpp
Outdated
if (phLoc != mlLoc) { | ||
// Copy out the result | ||
ResourceManager::copy(p_ml_acceptable, _p_ml_acceptable); | ||
ResourceManager::deallocate(p_ml_acceptable, mlLoc); |
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.
You deallocate p_ml_acceptable
here.
No description provided.