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

Issue when running simple_vec_mul_int_bytecode_static_c with tosa iree input type #349

Open
GeoBouz opened this issue Oct 31, 2024 · 1 comment

Comments

@GeoBouz
Copy link

GeoBouz commented Oct 31, 2024

Hello!

for build I use ../iree-bare-metal-arm/build_tools/configure_build.sh cmsis stm32f407 and for the build cmake --build . --target simple_vec_mul_int_bytecode_static_c
I have modified the code for my mlir and the cmake looks like this:
Image

During the build I gett this error:
$ cmake --build . --target simple_vec_mul_int_bytecode_static_c
[0/2] Re-checking globbed directories...
[162/176] Generating simple_mul_int_bytecode_module_static_c_module_emitc.h, simple_mul_int_bytecode_module_static_c_module.o, simple_mul_int_bytecode_module_static_c_module.h
error: Resolution of target CPU to target CPU features is not implemented on this target architecture. Pass explicit CPU features instead of a CPU on this architecture, or implement that.
error: Resolution of target CPU to target CPU features is not implemented on this target architecture. Pass explicit CPU features instead of a CPU on this architecture, or implement that.
[176/176] Linking C executable samples/simple_vec_mul/simple_vec_mul_int_bytecode_static_c.elf
FAILED: samples/simple_vec_mul/simple_vec_mul_int_bytecode_static_c.elf
: && /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc -mthumb -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DIREE_TIME_NOW_FN="{ return 0; }" -DIREE_WAIT_UNTIL_FN=wait_until -Wl,--gc-sections -ffunction-sections -fdata-sections -Wno-char-subscripts -Wno-format -Wno-implicit-function-declaration -Wno-unused-variable -Os -DNDEBUG -lc -lm -T /home/gbouzikas/Thesis/iree-bare-metal-arm/build_tools/stm32f407xg-cmsis.ld -specs=nosys.specs -lm samples/simple_vec_mul/CMakeFiles/simple_vec_mul_int_bytecode_static_c.dir/simple_mul_int.c.obj samples/simple_vec_mul/CMakeFiles/simple_vec_mul_int_bytecode_static_c.dir/simple_mul_int_c_module.c.obj samples/simple_vec_mul/CMakeFiles/simple_vec_mul_int_bytecode_static_c.dir/device_static_sync.c.obj -o samples/simple_vec_mul/simple_vec_mul_int_bytecode_static_c.elf -L/home/gbouzikas/Thesis/iree-bare-metal-arm/build_tools samples/simple_vec_mul/libsimple_mul_int_bytecode_module_static_c_module.a third_party/iree/runtime/src/iree/hal/drivers/local_sync/libiree_hal_drivers_local_sync_sync_driver.a third_party/iree/runtime/src/iree/hal/local/loaders/libiree_hal_local_loaders_static_library_loader.a build_tools/third_party/cmsis_device_f4/libcmsis_device_f407xx.a utils/libutils.a utils/libwrite.a third_party/iree/runtime/src/iree/runtime/libiree_runtime_impl.a third_party/iree/runtime/src/iree/hal/drivers/libiree_hal_drivers_drivers.a third_party/iree/runtime/src/iree/hal/drivers/local_sync/registration/libiree_hal_drivers_local_sync_registration_registration.a third_party/iree/runtime/src/iree/hal/drivers/local_sync/libiree_hal_drivers_local_sync_sync_driver.a third_party/iree/runtime/src/iree/hal/utils/libiree_hal_utils_deferred_command_buffer.a third_party/iree/runtime/src/iree/hal/utils/libiree_hal_utils_resource_set.a third_party/iree/runtime/src/iree/base/internal/libiree_base_internal_arena.a third_party/iree/runtime/src/iree/base/internal/libiree_base_internal_atomic_slist.a third_party/iree/runtime/src/iree/hal/utils/libiree_hal_utils_file_transfer.a third_party/iree/runtime/src/iree/hal/utils/libiree_hal_utils_memory_file.a third_party/iree/runtime/src/iree/hal/utils/libiree_hal_utils_semaphore_base.a third_party/iree/runtime/src/iree/hal/local/loaders/registration/libiree_hal_local_loaders_registration_registration.a third_party/iree/runtime/src/iree/hal/local/libiree_hal_local_local.a third_party/iree/runtime/src/iree/base/internal/libiree_base_internal_fpu_state.a third_party/iree/runtime/src/iree/hal/local/loaders/libiree_hal_local_loaders_embedded_elf_loader.a third_party/iree/runtime/src/iree/hal/local/loaders/libiree_hal_local_loaders_vmvx_module_loader.a third_party/iree/runtime/src/iree/modules/vmvx/libiree_modules_vmvx_vmvx.a third_party/iree/runtime/src/iree/builtins/ukernel/libiree_builtins_ukernel_ukernel.a third_party/iree/runtime/src/iree/builtins/ukernel/libiree_builtins_ukernel_fallback.a third_party/iree/runtime/src/iree/hal/local/plugins/registration/libiree_hal_local_plugins_registration_registration.a third_party/iree/runtime/src/iree/base/internal/libiree_base_internal_flags.a third_party/iree/runtime/src/iree/hal/local/plugins/libiree_hal_local_plugins_embedded_elf_plugin.a third_party/iree/runtime/src/iree/base/internal/libiree_base_internal_file_io.a third_party/iree/runtime/src/iree/hal/local/libiree_hal_local_executable_plugin_manager.a third_party/iree/runtime/src/iree/hal/local/elf/libiree_hal_local_elf_elf_module.a third_party/iree/runtime/src/iree/hal/local/elf/libiree_hal_local_elf_arch.a third_party/iree/runtime/src/iree/hal/local/elf/libiree_hal_local_elf_platform.a third_party/iree/runtime/src/iree/base/internal/libiree_base_internal_memory.a third_party/iree/runtime/src/iree/modules/hal/libiree_modules_hal_hal.a third_party/iree/runtime/src/iree/modules/hal/utils/libiree_modules_hal_utils_buffer_diagnostics.a third_party/iree/runtime/src/iree/modules/hal/libiree_modules_hal_types.a third_party/iree/runtime/src/iree/vm/bytecode/libiree_vm_bytecode_module.a third_party/iree/runtime/src/iree/vm/bytecode/utils/libiree_vm_bytecode_utils_utils.a third_party/iree/runtime/src/iree/vm/libiree_vm_impl.a third_party/iree/build_tools/third_party/flatcc/libflatcc_parsing.a -lm third_party/iree/runtime/src/iree/hal/local/libiree_hal_local_executable_library_util.a third_party/iree/runtime/src/iree/hal/local/libiree_hal_local_executable_loader.a third_party/iree/runtime/src/iree/hal/local/libiree_hal_local_executable_environment.a third_party/iree/runtime/src/iree/base/internal/libiree_base_internal_cpu.a third_party/iree/runtime/src/iree/hal/libiree_hal_hal.a third_party/iree/runtime/src/iree/base/internal/libiree_base_internal_synchronization.a third_party/iree/runtime/src/iree/base/internal/libiree_base_internal_path.a third_party/iree/runtime/src/iree/io/libiree_io_file_handle.a third_party/iree/runtime/src/iree/io/libiree_io_memory_stream.a third_party/iree/runtime/src/iree/io/libiree_io_stream.a third_party/iree/runtime/src/iree/base/libiree_base_base.a build_tools/third_party/cmsis_device_f4/libcmsis_device_f407xx.a && cd /home/gbouzikas/Thesis/iree-bare-metal-arm/build/samples/simple_vec_mul && /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-objcopy -O binary simple_vec_mul_int_bytecode_static_c.elf simple_vec_mul_int_bytecode_static_c.bin && cd /home/gbouzikas/Thesis/iree-bare-metal-arm/build/samples/simple_vec_mul && /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-objcopy -O ihex simple_vec_mul_int_bytecode_static_c.elf simple_vec_mul_int_bytecode_static_c.hex
/home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(libc_a-closer.o): in function _close_r': closer.c:(.text._close_r+0xc): warning: _close is not implemented and will always fail /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(libc_a-fstatr.o): in function _fstat_r':
fstatr.c:(.text._fstat_r+0x12): warning: _fstat is not implemented and will always fail
/home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(libc_a-signalr.o): in function _getpid_r': signalr.c:(.text._getpid_r+0x0): warning: _getpid is not implemented and will always fail /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(libc_a-isattyr.o): in function _isatty_r':
isattyr.c:(.text._isatty_r+0xc): warning: _isatty is not implemented and will always fail
/home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(libc_a-signalr.o): in function _kill_r': signalr.c:(.text._kill_r+0x12): warning: _kill is not implemented and will always fail /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(libc_a-lseekr.o): in function _lseek_r':
lseekr.c:(.text._lseek_r+0x14): warning: _lseek is not implemented and will always fail
/home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/thumb/v7e-m+fp/hard/libc.a(libc_a-readr.o): in function _read_r': readr.c:(.text._read_r+0x14): warning: _read is not implemented and will always fail /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: warning: samples/simple_vec_mul/simple_vec_mul_int_bytecode_static_c.elf has a LOAD segment with RWX permissions /home/gbouzikas/Thesis/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: samples/simple_vec_mul/CMakeFiles/simple_vec_mul_int_bytecode_static_c.dir/device_static_sync.c.obj: in function create_sample_device':
device_static_sync.c:(.text.create_sample_device+0x94): undefined reference to `simple_mul_dispatch_0_library_query'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

@marbre
Copy link
Member

marbre commented Oct 31, 2024

The entry function in your model is named differently and not simple_mul_dispatch_0_library_query. This is why it fails when trying to link. You can take a look into the generated source to check for the naming and adjust

simple_mul_dispatch_0_library_query,

accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants