From 7cd51d23866293e0b0f7278f28ccbeeaa7d8a55c Mon Sep 17 00:00:00 2001
From: foreman
Date: Tue, 2 Apr 2019 12:03:04 -0400
Subject: [PATCH] P4 to Git Change 1764730 by asalmanp@asalmanp-ocl-stg on
2019/04/02 11:18:14
SWDEV-132899 - [OCL][GFX10] Link correct wavefrontsize64 function in non-comgr path
ReviewBoardURL = http://ocltc.amd.com/reviews/r/17069/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#37 edit
---
rocclr/runtime/device/devprogram.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/rocclr/runtime/device/devprogram.cpp b/rocclr/runtime/device/devprogram.cpp
index 97dc2f1ec2..99a1f1043d 100644
--- a/rocclr/runtime/device/devprogram.cpp
+++ b/rocclr/runtime/device/devprogram.cpp
@@ -1677,7 +1677,12 @@ bool Program::linkImplLC(amd::option::Options* options) {
Data* unsafe_math_bc = C->NewBufferReference(DT_LLVM_BC,
reinterpret_cast(std::get<1>(unsafe_math)), std::get<2>(unsafe_math));
- if (!correctly_rounded_sqrt_bc || !daz_opt_bc || !finite_only_bc || !unsafe_math_bc) {
+ auto wavefrontsize64 = get_oclc_wavefrontsize64(device().settings().lcWavefrontSize64_);
+ Data* wavefrontsize64_bc = C->NewBufferReference(DT_LLVM_BC,
+ reinterpret_cast(std::get<1>(wavefrontsize64)), std::get<2>(wavefrontsize64));
+
+ if (!correctly_rounded_sqrt_bc || !daz_opt_bc || !finite_only_bc || !unsafe_math_bc ||
+ !wavefrontsize64_bc) {
buildLog_ += "Error: Failed to open the control functions.\n";
return false;
}
@@ -1686,6 +1691,7 @@ bool Program::linkImplLC(amd::option::Options* options) {
inputs.push_back(daz_opt_bc);
inputs.push_back(finite_only_bc);
inputs.push_back(unsafe_math_bc);
+ inputs.push_back(wavefrontsize64_bc);
// open the linked output
std::vector linkOptions;