Add DIM operator and operations on shape_t values

Shape inference derives the shape of tensors in
the graph from input shapes. Operations such as RESHAPE
may need calculations to derive the new tensor shape.
This patch:

- Adds a DIM operator to get the size of a tensor in
  a given axis as a rank 0 tensor of type shape_t

- Allows RESHAPE to take a 1D shape tensor as input for
  the new shape

- Allows RESIZE, TILE, PAD to take input sizes based
  on shape tensors.

- Allows ADD, SUB, MUL, INTDIV to operate on rank 0
  shape_t tensors

- Allows CONCAT to concatenate 0D shape_t tensors to
  a 1D shape_t tensor

- Adds CONST support for shape_t tensors

In this version of the specification shape tensors must
be resolvable to constants at backend compile time.

Signed-off-by: Dominic Symes <dominic.symes@arm.com>
Change-Id: I484bd44452453b5e05d0d8a82689564587b224e4
6 files changed
tree: 971d15dc6ae00118d7be2df9a50dd7445d8428d9
  1. .gitignore
  2. .pre-commit-config.yaml
  3. Makefile
  4. README.md
  5. chapters/
  6. figures/
  7. tools/
  8. tosa.css
  9. tosa.xml
  10. tosa.xsd
  11. tosa_spec.adoc
README.md

TOSA Specification Repository

This repository contains the source files for the TOSA specification. See the specification itself for details on the purpose and definition of the specification.

Build requirements

The TOSA specification is written in asciidoc format, and has been built using the following tools:

  • Asciidoctor 1.5.5 or later (Asciidoctor)
  • Asciidoctor-pdf
  • GNU Make 4.1 or later
  • xmllint
  • Python 3.8 or later

The default make build creates both an html and a pdf version of the specification in out/html and out/pdf

If only an html build is required, make html will build only the html file, and asciidoctor-pdf is not needed.

If only a pdf build is required, make pdf will build only the pdf.