feat(zebin): Do not report attributes values with spaces

Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:
Kacper Nowak 2022-11-21 17:24:36 +00:00 committed by Compute-Runtime-Automation
parent fe7a946097
commit fd691cd33c
3 changed files with 3 additions and 3 deletions

View File

@ -266,7 +266,7 @@ TEST_F(ModuleOnlineCompiled, GivenKernelThenCorrectAttributesAreReturned) {
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
EXPECT_EQ(0u, indirectFlags);
const char attributeString[] = "work_group_size_hint(1, 1, 1)";
const char attributeString[] = "work_group_size_hint(1,1,1)";
uint32_t strSize = 0;
result = kernel->getSourceAttributes(&strSize, nullptr);

View File

@ -1523,7 +1523,7 @@ std::string attributeToString(const int32_t &attribute) {
return std::to_string(attribute);
}
std::string attributeToString(const std::array<int32_t, 3> &attribute) {
return std::to_string(attribute[0]) + ", " + std::to_string(attribute[1]) + ", " + std::to_string(attribute[2]);
return std::to_string(attribute[0]) + "," + std::to_string(attribute[1]) + "," + std::to_string(attribute[2]);
}
std::string attributeToString(ConstStringRef attribute) {
return attribute.str();

View File

@ -1967,7 +1967,7 @@ kernels:
EXPECT_TRUE(warnings.empty()) << warnings;
EXPECT_TRUE(errors.empty()) << errors;
EXPECT_STREQ("new_user_hint(new_user_hint_value) intel_reqd_sub_group_size(16) intel_reqd_workgroup_walk_order(0, 1, 2) reqd_work_group_size(256, 2, 1) work_group_size_hint(256, 2, 1) vec_type_hint(uint)", programInfo.kernelInfos[0]->kernelDescriptor.kernelMetadata.kernelLanguageAttributes.c_str());
EXPECT_STREQ("new_user_hint(new_user_hint_value) intel_reqd_sub_group_size(16) intel_reqd_workgroup_walk_order(0,1,2) reqd_work_group_size(256,2,1) work_group_size_hint(256,2,1) vec_type_hint(uint)", programInfo.kernelInfos[0]->kernelDescriptor.kernelMetadata.kernelLanguageAttributes.c_str());
EXPECT_EQ(16U, programInfo.kernelInfos[0]->kernelDescriptor.kernelMetadata.requiredSubGroupSize);
EXPECT_FALSE(programInfo.kernelInfos[0]->kernelDescriptor.kernelAttributes.flags.isInvalid);
}