[all-commits] [llvm/llvm-project] 11468c: [mlir][tosa] Add profile-based operation validatio...

TatWai Chong via All-commits all-commits at lists.llvm.org
Thu Feb 20 11:47:22 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 11468c3b072c111a69290852e1157e1f30e853c3
      https://github.com/llvm/llvm-project/commit/11468c3b072c111a69290852e1157e1f30e853c3
  Author: TatWai Chong <78814694+tatwaichong at users.noreply.github.com>
  Date:   2025-02-20 (Thu, 20 Feb 2025)

  Changed paths:
    M mlir/include/mlir/Conversion/TosaToLinalg/TosaToLinalg.h
    M mlir/include/mlir/Dialect/Tosa/IR/CMakeLists.txt
    A mlir/include/mlir/Dialect/Tosa/IR/TargetEnv.h
    A mlir/include/mlir/Dialect/Tosa/IR/TosaComplianceData.h
    M mlir/include/mlir/Dialect/Tosa/IR/TosaOpBase.td
    M mlir/include/mlir/Dialect/Tosa/IR/TosaOps.h
    M mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
    A mlir/include/mlir/Dialect/Tosa/IR/TosaProfileCompliance.h
    M mlir/include/mlir/Dialect/Tosa/IR/TosaShapeOps.td
    M mlir/include/mlir/Dialect/Tosa/IR/TosaUtilOps.td
    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/CMakeLists.txt
    M mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
    M mlir/lib/Dialect/Tosa/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
    M mlir/lib/Dialect/Tosa/Transforms/TosaValidation.cpp
    A mlir/test/Dialect/Tosa/availability.mlir
    M mlir/test/Dialect/Tosa/invalid.mlir
    A mlir/test/Dialect/Tosa/invalid_extension.mlir
    M mlir/test/Dialect/Tosa/level_check.mlir
    A mlir/test/Dialect/Tosa/profile_all_unsupported.mlir
    A mlir/test/Dialect/Tosa/profile_pro_fp_unsupported.mlir
    A mlir/test/Dialect/Tosa/profile_pro_int_unsupported.mlir
    M mlir/test/lib/Dialect/Tosa/CMakeLists.txt
    A mlir/test/lib/Dialect/Tosa/TestAvailability.cpp
    M mlir/tools/mlir-opt/mlir-opt.cpp
    M mlir/tools/mlir-tblgen/CMakeLists.txt
    A mlir/tools/mlir-tblgen/TosaUtilsGen.cpp
    M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel

  Log Message:
  -----------
  [mlir][tosa] Add profile-based operation validation (#126992)

TOSA MLIR profile-based validation is designed to identify the
profile/extension requirements for each operation in TOSA MLIR graph,
ensuring that TOSA operators conform to the profiles and extensions
enabled by the target implementation.

The available profiles/extensions are reflected in the availability
property attached to each TOSA operator in the dialect. The design of
availability, the profile/extension classes, and their interface, is
inspired by the SPIRV implementation.

This patch includes the following changes:
- Introduces profile and extension knowledge within the dialect and
establishes an interface to query this information.
 - Implements profile-based validation logic in the pass.
- Adds a TargetEnv class that represents the capabilities enabled in the
target implementation, such as profiles, extensions, and levels.
- Adds a set of tests to ensure that profile and extension requirements
are properly attached to the operations and that validation correctly
verifies the requirements of a given operation against the target
implementation.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list