SWDEV-546179 - hipModuleGetFunctionCount AMD impl (#782)

* SWDEV-546179 - hipModuleGetFunctionCount AMD impl

* SWDEV-546179 - return invalid for count ptr

* SWDEV-546179 - hipModuleGetFunctionCount CHANGELOG.md update

[ROCm/clr commit: dfb46db2fb]
This commit is contained in:
GunaShekar, Ajay
2025-08-13 20:28:12 -07:00
committed by GitHub
parent 5c412edcd1
commit 76328ecfde
12 changed files with 87 additions and 5 deletions
+11
View File
@@ -834,6 +834,17 @@ hipError_t PlatformState::getDynFunc(hipFunction_t* hfunc, hipModule_t hmod,
return it->second->getDynFunc(hfunc, func_name);
}
hipError_t PlatformState::getFuncCount(unsigned int* count, hipModule_t hmod) {
amd::ScopedLock lock(lock_);
auto it = dynCO_map_.find(hmod);
if (it == dynCO_map_.end()) {
LogPrintfError("Cannot find the module: 0x%x", hmod);
return hipErrorNotFound;
}
return it->second->getFuncCount(count);
}
bool PlatformState::isValidDynFunc(const void* hfunc) {
amd::ScopedLock lock(lock_);
return std::any_of(dynCO_map_.begin(), dynCO_map_.end(),