P4 to Git Change 1721185 by wchau@wchau_OCL_boltzmann on 2018/12/17 13:43:56

SWDEV-162389 - OpenCL Support for COMgr
	- fixing bug of using incorrect included header file name

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/devprogram.cpp#23 edit


[ROCm/clr commit: e40b93484f]
Esse commit está contido em:
foreman
2018-12-17 14:02:16 -05:00
commit 67c2cbe7fb
@@ -605,9 +605,15 @@ bool Program::compileImplLC(const std::string& sourceCode,
if (!headers.empty()) {
for (size_t i = 0; i < headers.size(); ++i) {
std::string headerName="Header" + std::to_string(i);
std::string headerIncludeName(headerIncludeNames[i]);
// replace / in path with current os's file separator
if (amd::Os::fileSeparator() != '/') {
for (auto& it : headerIncludeName) {
if (it == '/') it = amd::Os::fileSeparator();
}
}
if (addCodeObjData(headers[i]->c_str(), headers[i]->length(), AMD_COMGR_DATA_KIND_INCLUDE,
headerName.c_str(), &inputs) != AMD_COMGR_STATUS_SUCCESS) {
headerIncludeName.c_str(), &inputs) != AMD_COMGR_STATUS_SUCCESS) {
buildLog_ += "Error: COMGR fails to add headers into inputs.\n";
amd::Comgr::destroy_data_set(inputs);
return false;