From 0e5e53ee190c0d5879604e017c460186239aa823 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 4 Aug 2016 15:45:33 -0400
Subject: [PATCH] P4 to Git Change 1299166 by lmoriche@lmoriche_opencl_dev on
2016/08/04 15:38:20
SWDEV-94610 - Relax the assertions in Program::addDeviceProgram
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#80 edit
---
rocclr/runtime/platform/program.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/rocclr/runtime/platform/program.cpp b/rocclr/runtime/platform/program.cpp
index eac34ffc81..33e958d2e1 100644
--- a/rocclr/runtime/platform/program.cpp
+++ b/rocclr/runtime/platform/program.cpp
@@ -49,7 +49,7 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
amd::option::Options* options)
{
#if defined(WITH_LIGHTNING_COMPILER)
- assert(!"FIMXE_Wilkins: check the code below");
+ if (image != NULL) { assert(!"FIMXE_Wilkins: check the code below"); }
#else // !defined(WITH_LIGHTNING_COMPILER)
if (image != NULL &&
!aclValidateBinaryImage(image, length,
@@ -76,7 +76,7 @@ Program::addDeviceProgram(Device& device, const void* image, size_t length,
emptyOptions = true;
}
#if defined(WITH_LIGHTNING_COMPILER)
- assert(!"FIMXE_Wilkins: check the code below");
+ if (image != NULL && length != 0) { assert(!"FIMXE_Wilkins: check the code below"); }
#else // !defined(WITH_LIGHTNING_COMPILER)
if (image != NULL && length != 0 && aclValidateBinaryImage(image, length, BINARY_TYPE_ELF)) {
acl_error errorCode;