Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate llvm-project at 063c42e919c0 #14725

Merged
merged 14 commits into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 12 additions & 10 deletions build_tools/python/benchmark_suites/iree/adreno_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,13 @@ def generate(
self,
) -> List[iree_definitions.E2EModelRunConfig]:
default_models = [
tflite_models.DEEPLABV3_FP32,
tflite_models.MOBILESSD_FP32,
tflite_models.POSENET_FP32,
tflite_models.MOBILEBERT_FP32,
tflite_models.MOBILENET_V2,
tflite_models.MOBILENET_V3SMALL,
# TODO(#14775): Re-enable the benchmarks.
# tflite_models.DEEPLABV3_FP32,
# tflite_models.MOBILESSD_FP32,
# tflite_models.POSENET_FP32,
# tflite_models.MOBILEBERT_FP32,
# tflite_models.MOBILENET_V2,
# tflite_models.MOBILENET_V3SMALL,
]
default_gen_configs = [
iree_definitions.ModuleGenerationConfig.build(
Expand All @@ -72,10 +73,11 @@ def generate(
imported_model=iree_definitions.ImportedModel.from_model(model),
)
for model in [
tflite_models.MOBILESSD_FP32,
tflite_models.POSENET_FP32,
tflite_models.MOBILENET_V2,
tflite_models.MOBILENET_V3SMALL,
# TODO(#14775): Re-enable the benchmarks.
# tflite_models.MOBILESSD_FP32,
# tflite_models.POSENET_FP32,
# tflite_models.MOBILENET_V2,
# tflite_models.MOBILENET_V3SMALL,
]
]

Expand Down
17 changes: 10 additions & 7 deletions build_tools/python/benchmark_suites/iree/armv8_a_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,18 @@
class Android_ARMv8_A_Benchmarks(object):
"""Benchmarks on ARMv8-A Android devices."""

# TODO(#14775): Re-enable the benchmarks.
NONQUANT_MODELS = [
tflite_models.DEEPLABV3_FP32,
tflite_models.MOBILESSD_FP32,
tflite_models.POSENET_FP32,
tflite_models.MOBILEBERT_FP32,
tflite_models.MOBILENET_V2,
tflite_models.MOBILENET_V3SMALL,
# tflite_models.DEEPLABV3_FP32,
# tflite_models.MOBILESSD_FP32,
# tflite_models.POSENET_FP32,
# tflite_models.MOBILEBERT_FP32,
# tflite_models.MOBILENET_V2,
# tflite_models.MOBILENET_V3SMALL,
]
QUANT_MODELS = [
# tflite_models.MOBILEBERT_INT8
]
QUANT_MODELS = [tflite_models.MOBILEBERT_INT8]

ARMV8_A_CPU_TARGET = iree_definitions.CompileTarget(
target_architecture=common_definitions.DeviceArchitecture.ARMV8_2_A_GENERIC,
Expand Down
23 changes: 13 additions & 10 deletions build_tools/python/benchmark_suites/iree/mali_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,22 @@ class Android_Mali_Benchmarks(object):
)
EXPERIMENTAL_REPEATED_KERNEL_RUN_FLAGS = ["--batch_size=32"]

# TODO(#14775): Re-enable the benchmarks.
FP32_MODELS = [
tflite_models.DEEPLABV3_FP32,
tflite_models.MOBILESSD_FP32,
tflite_models.POSENET_FP32,
tflite_models.MOBILEBERT_FP32,
tflite_models.MOBILENET_V2,
tflite_models.MOBILENET_V3SMALL,
# tflite_models.DEEPLABV3_FP32,
# tflite_models.MOBILESSD_FP32,
# tflite_models.POSENET_FP32,
# tflite_models.MOBILEBERT_FP32,
# tflite_models.MOBILENET_V2,
# tflite_models.MOBILENET_V3SMALL,
]
FP16_MODELS = [
# tflite_models.MOBILEBERT_FP16
]
FP16_MODELS = [tflite_models.MOBILEBERT_FP16]
QUANT_MODELS = [
tflite_models.MOBILEBERT_INT8,
tflite_models.EFFICIENTNET_INT8,
tflite_models.PERSON_DETECT_INT8,
# tflite_models.MOBILEBERT_INT8,
# tflite_models.EFFICIENTNET_INT8,
# tflite_models.PERSON_DETECT_INT8,
]

def generate(
Expand Down
20 changes: 11 additions & 9 deletions build_tools/python/benchmark_suites/iree/riscv_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ class Linux_RV64_Benchmarks(object):
compile_targets=[RV64_CPU_TARGET],
)
MODELS = [
tflite_models.DEEPLABV3_FP32,
tflite_models.MOBILEBERT_FP32,
tflite_models.MOBILENET_V1,
tflite_models.MOBILEBERT_INT8,
tflite_models.PERSON_DETECT_INT8,
tflite_models.EFFICIENTNET_INT8,
# TODO(#14775): Re-enable the benchmarks.
# tflite_models.DEEPLABV3_FP32,
# tflite_models.MOBILEBERT_FP32,
# tflite_models.MOBILENET_V1,
# tflite_models.MOBILEBERT_INT8,
# tflite_models.PERSON_DETECT_INT8,
# tflite_models.EFFICIENTNET_INT8,
tflite_models.MOBILENET_V2_INT8,
]

Expand Down Expand Up @@ -71,9 +72,10 @@ class Linux_RV32_Benchmarks(object):
compile_targets=[RV32_CPU_TARGET],
)
MODELS = [
tflite_models.EFFICIENTNET_INT8,
tflite_models.MOBILEBERT_INT8,
tflite_models.PERSON_DETECT_INT8,
# TODO(#14775): Re-enable the benchmarks.
# tflite_models.EFFICIENTNET_INT8,
# tflite_models.MOBILEBERT_INT8,
# tflite_models.PERSON_DETECT_INT8,
tflite_models.MOBILENET_V2_INT8,
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ def generate(
compile_config=self.EXPERIMENTAL_COMPILE_CONFIG,
imported_model=iree_definitions.ImportedModel.from_model(model),
)
for model in [tflite_models.MOBILENET_V2, tflite_models.MOBILENET_V3SMALL]
for model in [
# TODO(#14775): Re-enable the benchmarks.
# tflite_models.MOBILENET_V2,
# tflite_models.MOBILENET_V3SMALL
]
]
default_execution_configs = [
module_execution_configs.get_vmvx_system_scheduling_local_task_config(
Expand Down
98 changes: 51 additions & 47 deletions build_tools/python/e2e_model_tests/test_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,54 +63,58 @@ class ModelTestConfig(object):

TEST_CONFIGS = [
# mobilenet_v1_fp32_correctness_test
ModelTestConfig(
name="mobilenet_v1_fp32_correctness_test",
imported_model=iree_definitions.ImportedModel.from_model(
tflite_models.MOBILENET_V1
),
execution_config=module_execution_configs.ELF_LOCAL_SYNC_CONFIG,
expected_output="mobilenet_v1_fp32_expected_output.txt",
unsupported_platforms=[
CMakePlatform.LINUX_RISCV32,
CMakePlatform.ANDROID_ARMV8_A,
],
),
# TODO(#14775): Re-enable the tests.
hanhanW marked this conversation as resolved.
Show resolved Hide resolved
# ModelTestConfig(
# name="mobilenet_v1_fp32_correctness_test",
# imported_model=iree_definitions.ImportedModel.from_model(
# tflite_models.MOBILENET_V1
# ),
# execution_config=module_execution_configs.ELF_LOCAL_SYNC_CONFIG,
# expected_output="mobilenet_v1_fp32_expected_output.txt",
# unsupported_platforms=[
# CMakePlatform.LINUX_RISCV32,
# CMakePlatform.ANDROID_ARMV8_A,
# ],
# ),
# efficientnet_int8_correctness_test
ModelTestConfig(
name="efficientnet_int8_correctness_test",
imported_model=iree_definitions.ImportedModel.from_model(
tflite_models.EFFICIENTNET_INT8
),
execution_config=module_execution_configs.ELF_LOCAL_SYNC_CONFIG,
expected_output="efficientnet_int8_expected_output.txt",
unsupported_platforms=[
CMakePlatform.ANDROID_ARMV8_A,
CMakePlatform.LINUX_RISCV32,
CMakePlatform.LINUX_RISCV64,
],
),
# TODO(#14775): Re-enable the tests.
# ModelTestConfig(
# name="efficientnet_int8_correctness_test",
# imported_model=iree_definitions.ImportedModel.from_model(
# tflite_models.EFFICIENTNET_INT8
# ),
# execution_config=module_execution_configs.ELF_LOCAL_SYNC_CONFIG,
# expected_output="efficientnet_int8_expected_output.txt",
# unsupported_platforms=[
# CMakePlatform.ANDROID_ARMV8_A,
# CMakePlatform.LINUX_RISCV32,
# CMakePlatform.LINUX_RISCV64,
# ],
# ),
# deeplab_v3_fp32_correctness_test
ModelTestConfig(
name="deeplab_v3_fp32_correctness_test",
imported_model=iree_definitions.ImportedModel.from_model(
tflite_models.DEEPLABV3_FP32
),
execution_config=module_execution_configs.ELF_LOCAL_SYNC_CONFIG,
expected_output="deeplab_v3_fp32_input_0_expected_output.npy",
extra_test_flags=["--expected_f32_threshold=0.001"],
unsupported_platforms=[
CMakePlatform.LINUX_RISCV32,
CMakePlatform.LINUX_RISCV64,
],
),
# TODO(#14775): Re-enable the tests.
# ModelTestConfig(
# name="deeplab_v3_fp32_correctness_test",
# imported_model=iree_definitions.ImportedModel.from_model(
# tflite_models.DEEPLABV3_FP32
# ),
# execution_config=module_execution_configs.ELF_LOCAL_SYNC_CONFIG,
# expected_output="deeplab_v3_fp32_input_0_expected_output.npy",
# extra_test_flags=["--expected_f32_threshold=0.001"],
# unsupported_platforms=[
# CMakePlatform.LINUX_RISCV32,
# CMakePlatform.LINUX_RISCV64,
# ],
# ),
# person_detect_int8_correctness_test
ModelTestConfig(
name="person_detect_int8_correctness_test",
imported_model=iree_definitions.ImportedModel.from_model(
tflite_models.PERSON_DETECT_INT8
),
execution_config=module_execution_configs.ELF_LOCAL_SYNC_CONFIG,
expected_output="1x2xi8=[72 -72]",
unsupported_platforms=[CMakePlatform.ANDROID_ARMV8_A],
),
# TODO(#14775): Re-enable the tests.
# ModelTestConfig(
# name="person_detect_int8_correctness_test",
# imported_model=iree_definitions.ImportedModel.from_model(
# tflite_models.PERSON_DETECT_INT8
# ),
# execution_config=module_execution_configs.ELF_LOCAL_SYNC_CONFIG,
# expected_output="1x2xi8=[72 -72]",
# unsupported_platforms=[CMakePlatform.ANDROID_ARMV8_A],
# ),
]
Loading
Loading