diff --git a/rocclr/compiler/lib/include/v0_8/aclEnums.h b/rocclr/compiler/lib/include/v0_8/aclEnums.h index e9f11f6dfb..96174fa7e7 100644 --- a/rocclr/compiler/lib/include/v0_8/aclEnums.h +++ b/rocclr/compiler/lib/include/v0_8/aclEnums.h @@ -178,7 +178,7 @@ typedef enum _bif_sections_enum_0_8 { aclSPIR = 28, aclHEADER = 29, aclBRIGcode = 30, - aclBRIGdirs = 31, + aclBRIGxxxx = 31, aclBRIGoprs = 32, aclBRIGstrs = 33, aclHSADEBUG = 34, diff --git a/rocclr/compiler/lib/utils/bif_section_labels.hpp b/rocclr/compiler/lib/utils/bif_section_labels.hpp index 4b6a4ff702..f5fb1f7cef 100644 --- a/rocclr/compiler/lib/utils/bif_section_labels.hpp +++ b/rocclr/compiler/lib/utils/bif_section_labels.hpp @@ -27,7 +27,7 @@ typedef enum { symAMDILFMeta, symISAText, symBRIGOperands, - symBRIGDirectives, + symBRIGxxxx, symBRIGStrtab, symX86Barrier, symAMDILHeader, @@ -89,8 +89,8 @@ static const oclBIFSymbolStruct BIF30[26] = {symISAText, { "__ISA_", "_text" }, {aclINTERNAL, aclLAST}}, // 16: BIF 3.0 BRIG operands declarations, .brig section via -fbin-brig. {symBRIGOperands, { "__BRIG__operands","" }, {aclBRIGoprs, aclLAST}}, - // 17: BIF 3.0 BRIG directives declarations, .brig section via -fbin-brig. - {symBRIGDirectives, { "__BRIG__directives","" }, {aclBRIGdirs, aclLAST}}, + // 17: Unused after changes in HSAIL PRM + {symBRIGxxxx, { "","" }, {aclLAST, aclLAST}}, // 18: BIF 3.0 BRIG strtab declarations, .brig section via -fbin-brig. {symBRIGStrtab, { "__BRIG__strtab","" }, {aclBRIGstrs, aclLAST}}, // 19: BIF 3.0 per kernel barrier metadata, only valid for X86. diff --git a/rocclr/runtime/device/gpu/gpuprogram.cpp b/rocclr/runtime/device/gpu/gpuprogram.cpp index 5309e0c5bb..e4c35ea048 100644 --- a/rocclr/runtime/device/gpu/gpuprogram.cpp +++ b/rocclr/runtime/device/gpu/gpuprogram.cpp @@ -1942,13 +1942,6 @@ HSAILProgram::getNextCompilationStageFromBinary() if (errorCode != ACL_SUCCESS) { isBrigStrtab = false; } - // Checking BRIG DIRECTIVES in .brig_directives section - bool isBrigDirs = true; - const void *brigDirs = aclExtractSection(dev().hsaCompiler(), - binaryElf_, &secSize, aclBRIGdirs, &errorCode); - if (errorCode != ACL_SUCCESS) { - isBrigDirs = false; - } // Checking BRIG CODE in .brig_code section bool isBrigCode = true; const void *brigCode = aclExtractSection(dev().hsaCompiler(), @@ -1964,10 +1957,10 @@ HSAILProgram::getNextCompilationStageFromBinary() isBrigOps = false; } - if (isHsailText && isBrigStrtab && isBrigDirs && isBrigCode && isBrigOps) { + if (isHsailText && isBrigStrtab && isBrigCode && isBrigOps) { from = ACL_TYPE_HSAIL_BINARY; } - else if (!isHsailText && !isBrigStrtab && !isBrigDirs && !isBrigCode && !isBrigOps) { + else if (!isHsailText && !isBrigStrtab && !isBrigCode && !isBrigOps) { from = ACL_TYPE_LLVMIR_BINARY; } else { @@ -1979,10 +1972,6 @@ HSAILProgram::getNextCompilationStageFromBinary() buildLog_ +="Error while linking : \ Invalid binary (Missing BRIG_STRTAB section)\n" ; } - if (!isBrigDirs) { - buildLog_ +="Error while linking : \ - Invalid binary (Missing BRIG_DIRECTIVES section)\n" ; - } if (!isBrigCode) { buildLog_ +="Error while linking : \ Invalid binary (Missing BRIG_CODE section)\n" ; diff --git a/rocclr/runtime/device/hsa/hsaprogram.cpp b/rocclr/runtime/device/hsa/hsaprogram.cpp index a4e2800024..b41a11fc57 100644 --- a/rocclr/runtime/device/hsa/hsaprogram.cpp +++ b/rocclr/runtime/device/hsa/hsaprogram.cpp @@ -230,16 +230,6 @@ namespace oclhsa { if (errorCode != ACL_SUCCESS) { isBrigStrtab = false; } - // Checking BRIG DIRECTIVES in .brig_directives section - bool isBrigDirs = true; - const void *brigDirs = g_complibApi._aclExtractSection(device().compiler(), - binaryElf_, - &secSize, - aclBRIGdirs, - &errorCode); - if (errorCode != ACL_SUCCESS) { - isBrigDirs = false; - } // Checking BRIG CODE in .brig_code section bool isBrigCode = true; const void *brigCode = g_complibApi._aclExtractSection(device().compiler(), @@ -260,9 +250,9 @@ namespace oclhsa { if (errorCode != ACL_SUCCESS) { isBrigOps = false; } - if (isHsailText && isBrigStrtab && isBrigDirs && isBrigCode && isBrigOps) { + if (isHsailText && isBrigStrtab && isBrigCode && isBrigOps) { from = ACL_TYPE_HSAIL_BINARY; - } else if (!isHsailText && !isBrigStrtab && !isBrigDirs && !isBrigCode && !isBrigOps) { + } else if (!isHsailText && !isBrigStrtab && !isBrigCode && !isBrigOps) { from = ACL_TYPE_LLVMIR_BINARY; } else { if (!isHsailText) { @@ -273,10 +263,6 @@ namespace oclhsa { buildLog_ +="Error while linking : \ Invalid binary (Missing BRIG_STRTAB section)\n" ; } - if (!isBrigDirs) { - buildLog_ +="Error while linking : \ - Invalid binary (Missing BRIG_DIRECTIVES section)\n" ; - } if (!isBrigCode) { buildLog_ +="Error while linking : \ Invalid binary (Missing BRIG_CODE section)\n" ; @@ -528,12 +514,6 @@ namespace oclhsa { &brig_.operand_section_byte_size, true ); - bool dirStatus = ExtractSymbolAndCopy(aclBRIGdirs, - "__BRIG__directives", - &brig_.directive_section, - &brig_.directive_section_byte_size, - true - ); bool strStatus = ExtractSymbolAndCopy(aclBRIGstrs, "__BRIG__strtab", &brig_.string_section, @@ -546,7 +526,7 @@ namespace oclhsa { &brig_.debug_section_byte_size, false ); - if (!codeStatus || !oprStatus || !dirStatus || !strStatus || !dbgStatus) { + if (!codeStatus || !oprStatus || !strStatus || !dbgStatus) { LogError("Failed to Extract one or more BRIG sections"); buildLog_ += "Error: Failed to Extract one or more BRIG sections"; return false; @@ -567,7 +547,6 @@ namespace oclhsa { } //Destroy the BRIG free(brig_.code_section); - free(brig_.directive_section); free(brig_.operand_section); free(brig_.string_section); free(brig_.debug_section);