Skip to content

Commit e78f937

Browse files
committed
Address review comments
1 parent c68fd17 commit e78f937

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

llvm/include/llvm/Support/PropertySetIO.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ class PropertySetRegistry {
211211
static constexpr char SYCL_HOST_PIPES[] = "SYCL/host pipes";
212212
static constexpr char SYCL_VIRTUAL_FUNCTIONS[] = "SYCL/virtual functions";
213213

214+
static constexpr char PROPERTY_REQD_WORK_GROUP_SIZE[] =
215+
"reqd_work_group_size_uint64_t";
216+
214217
/// Function for bulk addition of an entire property set in the given
215218
/// \p Category .
216219
template <typename MapTy> void add(StringRef Category, const MapTy &Props) {
@@ -235,10 +238,7 @@ class PropertySetRegistry {
235238
if (PropertySetIt == PropSetMap.end())
236239
return;
237240
auto &PropertySet = PropertySetIt->second;
238-
auto PropIt = PropertySet.find(PropName);
239-
if (PropIt == PropertySet.end())
240-
return;
241-
PropertySet.erase(PropIt);
241+
PropertySet.erase(PropertySet.find(PropName));
242242
}
243243

244244
/// Parses from the given \p Buf a property set registry.

llvm/lib/SYCLLowerIR/SYCLDeviceRequirements.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ std::map<StringRef, util::PropertyValue> SYCLDeviceRequirements::asMap() const {
142142
// reqd_work_group_size_uint64_t attribute. At the next ABI-breaking
143143
// window, this can be changed back to reqd_work_group_size.
144144
if (ReqdWorkGroupSize.has_value())
145-
Requirements["reqd_work_group_size_uint64_t"] = *ReqdWorkGroupSize;
145+
Requirements[util::PropertySetRegistry::PROPERTY_REQD_WORK_GROUP_SIZE] =
146+
*ReqdWorkGroupSize;
146147

147148
if (JointMatrix.has_value())
148149
Requirements["joint_matrix"] = *JointMatrix;

llvm/tools/sycl-post-link/sycl-post-link.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,11 @@ std::string saveModuleProperties(module_split::ModuleDesc &MD,
313313
// When the split mode is none, the required work group size will be added
314314
// to the whole module, which will make the runtime unable to
315315
// launch the other kernels in the module that have different
316-
// required work group sizes or no requried work group sizes. So we need to
316+
// required work group sizes or no required work group sizes. So we need to
317317
// remove the required work group size metadata in this case.
318318
if (SplitMode == module_split::SPLIT_NONE)
319319
PropSet.remove(PropSetRegTy::SYCL_DEVICE_REQUIREMENTS,
320-
"reqd_work_group_size_uint64_t");
320+
PropSetRegTy::PROPERTY_REQD_WORK_GROUP_SIZE);
321321

322322
std::string NewSuff = Suff.str();
323323
if (!Target.empty()) {

0 commit comments

Comments
 (0)