mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +08:00
feature: Define thread group dispatch size according to kernel metadata
Related-To: NEO-10945 Signed-off-by: Vysochyn, Illia <illia.vysochyn@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e0362a7c39
commit
f99a4c2193
@@ -126,6 +126,18 @@ void populateKernelDescriptor(KernelDescriptor &dst, const SPatchKernelAttribute
|
||||
}
|
||||
}
|
||||
|
||||
constexpr ConstStringRef attributeReqdThreadGroupDispatchSizeBeg = "intel_reqd_thread_group_dispatch_size(";
|
||||
it = attributes.find(attributeReqdThreadGroupDispatchSizeBeg.begin());
|
||||
if (it != std::string::npos) {
|
||||
it += attributeReqdThreadGroupDispatchSizeBeg.size();
|
||||
dst.kernelMetadata.requiredThreadGroupDispatchSize = 0U;
|
||||
while ((attributes[it] >= '0') && (attributes[it] <= '9')) {
|
||||
dst.kernelMetadata.requiredThreadGroupDispatchSize *= 10;
|
||||
dst.kernelMetadata.requiredThreadGroupDispatchSize += attributes[it] - '0';
|
||||
++it;
|
||||
}
|
||||
}
|
||||
|
||||
constexpr ConstStringRef invalidKernelAttrBeg = "invalid_kernel(";
|
||||
dst.kernelAttributes.flags.isInvalid = (attributes.find(invalidKernelAttrBeg.data()) != std::string::npos);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user