SWDEV-368881 - Enable hipLaunchCooperativeKernel for hipRTC compiled function

- Add helper function to validate whether a dynamic function is present or not
- If getStatFunc fails, then check whether the function passed is a valid dynamic function

Change-Id: I4141172f42dce7ff689709560c483e602b5dad4b
This commit is contained in:
Rakesh Roy
2022-11-24 19:43:40 +05:30
committed by Rakesh Roy
parent 3a9621574c
commit b4d8586a11
7 changed files with 50 additions and 1 deletions
+14
View File
@@ -562,6 +562,20 @@ hipError_t DynCO::getDynFunc(hipFunction_t* hfunc, std::string func_name) {
return it->second->getDynFunc(hfunc, module());
}
bool DynCO::isValidDynFunc(const hipFunction_t& hfunc) {
amd::ScopedLock lock(dclock_);
CheckDeviceIdMatch();
for (auto it : functions_) {
if (it.second->isValidDynFunc(hfunc)) {
return true;
}
}
return false;
}
hipError_t DynCO::initDynManagedVars(const std::string& managedVar) {
amd::ScopedLock lock(dclock_);
DeviceVar* dvar;