Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
95a0478
[docs] Don't imply that venv should be closed immediately
GMNGeoffrey Oct 25, 2021
6e825ae
Move `LoweringConfigAttr` and `TranslationInfoAttr` to `AttrDef`. (#7…
MaheshRavishankar Oct 25, 2021
f3312c8
Dump more IRs for each stage of LLVMCPUTileAndVectorizePass in debug …
hanhanW Oct 25, 2021
2ad8bd7
Fix assertion being hit by trying to dereference Block::iterator::end…
MaheshRavishankar Oct 25, 2021
1c95d1a
enable mixed-shapes testcases (#7440)
bjacob Oct 26, 2021
109fcfd
Use dataclasses and enums in generate_e2e_matmul_tests.py (#7441)
bjacob Oct 26, 2021
e1d4d53
Fix unused var in stricter compilers (#7461)
powderluv Oct 26, 2021
84b5afc
Fix Bytecode disasm to export type_def (#7460)
powderluv Oct 26, 2021
c4e0f3b
Revert "Don't outline splat constants. (#6816)" (#7462)
hcindyl Oct 26, 2021
7d53fb1
Remove direct distribution pass pipeline. (#7457)
MaheshRavishankar Oct 26, 2021
d89a5af
Allow more modern CMake policies (#7424)
GMNGeoffrey Oct 27, 2021
e13e65c
Clean up run_binary_test on android (#7466)
GMNGeoffrey Oct 27, 2021
6874719
Switching to using our own flatcc compiler library. (#7468)
benvanik Oct 27, 2021
c7d79e3
Add -lSystem and SDK path on OSX (#7471)
powderluv Oct 27, 2021
527b7a0
[NFC] Refactor benchmark suites to use parameter names (#7472)
GMNGeoffrey Oct 27, 2021
67c8d3f
Trim e2e matmul tests and share MLIR code across testcases (#7475)
bjacob Oct 27, 2021
a902a44
Avoid tie-ing input and output for dispatch from `tensor.extract_slic…
MaheshRavishankar Oct 27, 2021
19ebd9d
Enable matmul to mmt4d transformation for all types (not just f32) (#…
bjacob Oct 28, 2021
fe74bd4
Refactor CMake rules for connecting to TF binaries (#7479)
GMNGeoffrey Oct 28, 2021
18a59f7
Adding iree_make_status_with_location for cuda/vulkan statuses. (#7469)
benvanik Oct 28, 2021
7e3a374
Actually run asan on the asan build (#7483)
GMNGeoffrey Oct 28, 2021
dbdfd96
enable asserts in a majority of CMake CI builds (#7482)
bjacob Oct 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 12 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

cmake_minimum_required(VERSION 3.16.3)

# Do not set MSVC warning flags like /W3 by default (since 3.15):
# https://cmake.org/cmake/help/v3.15/policy/CMP0092.html
if(POLICY CMP0092)
cmake_policy(SET CMP0092 NEW)
endif()
cmake_minimum_required(VERSION 3.16.3...3.21)

# LLVM requires CMP0116 for tblgen: https://reviews.llvm.org/D101083
# CMP0116: Ninja generators transform `DEPFILE`s from `add_custom_command()`
Expand All @@ -37,6 +31,7 @@ endif()

option(IREE_ENABLE_RUNTIME_TRACING "Enables instrumented runtime tracing." OFF)
option(IREE_ENABLE_COMPILER_TRACING "Enables instrumented compiler tracing." OFF)
option(IREE_ENABLE_THREADING "Builds IREE in with thread library support." ON)

option(IREE_BUILD_COMPILER "Builds the IREE compiler." ON)
option(IREE_BUILD_TESTS "Builds IREE unit tests." ON)
Expand All @@ -46,10 +41,9 @@ option(IREE_BUILD_SAMPLES "Builds IREE sample projects." ON)
option(IREE_BUILD_TRACY "Builds tracy server tools." OFF)

option(IREE_BUILD_TENSORFLOW_ALL "Builds all TensorFlow compiler frontends." OFF)
option(IREE_BUILD_TENSORFLOW_COMPILER "Builds TensorFlow compiler frontend." OFF)
option(IREE_BUILD_TFLITE_COMPILER "Builds the TFLite compiler frontend." OFF)
option(IREE_BUILD_XLA_COMPILER "Builds TensorFlow XLA compiler frontend." OFF)
option(IREE_ENABLE_THREADING "Builds IREE in with thread library support." ON)
option(IREE_BUILD_TENSORFLOW_COMPILER "Builds TensorFlow compiler frontend." "${IREE_BUILD_TENSORFLOW_ALL}")
option(IREE_BUILD_TFLITE_COMPILER "Builds the TFLite compiler frontend." "${IREE_BUILD_TENSORFLOW_ALL}")
option(IREE_BUILD_XLA_COMPILER "Builds TensorFlow XLA compiler frontend." "${IREE_BUILD_TENSORFLOW_ALL}")

set(IREE_HAL_DRIVERS_TO_BUILD "all"
CACHE STRING "Semicolon-separated list of HAL drivers to build, or \"all\".")
Expand All @@ -72,15 +66,12 @@ if(${IREE_BUILD_TENSORFLOW_ALL} OR
set(IREE_ENABLE_TENSORFLOW ON)
endif()


option(IREE_BUILD_BINDINGS_TFLITE "Builds the IREE TFLite C API compatibility shim" ON)
option(IREE_BUILD_BINDINGS_TFLITE_JAVA "Builds the IREE TFLite Java bindings with the C API compatibility shim" ON)

# Default python bindings to enabled for some features.
if(${IREE_ENABLE_TENSORFLOW})
option(IREE_BUILD_PYTHON_BINDINGS "Builds the IREE python bindings" ON)
else()
option(IREE_BUILD_PYTHON_BINDINGS "Builds the IREE python bindings" OFF)
endif()
option(IREE_BUILD_PYTHON_BINDINGS "Builds the IREE python bindings" "${IREE_ENABLE_TENSORFLOW}")

#-------------------------------------------------------------------------------
# Experimental project flags
Expand Down Expand Up @@ -440,17 +431,17 @@ if(IREE_ENABLE_THREADING)
add_subdirectory(third_party/cpuinfo EXCLUDE_FROM_ALL)
endif()

iree_set_flatcc_cmake_options()
add_subdirectory(build_tools/third_party/flatcc EXCLUDE_FROM_ALL)
add_subdirectory(third_party/flatcc EXCLUDE_FROM_ALL)

add_subdirectory(third_party/vulkan_headers EXCLUDE_FROM_ALL)

# TODO(scotttodd): Iterate some more and find a better place for this.
if (NOT CMAKE_CROSSCOMPILING)
install(TARGETS iree-flatcc-cli
COMPONENT iree-flatcc-cli
RUNTIME DESTINATION bin)
install(
TARGETS iree-flatcc-cli
COMPONENT iree-flatcc-cli
RUNTIME DESTINATION bin
)
endif()

if(IREE_BUILD_COMPILER)
Expand Down
85 changes: 50 additions & 35 deletions benchmarks/TFLite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,52 @@

################################################################################
# #
# Benchmark models for Tosa #
# Benchmark models from TFLite #
# #
# Each module specification should be a list that contains the following #
# fields: MODULE_NAME, MODULE_TAGS, MLIR_SOURCE, ENTRY_FUNCTION, #
# FUNCTION_INPUTS. See iree_mlir_benchmark_suite definition for details about #
# these fields. #
# Each module specification should be a list containing alternating keys and #
# values. The fields are: NAME, TAGS, MLIR_SOURCE, ENTRY_FUNCTION, and #
# FUNCTION_INPUTS. See the iree_mlir_benchmark_suite definition for details #
# about these fields. #
# #
################################################################################

set(DEEPLABV3_FP32_MODULE
"DeepLabV3" # MODULE_NAME
"fp32" # MODULE_TAGS
"https://storage.googleapis.com/iree-model-artifacts/DeepLabV3-2bcafb1.tar.gz" # MLIR_SOURCE
"main" # ENTRY_FUNCTION
"1x257x257x3xf32" # FUNCTION_INPUTS
NAME
"DeepLabV3"
TAGS
"fp32"
MLIR_SOURCE
"https://storage.googleapis.com/iree-model-artifacts/DeepLabV3-2bcafb1.tar.gz"
ENTRY_FUNCTION
"main"
FUNCTION_INPUTS
"1x257x257x3xf32"
)

set(MOBILESSD_FP32_MODULE
"MobileSSD" # MODULE_NAME
"fp32" # MODULE_TAGS
"https://storage.googleapis.com/iree-model-artifacts/MobileSSD-2bcafb1.tar.gz" # MLIR_SOURCE
"main" # ENTRY_FUNCTION
"1x320x320x3xf32" # FUNCTION_INPUTS
NAME
"MobileSSD"
TAGS
"fp32"
MLIR_SOURCE
"https://storage.googleapis.com/iree-model-artifacts/MobileSSD-2bcafb1.tar.gz"
ENTRY_FUNCTION
"main"
FUNCTION_INPUTS
"1x320x320x3xf32"
)

set(POSENET_FP32_MODULE
"PoseNet" # MODULE_NAME
"fp32" # MODULE_TAGS
"https://storage.googleapis.com/iree-model-artifacts/PoseNet-2bcafb1.tar.gz" # MLIR_SOURCE
"main" # ENTRY_FUNCTION
"1x353x257x3xf32" # FUNCTION_INPUTS
NAME
"PoseNet"
TAGS
"fp32"
MLIR_SOURCE
"https://storage.googleapis.com/iree-model-artifacts/PoseNet-2bcafb1.tar.gz"
ENTRY_FUNCTION
"main"
FUNCTION_INPUTS
"1x353x257x3xf32"
)

################################################################################
Expand All @@ -53,9 +68,9 @@ set(POSENET_FP32_MODULE
# CPU, Dylib-Sync, big/little-core, full-inference
iree_mlir_benchmark_suite(
MODULES
${DEEPLABV3_FP32_MODULE}
${MOBILESSD_FP32_MODULE}
${POSENET_FP32_MODULE}
"${DEEPLABV3_FP32_MODULE}"
"${MOBILESSD_FP32_MODULE}"
"${POSENET_FP32_MODULE}"

BENCHMARK_MODES
"big-core,full-inference"
Expand All @@ -77,9 +92,9 @@ iree_mlir_benchmark_suite(
# CPU, Dylib, 1-thread, big/little-core, full-inference
iree_mlir_benchmark_suite(
MODULES
${DEEPLABV3_FP32_MODULE}
${MOBILESSD_FP32_MODULE}
${POSENET_FP32_MODULE}
"${DEEPLABV3_FP32_MODULE}"
"${MOBILESSD_FP32_MODULE}"
"${POSENET_FP32_MODULE}"

BENCHMARK_MODES
"1-thread,big-core,full-inference"
Expand All @@ -102,9 +117,9 @@ iree_mlir_benchmark_suite(
# GPU, Vulkan, Adreno, full-inference
iree_mlir_benchmark_suite(
MODULES
${DEEPLABV3_FP32_MODULE}
${MOBILESSD_FP32_MODULE}
${POSENET_FP32_MODULE}
"${DEEPLABV3_FP32_MODULE}"
"${MOBILESSD_FP32_MODULE}"
"${POSENET_FP32_MODULE}"

BENCHMARK_MODES
"full-inference"
Expand All @@ -124,9 +139,9 @@ iree_mlir_benchmark_suite(
# GPU, Vulkan, Mali, full-inference
iree_mlir_benchmark_suite(
MODULES
${DEEPLABV3_FP32_MODULE}
${MOBILESSD_FP32_MODULE}
${POSENET_FP32_MODULE}
"${DEEPLABV3_FP32_MODULE}"
"${MOBILESSD_FP32_MODULE}"
"${POSENET_FP32_MODULE}"

BENCHMARK_MODES
"full-inference"
Expand All @@ -146,9 +161,9 @@ iree_mlir_benchmark_suite(
# GPU, Vulkan, Mali, kernel-execution
iree_mlir_benchmark_suite(
MODULES
${DEEPLABV3_FP32_MODULE}
${MOBILESSD_FP32_MODULE}
${POSENET_FP32_MODULE}
"${DEEPLABV3_FP32_MODULE}"
"${MOBILESSD_FP32_MODULE}"
"${POSENET_FP32_MODULE}"

BENCHMARK_MODES
"kernel-execution"
Expand Down
Loading