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
此提交包含在:
Rakesh Roy
2022-11-24 19:43:40 +05:30
提交者 Rakesh Roy
父節點 3a9621574c
當前提交 b4d8586a11
共有 7 個檔案被更改,包括 50 行新增1 行删除
+8
查看文件
@@ -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");