SWDEV-524612 - Consider "1" a truthy value for WGPMode (#187)

The compiler currently serializes the workgroup_processor_mode COMGR metadata boolean field as "0"/"1" instead of "false"/"true". Consider "1" a truthy value during parsing.

[ROCm/clr commit: d020598a0f]
This commit is contained in:
Ramirez, Lucas
2025-04-17 11:50:07 +02:00
committed by GitHub
parent 6ae4c7278e
commit 0a45aa85c5
+3 -1
View File
@@ -582,7 +582,9 @@ static amd_comgr_status_t populateKernelMetaV3(const amd_comgr_metadata_node_t k
kernel->SetKernelKind(buf);
break;
case KernelField::WgpMode:
kernel->SetWGPMode(buf.compare("true") == 0);
// The compiler currently serializes this boolean field as "0"/"1" instead
// of "false"/"true"; consider both "true" and "1" truthy values.
kernel->SetWGPMode(buf.compare("true") == 0 || buf.compare("1") == 0);
break;
case KernelField::UniformWrokGroupSize:
kernel->setUniformWorkGroupSize(buf.compare("1") == 0);