SWDEV-546311 - implement hipKernelGetLibrary & hipLibraryEnumerateKer… (#1143)

* SWDEV-546311 - implement hipKernelGetLibrary & hipLibraryEnumerateKernels API

* Fix for LibraryEnumerateKernel and KernelGetName

* Update Enumerate Kernels to handle 0 numKernels

* Minor fixes to function names

* fix error checking in internal function

* Update changelog for new apis

---------

Co-authored-by: Rahul Manocha <rmanocha@amd.com>
This commit is contained in:
Rahul Manocha
2025-10-27 14:13:17 -07:00
committed by GitHub
parent 3e59eebf17
commit f5d901f016
13 changed files with 340 additions and 26 deletions
@@ -3672,6 +3672,19 @@ inline static hipError_t hipLibraryGetKernelCount(unsigned int* count, hipLibrar
return hipCUResultTohipError(cuLibraryGetKernelCount(count, library));
}
inline static hipError_t hipLibraryEnumerateKernels(hipKernel_t* kernels, unsigned int numKernels,
hipLibrary_t library) {
return hipCUResultTohipError(cuLibraryEnumerateKernels(kernels, numKernels, library));
}
inline static hipError_t hipKernelGetLibrary(hipLibrary_t* library, hipKernel_t kernel) {
return hipCUResultTohipError(cuKernelGetLibrary(library, kernel));
}
inline static hipError_t hipKernelGetName(const char** name, hipKernel_t kernel) {
return hipCUResultTohipError(cuKernelGetName(name, kernel));
}
inline static hipError_t hipLaunchKernel(const void* function_address, dim3 numBlocks,
dim3 dimBlocks, void** args, size_t sharedMemBytes,
hipStream_t stream) {