Skip to content

Commit

Permalink
Integrate IREE at iree-org/iree@bb51f6f
Browse files Browse the repository at this point in the history
Updates IREE usage to match iree-org/iree@bb51f6f and
candidate-20231004.665, respectively.

This furthermore adjust `C_FLAGS` to not fail on warnings.
  • Loading branch information
marbre committed Oct 25, 2023
1 parent b64f287 commit 7354815
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 23 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,14 @@ endif()
# Set executable suffix to elf
set(CMAKE_EXECUTABLE_SUFFIX ".elf")

# IREE_DEFAULT_COPTS sets `-Wall` in combination with `-Werror` which
# currently breaks the build with GCC. This disables specific warnings.
# TODO: Re-enable these warning.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-char-subscripts")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-format")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-implicit-function-declaration")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable")

#-------------------------------------------------------------------------------
# Utility definitions
#-------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion iree-release-link.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/openxla/iree/releases/download/candidate-20230815.614/iree-dist-20230815.614-linux-x86_64.tar.xz
https://github.com/openxla/iree/releases/download/candidate-20231004.665/iree-dist-20231004.665-linux-x86_64.tar.xz
2 changes: 1 addition & 1 deletion requirements-compiler.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
# SPDX-License-Identifier: CC0-1.0
-f https://openxla.github.io/iree/pip-release-links.html
iree-compiler==20230815.614
iree-compiler==20231004.665
4 changes: 2 additions & 2 deletions requirements-tools.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: 2022 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
# SPDX-License-Identifier: CC0-1.0
-f https://openxla.github.io/iree/pip-release-links.html
iree-tools-tf==20230815.614
iree-tools-tflite==20230815.614
iree-tools-tf==20231004.665
iree-tools-tflite==20231004.665
8 changes: 4 additions & 4 deletions samples/simple_embedding/simple_embedding_float.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ iree_status_t Run() {
iree_hal_dim_t shape[1] = {IREE_ARRAYSIZE(kFloat4)};
iree_hal_buffer_view_t* arg0_buffer_view = NULL;
iree_hal_buffer_view_t* arg1_buffer_view = NULL;
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer(
iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer_copy(
device, iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_HAL_ELEMENT_TYPE_FLOAT_32, IREE_HAL_ENCODING_TYPE_DENSE_ROW_MAJOR,
(iree_hal_buffer_params_t){
.type = IREE_HAL_MEMORY_TYPE_DEVICE_LOCAL,
.usage = IREE_HAL_BUFFER_USAGE_DEFAULT,
},
iree_make_const_byte_span(kFloat4, sizeof(kFloat4)), &arg0_buffer_view));
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer(
iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer_copy(
device, iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_HAL_ELEMENT_TYPE_FLOAT_32, IREE_HAL_ENCODING_TYPE_DENSE_ROW_MAJOR,
(iree_hal_buffer_params_t){
.type = IREE_HAL_MEMORY_TYPE_DEVICE_LOCAL,
Expand Down
8 changes: 4 additions & 4 deletions samples/simple_embedding/simple_embedding_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@ iree_status_t Run() {
iree_hal_dim_t shape[1] = {IREE_ARRAYSIZE(kInt4)};
iree_hal_buffer_view_t* arg0_buffer_view = NULL;
iree_hal_buffer_view_t* arg1_buffer_view = NULL;
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer(
iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer_copy(
device, iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_HAL_ELEMENT_TYPE_SINT_32, IREE_HAL_ENCODING_TYPE_DENSE_ROW_MAJOR,
(iree_hal_buffer_params_t){
.type = IREE_HAL_MEMORY_TYPE_DEVICE_LOCAL,
.usage = IREE_HAL_BUFFER_USAGE_DEFAULT,
},
iree_make_const_byte_span(kInt4, sizeof(kInt4)), &arg0_buffer_view));
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer(
iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer_copy(
device, iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_HAL_ELEMENT_TYPE_SINT_32, IREE_HAL_ENCODING_TYPE_DENSE_ROW_MAJOR,
(iree_hal_buffer_params_t){
.type = IREE_HAL_MEMORY_TYPE_DEVICE_LOCAL,
Expand Down
8 changes: 4 additions & 4 deletions samples/simple_vec_mul/simple_mul_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,16 @@ iree_status_t Run() {
iree_hal_dim_t shape[1] = {IREE_ARRAYSIZE(kInt0)};
iree_hal_buffer_view_t* arg0_buffer_view = NULL;
iree_hal_buffer_view_t* arg1_buffer_view = NULL;
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer(
iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer_copy(
device, iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_HAL_ELEMENT_TYPE_SINT_32, IREE_HAL_ENCODING_TYPE_DENSE_ROW_MAJOR,
(iree_hal_buffer_params_t){
.type = IREE_HAL_MEMORY_TYPE_DEVICE_LOCAL,
.usage = IREE_HAL_BUFFER_USAGE_DEFAULT,
},
iree_make_const_byte_span(kInt0, sizeof(kInt0)), &arg0_buffer_view));
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer(
iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_RETURN_IF_ERROR(iree_hal_buffer_view_allocate_buffer_copy(
device, iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_HAL_ELEMENT_TYPE_SINT_32, IREE_HAL_ENCODING_TYPE_DENSE_ROW_MAJOR,
(iree_hal_buffer_params_t){
.type = IREE_HAL_MEMORY_TYPE_DEVICE_LOCAL,
Expand Down
8 changes: 4 additions & 4 deletions samples/static_library/static_library_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ iree_status_t Run() {
float kFloat2[] = {2.0f, 2.0f, 2.0f, 2.0f};

if (iree_status_is_ok(status)) {
status = iree_hal_buffer_view_allocate_buffer(
iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
status = iree_hal_buffer_view_allocate_buffer_copy(
device, iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_HAL_ELEMENT_TYPE_FLOAT_32, IREE_HAL_ENCODING_TYPE_DENSE_ROW_MAJOR,
(iree_hal_buffer_params_t){
.type = IREE_HAL_MEMORY_TYPE_DEVICE_LOCAL,
Expand All @@ -135,8 +135,8 @@ iree_status_t Run() {
&arg0_buffer_view);
}
if (iree_status_is_ok(status)) {
status = iree_hal_buffer_view_allocate_buffer(
iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
status = iree_hal_buffer_view_allocate_buffer_copy(
device, iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_HAL_ELEMENT_TYPE_FLOAT_32, IREE_HAL_ENCODING_TYPE_DENSE_ROW_MAJOR,
(iree_hal_buffer_params_t){
.type = IREE_HAL_MEMORY_TYPE_DEVICE_LOCAL,
Expand Down
4 changes: 2 additions & 2 deletions samples/vision_inference/static_library_mnist.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ iree_status_t Run() {
iree_hal_buffer_view_t* arg0_buffer_view = NULL;

if (iree_status_is_ok(status)) {
status = iree_hal_buffer_view_allocate_buffer(
iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
status = iree_hal_buffer_view_allocate_buffer_copy(
device, iree_hal_device_allocator(device), IREE_ARRAYSIZE(shape), shape,
IREE_HAL_ELEMENT_TYPE_FLOAT_32, IREE_HAL_ENCODING_TYPE_DENSE_ROW_MAJOR,
(iree_hal_buffer_params_t){
.type = IREE_HAL_MEMORY_TYPE_DEVICE_LOCAL,
Expand Down
2 changes: 1 addition & 1 deletion third_party/iree
Submodule iree updated from 48f739 to bb51f6

0 comments on commit 7354815

Please sign in to comment.