Skip to content

Commit 3a4d443

Browse files
bokrzesiigcbot
authored andcommitted
Fixing regression of "break" logic of MDFramework for Vec.Buff/Vec[]
Adjusting change introduced in: c5a9f76 The problem with original change was that it not only affected warning printing, but the "break" logic also. So if ShaderDumpEnable was disabled, then it never "broke" and in cases where Vec.Buff is huge e.g 100k entries then compiling such kernel took hours
1 parent 3305c0c commit 3a4d443

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

IGC/common/MDFrameWork.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,10 @@ MDNode* CreateNode(const std::vector<val> &vec, Module* module, StringRef name)
184184
for (auto it = vec.begin(); it != vec.end(); ++it)
185185
{
186186
nodes.push_back(CreateNode(*(it), module, name.str() + "Vec[" + std::to_string(i++) + "]"));
187-
if (IGC_IS_FLAG_ENABLED(ShaderDumpEnable) && IGC_IS_FLAG_DISABLED(ShowFullVectorsInShaderDumps) && i > MAX_VECTOR_SIZE_TO_PRINT_IN_SHADER_DUMPS)
187+
if (IGC_IS_FLAG_DISABLED(ShowFullVectorsInShaderDumps) && i > MAX_VECTOR_SIZE_TO_PRINT_IN_SHADER_DUMPS)
188188
{
189+
if (IGC_IS_FLAG_ENABLED(ShaderDumpEnable))
190+
{
189191
std::string flagName = "ShowFullVectorsInShaderDumps";
190192
#ifndef _WIN32
191193
flagName = "IGC_" + flagName;
@@ -203,7 +205,8 @@ MDNode* CreateNode(const std::vector<val> &vec, Module* module, StringRef name)
203205
printWarningFirstTime = false;
204206
}
205207
nodes.push_back(CreateNode(false, module, warningMessage + " " + flagName + " currently equals"));
206-
break;
208+
}
209+
break;
207210
}
208211
}
209212
MDNode* node = MDNode::get(module->getContext(), nodes);

0 commit comments

Comments
 (0)