SWDEV-529831 - Return error if the program is empty (#257)

Этот коммит содержится в:
Dittakavi, Satyanvesh
2025-05-06 15:12:12 +05:30
коммит произвёл GitHub
родитель a71c6eb1a0
Коммит 607f8f26fd
+5 -1
Просмотреть файл
@@ -706,9 +706,13 @@ hipError_t FatBinaryInfo::AddDevProgram(hip::Device* device, const void* binary_
}
hipError_t FatBinaryInfo::BuildProgram(const int device_id) {
// Device Id Check and Add DeviceProgram if not added so far
// Check for Device Id bounds and empty program to return gracefully
DeviceIdCheck(device_id);
if (dev_programs_[device_id] == nullptr) {
return hipErrorInvalidKernelFile;
}
// If Program was already built skip this step and return success
if (dev_programs_[device_id]->IsProgramBuilt(*g_devices[device_id]->devices()[0]) == false) {
if (CL_SUCCESS !=