From 1e3a301694bcde4f79b5c71fe0d104dac92864b3 Mon Sep 17 00:00:00 2001 From: Laurent Morichetti Date: Tue, 28 Apr 2020 22:41:45 -0700 Subject: [PATCH] Don't make a copy of the embedded device binaries Embedded device binaries should not be cloned if we want the ROCR's code object URI for this binary to point to the container (host executable or shared library) instead of a memory location. Depends-On: I7973bb0243f5a2d1b639b8a88445cfe6af919dd7 Change-Id: Id3afc981e027e5371114d011f2caaa6414f5fc58 [ROCm/hip commit: f21fd3e22ed3411ca964d0185073b07881bbea1e] --- projects/hip/vdi/hip_platform.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/hip/vdi/hip_platform.cpp b/projects/hip/vdi/hip_platform.cpp index f2436c4f17..f7cc1754f2 100755 --- a/projects/hip/vdi/hip_platform.cpp +++ b/projects/hip/vdi/hip_platform.cpp @@ -164,7 +164,8 @@ void PlatformState::digestFatBinary(const void* data, std::vectoraddDeviceProgram(*ctx->devices()[0], code_objs[dev].first, code_objs[dev].second)) { + if (CL_SUCCESS == program->addDeviceProgram( + *ctx->devices()[0], code_objs[dev].first, code_objs[dev].second, false)) { programs.at(dev) = std::make_pair(reinterpret_cast(as_cl(program)) , false); } }