@@ -40,7 +40,6 @@ SYCLDeviceRequirements
4040llvm::computeDeviceRequirements (const Module &M,
4141 const SetVector<Function *> &EntryPoints) {
4242 SYCLDeviceRequirements Reqs;
43- bool MultipleReqdWGSize = false ;
4443 // Process all functions in the module
4544 for (const Function &F : M) {
4645 if (auto *MDN = F.getMetadata (" sycl_used_aspects" )) {
@@ -81,8 +80,6 @@ llvm::computeDeviceRequirements(const Module &M,
8180 ExtractUnsignedIntegerFromMDNodeOperand (MDN, I));
8281 if (!Reqs.ReqdWorkGroupSize .has_value ())
8382 Reqs.ReqdWorkGroupSize = NewReqdWorkGroupSize;
84- if (Reqs.ReqdWorkGroupSize != NewReqdWorkGroupSize)
85- MultipleReqdWGSize = true ;
8683 }
8784
8885 if (auto *MDN = F.getMetadata (" sycl_joint_matrix" )) {
@@ -119,13 +116,6 @@ llvm::computeDeviceRequirements(const Module &M,
119116 }
120117 }
121118
122- // Usually, we would only expect one ReqdWGSize, as the module passed to
123- // this function would be split according to that. However, when splitting
124- // is disabled, this cannot be guaranteed. In this case, we reset the value,
125- // which makes so that no value is reqd_work_group_size data is attached in
126- // in the device image.
127- if (MultipleReqdWGSize)
128- Reqs.ReqdWorkGroupSize .reset ();
129119 return Reqs;
130120}
131121
@@ -152,7 +142,8 @@ std::map<StringRef, util::PropertyValue> SYCLDeviceRequirements::asMap() const {
152142 // reqd_work_group_size_uint64_t attribute. At the next ABI-breaking
153143 // window, this can be changed back to reqd_work_group_size.
154144 if (ReqdWorkGroupSize.has_value ())
155- Requirements[" reqd_work_group_size_uint64_t" ] = *ReqdWorkGroupSize;
145+ Requirements[util::PropertySetRegistry::PROPERTY_REQD_WORK_GROUP_SIZE] =
146+ *ReqdWorkGroupSize;
156147
157148 if (JointMatrix.has_value ())
158149 Requirements[" joint_matrix" ] = *JointMatrix;
0 commit comments