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


[ROCm/clr commit: b4d8586a11]
This commit is contained in:
Rakesh Roy
2022-11-24 19:43:40 +05:30
کامیت شده توسط Rakesh Roy
والد f97723d118
کامیت f870f04dd9
7فایلهای تغییر یافته به همراه50 افزوده شده و 1 حذف شده
@@ -135,6 +135,14 @@ hipError_t Function::getDynFunc(hipFunction_t* hfunc, hipModule_t hmod) {
return hipSuccess;
}
bool Function::isValidDynFunc(const hipFunction_t& hfunc) {
guarantee((dFunc_.size() == g_devices.size()), "dFunc Size mismatch");
if (dFunc_[ihipGetDevice()] == nullptr) {
return false;
}
return (dFunc_[ihipGetDevice()]->asHipFunction() == hfunc);
}
hipError_t Function::getStatFunc(hipFunction_t* hfunc, int deviceId) {
guarantee(modules_ != nullptr, "Module not initialized");