mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Updating zeinfo decoder
Change-Id: Ib07b58e628e866af6e5368c6856dc9ebf0985aa7
This commit is contained in:
committed by
sys_ocldev
parent
ba4dd9f866
commit
2a41911166
@@ -122,8 +122,10 @@ static constexpr ConstStringRef addrspace("addrspace");
|
||||
static constexpr ConstStringRef accessType("access_type");
|
||||
namespace ArgType {
|
||||
static constexpr ConstStringRef localSize("local_size");
|
||||
static constexpr ConstStringRef groupSize("group_size");
|
||||
static constexpr ConstStringRef groupCount("group_count");
|
||||
static constexpr ConstStringRef globalIdOffset("global_id_offset");
|
||||
static constexpr ConstStringRef globalSize("global_size");
|
||||
static constexpr ConstStringRef enqueuedLocalSize("enqueued_local_size");
|
||||
static constexpr ConstStringRef privateBaseStateless("private_base_stateless");
|
||||
static constexpr ConstStringRef argByvalue("arg_byvalue");
|
||||
static constexpr ConstStringRef argBypointer("arg_bypointer");
|
||||
@@ -242,7 +244,9 @@ enum ArgType : uint8_t {
|
||||
ArgTypePackedLocalIds = 1,
|
||||
ArgTypeLocalId,
|
||||
ArgTypeLocalSize,
|
||||
ArgTypeGroupSize,
|
||||
ArgTypeGroupCount,
|
||||
ArgTypeGlobalSize,
|
||||
ArgTypeEnqueuedLocalSize,
|
||||
ArgTypeGlobalIdOffset,
|
||||
ArgTypePrivateBaseStateless,
|
||||
ArgTypeArgByvalue,
|
||||
|
||||
@@ -203,8 +203,12 @@ bool readEnumChecked(const Yaml::Token *token, NEO::Elf::ZebinKernelMetadata::Ty
|
||||
out = ArgTypeT::ArgTypeLocalId;
|
||||
} else if (tokenValue == PayloadArgument::ArgType::localSize) {
|
||||
out = ArgTypeT::ArgTypeLocalSize;
|
||||
} else if (tokenValue == PayloadArgument::ArgType::groupSize) {
|
||||
out = ArgTypeT::ArgTypeGroupSize;
|
||||
} else if (tokenValue == PayloadArgument::ArgType::groupCount) {
|
||||
out = ArgTypeT::ArgTypeGroupCount;
|
||||
} else if (tokenValue == PayloadArgument::ArgType::globalSize) {
|
||||
out = ArgTypeT::ArgTypeGlobalSize;
|
||||
} else if (tokenValue == PayloadArgument::ArgType::enqueuedLocalSize) {
|
||||
out = ArgTypeT::ArgTypeEnqueuedLocalSize;
|
||||
} else if (tokenValue == PayloadArgument::ArgType::globalIdOffset) {
|
||||
out = ArgTypeT::ArgTypeGlobalIdOffset;
|
||||
} else if (tokenValue == PayloadArgument::ArgType::privateBaseStateless) {
|
||||
@@ -569,13 +573,28 @@ NEO::DecodeError populateArgDescriptor(const NEO::Elf::ZebinKernelMetadata::Type
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NEO::Elf::ZebinKernelMetadata::Types::Kernel::ArgTypeGroupSize: {
|
||||
case NEO::Elf::ZebinKernelMetadata::Types::Kernel::ArgTypeGroupCount: {
|
||||
using GroupSizeT = uint32_t;
|
||||
if (false == setVecArgIndicesBasedOnSize<GroupSizeT>(dst.payloadMappings.dispatchTraits.numWorkGroups, src.size, src.offset)) {
|
||||
{
|
||||
outErrReason.append("DeviceBinaryFormat::Zebin : Invalid size for argument of type " + NEO::Elf::ZebinKernelMetadata::Tags::Kernel::PayloadArgument::ArgType::groupSize.str() + " in context of : " + dst.kernelMetadata.kernelName + ". Expected 4 or 8 or 12. Got : " + std::to_string(src.size) + "\n");
|
||||
return DecodeError::InvalidBinary;
|
||||
}
|
||||
outErrReason.append("DeviceBinaryFormat::Zebin : Invalid size for argument of type " + NEO::Elf::ZebinKernelMetadata::Tags::Kernel::PayloadArgument::ArgType::groupCount.str() + " in context of : " + dst.kernelMetadata.kernelName + ". Expected 4 or 8 or 12. Got : " + std::to_string(src.size) + "\n");
|
||||
return DecodeError::InvalidBinary;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NEO::Elf::ZebinKernelMetadata::Types::Kernel::ArgTypeGlobalSize: {
|
||||
using GroupSizeT = uint32_t;
|
||||
if (false == setVecArgIndicesBasedOnSize<GroupSizeT>(dst.payloadMappings.dispatchTraits.globalWorkSize, src.size, src.offset)) {
|
||||
outErrReason.append("DeviceBinaryFormat::Zebin : Invalid size for argument of type " + NEO::Elf::ZebinKernelMetadata::Tags::Kernel::PayloadArgument::ArgType::globalSize.str() + " in context of : " + dst.kernelMetadata.kernelName + ". Expected 4 or 8 or 12. Got : " + std::to_string(src.size) + "\n");
|
||||
return DecodeError::InvalidBinary;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case NEO::Elf::ZebinKernelMetadata::Types::Kernel::ArgTypeEnqueuedLocalSize: {
|
||||
using GroupSizeT = uint32_t;
|
||||
if (false == setVecArgIndicesBasedOnSize<GroupSizeT>(dst.payloadMappings.dispatchTraits.enqueuedLocalWorkSize, src.size, src.offset)) {
|
||||
outErrReason.append("DeviceBinaryFormat::Zebin : Invalid size for argument of type " + NEO::Elf::ZebinKernelMetadata::Tags::Kernel::PayloadArgument::ArgType::enqueuedLocalSize.str() + " in context of : " + dst.kernelMetadata.kernelName + ". Expected 4 or 8 or 12. Got : " + std::to_string(src.size) + "\n");
|
||||
return DecodeError::InvalidBinary;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user