SWDEV-529831 - Return error if the program is empty (#257)
[ROCm/clr commit: 607f8f26fd]
This commit is contained in:
committed by
GitHub
parent
b5f67d4804
commit
086a1c289a
@@ -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 !=
|
||||
|
||||
Reference in New Issue
Block a user