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

이 커밋은 다음에 포함됨:
Dittakavi, Satyanvesh 작성하고 GitHub가 2025-05-06 15:12:12 +05:30를 커밋함
1 부모 a71c6eb1a0
커밋 607f8f26fd
1 파일이 변경됨
+5 -1
+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 !=