blob: 62a76beb647ba749fa3f9ea0be0e780ec0ff51df [file] [log] [blame]
# Copyright 2020 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
# Smoke tests for the execution of tool binaries.
load("@rules_python//python:defs.bzl", "py_binary")
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
)
py_binary(
name = "python_with_numpy",
srcs = ["python_with_numpy.py"],
deps = ["@pip//numpy"],
)
iree_lit_test_suite(
name = "lit",
timeout = "moderate",
srcs = enforce_glob(
[
"benchmark_flags.txt",
"compile_pipelines.mlir",
"compile_flags.mlir",
"compile_to_continuation.mlir",
"compile_to_phase.mlir",
"executable_benchmarks.mlir",
"executable_configurations.mlir",
"executable_sources.mlir",
"iree-benchmark-executable.mlir",
"iree-compile-help.txt",
"iree-benchmark-module.mlir",
"iree-convert-parameters.txt",
"iree-dump-parameters.txt",
"iree-link-bundle.mlir",
"iree-link.mlir",
"iree-run-mlir.mlir",
"iree-run-module-expected.mlir",
"iree-run-module-inputs.mlir",
"iree-run-module-multi.mlir",
"iree-run-module-outputs.mlir",
"iree-run-module.mlir",
"iree-tblgen-json.td",
"iree-run-module-in-place.mlir",
"multiple_args.mlir",
"multiple_exported_functions.mlir",
"null_values.mlir",
"parameters_scoped.mlir",
"parameters_unscoped.mlir",
"repeated_return.mlir",
"scalars.mlir",
],
include = [
"*.mlir",
"*.td",
"*.txt",
],
exclude = [
"iree-link-anonymous.mlir",
"iree-link-globals-a.mlir",
"iree-link-globals-b.mlir",
"iree-link-globals-c.mlir",
"iree-link-module-a.mlir",
"iree-link-module-b.mlir",
"iree-link-module-c.mlir",
],
),
cfg = "//tools:lit.cfg.py",
data = [
"echo_npy.py",
"iree-link-anonymous.mlir",
"iree-link-globals-a.mlir",
"iree-link-globals-b.mlir",
"iree-link-globals-c.mlir",
"iree-link-module-a.mlir",
"iree-link-module-b.mlir",
"iree-link-module-c.mlir",
"parameters_a.safetensors",
"parameters_b.safetensors",
# For iree-tblgen tests:
"//compiler/src/iree/compiler/Utils:td_files",
"@llvm-project//mlir:OpBaseTdFiles",
],
env = {
"PYTHON": "python_with_numpy",
},
tags = [
"driver=local-task",
"hostonly",
],
tools = [
":python_with_numpy",
"//tools:iree-benchmark-executable",
"//tools:iree-benchmark-module",
"//tools:iree-compile",
"//tools:iree-convert-parameters",
"//tools:iree-dump-parameters",
"//tools:iree-link",
"//tools:iree-opt",
"//tools:iree-run-mlir",
"//tools:iree-run-module",
"//tools:iree-tblgen",
"@llvm-project//lld",
"@llvm-project//llvm:FileCheck",
"@llvm-project//llvm:not",
],
)