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
@@ -124,6 +124,15 @@ hipError_t DynCO::getDynFunc(hipFunction_t* hfunc, std::string func_name) {
return it->second->getDynFunc(hfunc, module_);
}
hipError_t DynCO::getFuncCount(unsigned int* count) {
amd::ScopedLock lock(dclock_);
if (count == nullptr) {
return hipErrorInvalidValue;
}
*count = functions_.size();
return hipSuccess;
}
bool DynCO::isValidDynFunc(const void* hfunc) {
amd::ScopedLock lock(dclock_);
return std::any_of(functions_.begin(), functions_.end(),