diff options
Diffstat (limited to 'src/backends/backendsCommon/WorkloadData.cpp')
-rw-r--r-- | src/backends/backendsCommon/WorkloadData.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/backends/backendsCommon/WorkloadData.cpp b/src/backends/backendsCommon/WorkloadData.cpp index 4b0b84a73d..109aeb963a 100644 --- a/src/backends/backendsCommon/WorkloadData.cpp +++ b/src/backends/backendsCommon/WorkloadData.cpp @@ -669,6 +669,11 @@ void StackQueueDescriptor::Validate(const WorkloadInfo& workloadInfo) const } } + if (inputShape.GetNumDimensions() > 4) + { + throw InvalidArgumentException(descriptorName + ": Input tensor may have up to 4 dimensions."); + } + // m_Axis is 0-based and may take values from 0 to the number of input dimensions (inclusive), // since the output tensor has an additional dimension. if (m_Parameters.m_Axis > inputShape.GetNumDimensions()) @@ -703,6 +708,11 @@ void StackQueueDescriptor::Validate(const WorkloadInfo& workloadInfo) const } } + if (outputShape.GetNumDimensions() > 5) + { + throw InvalidArgumentException(descriptorName + ": Output tensor may have up to 5 dimensions."); + } + // Check the supported data types std::vector<DataType> supportedTypes = { |