Merge google -> main (#7429)
* 5747b0e Synchronize submodules with LLVM at llvm/llvm-project@94213bc
* 043f2b5 Integrate LLVM at llvm/llvm-project@94213bc
* 4b4f5a0 Merge pull request Merge main -> google #7426 from google:main-to-google
* 4ef5eb9 Merge pull request Merge main -> google #7416 from google:main-to-google
* c4dbdf2 Integrate LLVM at llvm/llvm-project@7bbd7e9
* 35c0f05 Integrate LLVM at llvm/llvm-project@76db6d8
* 3f9a6d2 Integrate LLVM at llvm/llvm-project@6b6564f
* 7b8788b Synchronize submodules with LLVM at llvm/llvm-project@57e0081
* 9f3fbbb Integrate LLVM at llvm/llvm-project@57e0081
diff --git a/build_tools/cmake/iree_installed_test.cmake b/build_tools/cmake/iree_installed_test.cmake
index 755293a..1f99997 100644
--- a/build_tools/cmake/iree_installed_test.cmake
+++ b/build_tools/cmake/iree_installed_test.cmake
@@ -28,6 +28,7 @@
${ARGN}
)
+
add_test(
NAME
${_RULE_TEST_NAME}
@@ -59,7 +60,7 @@
# Write the to the installed ctest file template.
set(_installed_ctest_input_file
- "${CMAKE_BINARY_DIR}/iree_installed_tests.cmake.in")
+ "${CMAKE_BINARY_DIR}/iree_installed_tests.cmake.in")
get_property(_has_tests GLOBAL PROPERTY IREE_HAS_INSTALLED_TESTS)
if(NOT _has_tests)
# First time.
diff --git a/build_tools/cmake/iree_lit_test.cmake b/build_tools/cmake/iree_lit_test.cmake
index 849c886..9f54ec9 100644
--- a/build_tools/cmake/iree_lit_test.cmake
+++ b/build_tools/cmake/iree_lit_test.cmake
@@ -54,26 +54,9 @@
list(TRANSFORM _RULE_DATA REPLACE "^::" "${_PACKAGE_NS}::")
set(_DATA_DEP_PATHS)
- foreach(_DATA_LABEL ${_RULE_DATA})
- string(REPLACE "::" "_" _DATA_TARGET ${_DATA_LABEL})
- string(REPLACE "::" "/" _FILE_PATH ${_DATA_LABEL})
- set(_INPUT_PATH "${PROJECT_SOURCE_DIR}/${_FILE_PATH}")
- set(_OUTPUT_PATH "${PROJECT_BINARY_DIR}/${_FILE_PATH}")
- if(EXISTS "${_INPUT_PATH}")
- # Create a target which copies the data file into the build directory.
- # If this file is included in multiple rules, only create the target once.
- if(NOT TARGET ${_DATA_TARGET})
- add_custom_target(
- ${_DATA_TARGET} ALL
- COMMAND
- ${CMAKE_COMMAND} -E copy_if_different ${_INPUT_PATH} ${_OUTPUT_PATH}
- )
- endif()
- list(APPEND _DATA_DEP_PATHS "${_OUTPUT_PATH}")
- else()
- list(APPEND _DATA_DEP_PATHS "$<TARGET_FILE:${_DATA_TARGET}>")
- endif()
- endforeach()
+ foreach(_DATA_DEP ${_RULE_DATA})
+ list(APPEND _DATA_DEP_PATHS $<TARGET_FILE:${_DATA_DEP}>)
+ endforeach(_DATA_DEP)
iree_package_ns(_PACKAGE_NS)
string(REPLACE "::" "/" _PACKAGE_PATH ${_PACKAGE_NS})
@@ -95,26 +78,12 @@
# Note that the data deps are not bundled: must be externally on the path.
bin/run_lit.${IREE_HOST_SCRIPT_EXT}
${_TEST_FILE_PATH}
- ${_DATA_DEP_PATHS}
- WORKING_DIRECTORY
- "${PROJECT_SOURCE_DIR}"
)
- set_property(
- TEST ${_NAME_PATH}
- PROPERTY
- REQUIRED_FILES
- "${_TEST_FILE_PATH}"
- "${_DATA_DEP_PATHS}"
- )
+ set_property(TEST ${_NAME_PATH} PROPERTY REQUIRED_FILES "${_TEST_FILE_PATH}")
- install(
- FILES
- "${_TEST_FILE_PATH}"
- "${_DATA_DEP_PATHS}"
- DESTINATION
- "tests/${_PACKAGE_PATH}"
- COMPONENT
- Tests
+ install(FILES ${_TEST_FILE_PATH}
+ DESTINATION "tests/${_PACKAGE_PATH}"
+ COMPONENT Tests
)
# TODO(gcmn): Figure out how to indicate a dependency on _RULE_DATA being built
endfunction()
diff --git a/iree/samples/vision/iree-run-mnist-module.c b/iree/samples/vision/iree-run-mnist-module.c
index dacb98c..bfd9d7c 100644
--- a/iree/samples/vision/iree-run-mnist-module.c
+++ b/iree/samples/vision/iree-run-mnist-module.c
@@ -104,7 +104,7 @@
}
iree_string_view_t image_path;
if (argc == 1) {
- image_path = iree_make_cstring_view("iree/samples/vision/mnist_test.png");
+ image_path = iree_make_cstring_view("mnist_test.png");
} else {
image_path = iree_make_cstring_view(argv[1]);
}
diff --git a/iree/tools/test/BUILD b/iree/tools/test/BUILD
index c3e0817..41489e0 100644
--- a/iree/tools/test/BUILD
+++ b/iree/tools/test/BUILD
@@ -22,7 +22,6 @@
"iree-benchmark-module.mlir",
"iree-run-mlir.mlir",
"iree-run-module.mlir",
- "iree-run-trace.mlir",
"multiple_args.mlir",
"multiple_exported_functions.mlir",
"repeated_return.mlir",
@@ -31,12 +30,10 @@
include = ["*.mlir"],
),
data = [
- ":iree-run-trace.yaml",
"//iree/tools:IreeFileCheck",
"//iree/tools:iree-benchmark-module",
"//iree/tools:iree-run-mlir",
"//iree/tools:iree-run-module",
- "//iree/tools:iree-run-trace",
"//iree/tools:iree-translate",
],
tags = [
diff --git a/iree/tools/test/CMakeLists.txt b/iree/tools/test/CMakeLists.txt
index 498d80a..bf6581f 100644
--- a/iree/tools/test/CMakeLists.txt
+++ b/iree/tools/test/CMakeLists.txt
@@ -17,18 +17,15 @@
"iree-benchmark-module.mlir"
"iree-run-mlir.mlir"
"iree-run-module.mlir"
- "iree-run-trace.mlir"
"multiple_args.mlir"
"multiple_exported_functions.mlir"
"repeated_return.mlir"
"scalars.mlir"
DATA
- ::iree-run-trace.yaml
iree::tools::IreeFileCheck
iree::tools::iree-benchmark-module
iree::tools::iree-run-mlir
iree::tools::iree-run-module
- iree::tools::iree-run-trace
iree::tools::iree-translate
LABELS
"hostonly"
diff --git a/iree/tools/test/iree-run-trace.mlir b/iree/tools/test/iree-run-trace.mlir
deleted file mode 100644
index 15fd651..0000000
--- a/iree/tools/test/iree-run-trace.mlir
+++ /dev/null
@@ -1,11 +0,0 @@
-// RUN: (iree-translate -iree-input-type=tosa -iree-hal-target-backends=vmvx -iree-mlir-to-vm-bytecode-module %s | iree-run-trace --driver=vmvx "$(dirname %s)/iree-run-trace.yaml") | IreeFileCheck %s
-
-// CHECK: --- CALL[module.simple_mul] ---
-// CHECK-NEXT: 4xf32=10 4 6 8
-// CHECK-NEXT: --- CALL[module.simple_mul] ---
-// CHECK-NEXT: 4xf32=4 10 18 28
-
-func @simple_mul(%arg0: tensor<4xf32>, %arg1: tensor<4xf32>) -> tensor<4xf32> {
- %0 = "tosa.mul"(%arg0, %arg1) {shift = 0 : i32} : (tensor<4xf32>, tensor<4xf32>) -> tensor<4xf32>
- return %0 : tensor<4xf32>
-}
diff --git a/iree/tools/test/iree-run-trace.yaml b/iree/tools/test/iree-run-trace.yaml
deleted file mode 100644
index 37ad955..0000000
--- a/iree/tools/test/iree-run-trace.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-type: context_load
----
-type: module_load
-module:
- name: hal
- type: builtin
----
-type: module_load
-module:
- name: module
- type: bytecode
- path: <stdin>
----
-type: call
-function: module.simple_mul
-args:
-- !hal.buffer_view 4xf32=2 2 2 2
-- type: hal.buffer_view
- shape: 4
- element_type: f32
- contents: 5 2 3 4
-results:
-- !hal.buffer_view 4xf32=10 4 6 8
----
-type: call
-function: module.simple_mul
-args:
-- type: hal.buffer_view
- shape:
- - 4
- element_type: 50331680
- contents: !!binary |
- AACAPwAAAEAAAEBAAACAQA==
-- type: hal.buffer_view
- shape:
- - 4
- element_type: 50331680
- contents: !!binary |
- AACAQAAAoEAAAMBAAADgQA==
-results:
-- type: hal.buffer_view
- shape:
- - 4
- element_type: 50331680
- contents: !!binary |
- AACAQAAAIEEAAJBBAADgQQ==