[all-commits] [llvm/llvm-project] 940d3e: [mlir][tosa] Create a profile validation pass for ...
TatWai Chong via All-commits
all-commits at lists.llvm.org
Mon Nov 14 17:43:44 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 940d3e08cf05bcd2779f6d3879850b2606274e3f
https://github.com/llvm/llvm-project/commit/940d3e08cf05bcd2779f6d3879850b2606274e3f
Author: TatWai Chong <tatwai.chong at arm.com>
Date: 2022-11-14 (Mon, 14 Nov 2022)
Changed paths:
M mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
M mlir/include/mlir/Dialect/Tosa/Transforms/Passes.h
M mlir/include/mlir/Dialect/Tosa/Transforms/Passes.td
M mlir/lib/Conversion/TosaToLinalg/TosaToLinalgPass.cpp
M mlir/lib/Dialect/Tosa/Transforms/CMakeLists.txt
A mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
Log Message:
-----------
[mlir][tosa] Create a profile validation pass for TOSA dialect
Add a separate validation pass to check if TOSA operations match with
the specification against given requirement. Perform profile type
checking as the initial feature in the pass.
This is an optional pass that can be enabled via command line. e.g.
$mlir-opt --tosa-validate="profile=bi" for validating against the
base inference profile.
Description:
TOSA defines a variety of operator behavior and requirements in the
specification. It would be helpful to have a separate validation pass
to keep TOSA operation input match with TOSA specification for given
criteria, and also diminish the burden of dialect validation during
compilation.
TOSA supports three profiles of which two are for inference purposes.
The main inference profile supports both integer and floating-point
data types, but the base inference profile only supports integers.
In this initial PR, validate the operations against a given profile
of TOSA, so that validation would fail if a floating point tensor is
present when the base inference profile is selected. Afterward, others
checking will be added to the pass if needed. e.g. control flow
operators and custom operators validation.
The pass is expected to be able to run on any point of TOSA dialect
conversion/transformation pipeline, and not depend on a particular
pass run ahead. So that it is can be used to validate the initial tosa
operations just converted from other dialects, the intermediate form,
or the final tosa operations output.
Change-Id: Ib58349c873c783056e89d2ab3b3312b8d2c61863
Reviewed By: rsuderman
Differential Revision: https://reviews.llvm.org/D137279
More information about the All-commits
mailing list