From 67f8bf027045dcb52a36b20a4072c5e8d4c6ccfd Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 13 Nov 2018 18:10:36 -0500
Subject: [PATCH] P4 to Git Change 1706503 by
skudchad@skudchad_test2_win_opencl on 2018/11/13 18:06:02
SWDEV-145570 - [HIP] Skip empty bundles
ReviewBoardURL = http://ocltc.amd.com/reviews/r/16140/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_platform.cpp#20 edit
[ROCm/hip commit: 26ce431eefe51b94610c1eeb4b7b2075881b40e1]
---
projects/hip/api/hip/hip_platform.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/projects/hip/api/hip/hip_platform.cpp b/projects/hip/api/hip/hip_platform.cpp
index c4c2e7d1cb..da7f8beb62 100644
--- a/projects/hip/api/hip/hip_platform.cpp
+++ b/projects/hip/api/hip/hip_platform.cpp
@@ -445,6 +445,9 @@ const std::vector& modules() {
nullptr);
for (auto&& bundle : bundles) {
+ if (bundle.empty()) {
+ continue;
+ }
std::string magic(&bundle[0], sizeof(CLANG_OFFLOAD_BUNDLER_MAGIC_STR) - 1);
if (magic.compare(CLANG_OFFLOAD_BUNDLER_MAGIC_STR))
continue;