From bc72ba8ec128dc8c851455300085961d6e716959 Mon Sep 17 00:00:00 2001 From: Dominic Symes Date: Mon, 24 Apr 2023 17:08:02 +0100 Subject: Move the tensor size limit into the level range definition The tensor size in bytes must fit within the level defined size range. Signed-off-by: Dominic Symes Change-Id: I131e3aa7e8666b4d0093ae8198367f243081da51 --- chapters/introduction.adoc | 10 ++++++---- tools/tosa.py | 1 + tosa.xml | 4 ++-- tosa.xsd | 2 ++ 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/chapters/introduction.adoc b/chapters/introduction.adoc index b1d92d9..f3a6454 100644 --- a/chapters/introduction.adoc +++ b/chapters/introduction.adoc @@ -331,11 +331,13 @@ Tensor elements are addressed using dim_t values, where each element of the vect ==== Tensor size limit -The tensor overall size in elements is limited by the data type size_t. -In this version of the specification, size_t is defined as an unsigned 32-bit integer representing size from 1 to (1<<32) - 1. +The tensor overall size is limited by the data type size_t. +This type must be able to hold integers in the range 0 to (1++<<++(MAX_LOG2_SIZE+1)) - 1 where MAX_LOG2_SIZE is defined in <>. +For each tensor, the number of tensor elements multiplied by the element size in bytes (which is taken to be 1 for elements smaller than a 8-bit) must be less than or equal to (1<<(MAX_LOG2_SIZE+1)) - 1. + The size of tensors along each of their dimensions is limited by the data type index_t. -In this version of the specification, index_t is defined as a signed 32-bit integer. -This means that the maximum size of a tensor along each dimension is (1<<31) - 1 and therefore the maximum coordinate value is (1<<31) - 2. +This type must be able to hold integers in the range 0 to (1++<<++MAX_LOG2_SIZE) - 1 where MAX_LOG2_SIZE is defined in <>. +This means that the maximum size of a tensor along each dimension is (1<Main Training - No level - Level 8K + No level + Level 8K diff --git a/tosa.xsd b/tosa.xsd index 8c1e2b5..ca99a8e 100644 --- a/tosa.xsd +++ b/tosa.xsd @@ -24,6 +24,7 @@ + @@ -95,6 +96,7 @@ + -- cgit v1.2.1