| # Copyright 2023 The IREE Authors | |
| # | |
| # Licensed under the Apache License v2.0 with LLVM Exceptions. | |
| # See https://llvm.org/LICENSE.txt for license information. | |
| # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |
| load("//build_tools/bazel:build_defs.oss.bzl", "iree_compiler_cc_test") | |
| load("//build_tools/bazel:enforce_glob.bzl", "enforce_glob") | |
| load("//build_tools/bazel:iree_lit_test.bzl", "iree_lit_test_suite") | |
| package( | |
| features = ["layering_check"], | |
| licenses = ["notice"], # Apache 2.0 | |
| ) | |
| iree_lit_test_suite( | |
| name = "lit", | |
| srcs = enforce_glob( | |
| # keep sorted | |
| [ | |
| "auto_input_conversion.mlir", | |
| "canonicalize_dynamism.mlir", | |
| "canonicalize_dynamism_invalid.mlir", | |
| "convert_collectives.mlir", | |
| "legalize_chlo_decomposition.mlir", | |
| "legalize_chlo_no_broadcast.mlir", | |
| "legalize_chlo_with_broadcast.mlir", | |
| "legalize_composite.mlir", | |
| "legalize_control_flow.mlir", | |
| "legalize_shape_computations.mlir", | |
| "lower_bounds_pipeline.mlir", | |
| "lower_bounds_tuple.mlir", | |
| "stablehlo_custom_calls.mlir", | |
| "stablehlo_to_iree_input_dialects.mlir", | |
| "stablehlo_to_linalg_ext.mlir", | |
| "verify_compiler_input_legality.mlir", | |
| "vhlo_stablehlo_mix_invalid.mlir", | |
| ], | |
| include = ["*.mlir"], | |
| ), | |
| cfg = "//compiler:lit.cfg.py", | |
| tools = [ | |
| "//tools:iree-compile", | |
| "//tools:iree-opt", | |
| "@llvm-project//llvm:FileCheck", | |
| ], | |
| ) | |
| iree_compiler_cc_test( | |
| name = "TargetRegistryTest", | |
| testonly = True, | |
| srcs = ["TargetRegistryTest.cpp"], | |
| deps = [ | |
| "//compiler/plugins/input/StableHLO/Conversion:TargetRegistry", | |
| "//compiler/src/iree/testing:gtest_main", | |
| "@com_google_googletest//:gtest", | |
| "@llvm-project//llvm:Support", | |
| "@llvm-project//mlir:ArithDialect", | |
| "@llvm-project//mlir:AsmParser", | |
| "@llvm-project//mlir:FuncDialect", | |
| "@llvm-project//mlir:IR", | |
| "@llvm-project//mlir:Parser", | |
| "@llvm-project//mlir:Pass", | |
| "@llvm-project//mlir:TransformUtils", | |
| "@llvm-project//mlir:Transforms", | |
| "@stablehlo//:stablehlo_ops", | |
| "@stablehlo//:stablehlo_passes", | |
| ], | |
| ) | |
| iree_compiler_cc_test( | |
| name = "CustomCallAndCompositePreprocessingTest", | |
| testonly = True, | |
| srcs = ["CustomCallAndCompositePreprocessingTest.cpp"], | |
| deps = [ | |
| "//compiler/plugins/input/StableHLO/Conversion", | |
| "//compiler/plugins/input/StableHLO/Conversion:CustomCallAndCompositePreprocessing", | |
| "//compiler/plugins/input/StableHLO/Conversion:CustomCallMetadata", | |
| "//compiler/plugins/input/StableHLO/Conversion:TargetRegistry", | |
| "//compiler/src/iree/testing:gtest_main", | |
| "@com_google_googletest//:gtest", | |
| "@llvm-project//mlir:ArithDialect", | |
| "@llvm-project//mlir:FuncDialect", | |
| "@llvm-project//mlir:IR", | |
| "@llvm-project//mlir:Parser", | |
| "@llvm-project//mlir:Pass", | |
| "@stablehlo//:stablehlo_ops", | |
| "@stablehlo//:stablehlo_passes", | |
| ], | |
| ) | |
| iree_compiler_cc_test( | |
| name = "TargetPipelineTest", | |
| testonly = True, | |
| srcs = ["TargetPipelineTest.cpp"], | |
| deps = [ | |
| "//compiler/plugins/input/StableHLO/Conversion", | |
| "//compiler/plugins/input/StableHLO/Conversion:CustomCallAndCompositePreprocessing", | |
| "//compiler/plugins/input/StableHLO/Conversion:CustomCallMetadata", | |
| "//compiler/plugins/input/StableHLO/Conversion:TargetRegistry", | |
| "//compiler/src/iree/compiler/Dialect/HAL/Target", | |
| "//compiler/src/iree/compiler/Pipelines", | |
| "//compiler/src/iree/compiler/Pipelines:Options", | |
| "//compiler/src/iree/compiler/PluginAPI", | |
| "//compiler/src/iree/testing:gtest_main", | |
| "@com_google_googletest//:gtest", | |
| "@llvm-project//llvm:Support", | |
| "@llvm-project//mlir:ArithDialect", | |
| "@llvm-project//mlir:ControlFlowDialect", | |
| "@llvm-project//mlir:FuncDialect", | |
| "@llvm-project//mlir:FuncExtensions", | |
| "@llvm-project//mlir:IR", | |
| "@llvm-project//mlir:Parser", | |
| "@llvm-project//mlir:Pass", | |
| "@llvm-project//mlir:SCFDialect", | |
| "@llvm-project//mlir:TensorDialect", | |
| "@llvm-project//mlir:Transforms", | |
| "@stablehlo//:stablehlo_ops", | |
| "@stablehlo//:stablehlo_passes", | |
| ], | |
| ) |