SWDEV-546287 - Implement hipLibrary load/unload (#975)

Этот коммит содержится в:
Jatin Chaudhary authored and GitHub committed 2025-09-19 22:23:49 +01:00
1 родитель 775ac73d25
Коммит e79eaaa8a5
26 files changed
+1175 -16

No files matched your search

+10 -6
Просмотреть файл
@@ -647,15 +647,19 @@ hipError_t ihipLaunchKernel(const void* hostFunction, dim3 gridDim, dim3 blockDi
if (!hip::isValid(stream)) {
return hipErrorInvalidValue;
}
if (hostFunction == nullptr) {
return hipErrorInvalidDeviceFunction;
}
hipFunction_t func = nullptr;
int deviceId = hip::Stream::DeviceId(stream);
hipError_t hip_error = PlatformState::instance().getStatFunc(&func, hostFunction, deviceId);
hipError_t hip_error =
PlatformState::instance().getStatFunc(&func, hostFunction, deviceId);
if ((hip_error != hipSuccess) || (func == nullptr)) {
if (hip_error == hipErrorNoBinaryForGpu) {
return hip_error;
} else {
return hipErrorInvalidDeviceFunction;
}
// assume its hip function type if we did not get a valid output from static
// func lookup
func = reinterpret_cast<hipFunction_t>(const_cast<void *>(hostFunction));
}
constexpr auto gridDimYZmax = static_cast<uint64_t>(std::numeric_limits<uint16_t>::max()) + 1;