blob: 75c18c56bf047e4ac83f1a7384ee5bb9251a5314 [file] [log] [blame]
#-------------------------------------------------------------------------------
# Build the mlir bytecode modules with iree-translate. Note the last two flags
# are for RVV support.
# https://github.com/llvm/llvm-project/blob/f4ec30d/llvm/lib/Target/RISCV/RISCVSubtarget.cpp#L30-L46
#-------------------------------------------------------------------------------
springbok_bytecode_module(
NAME
simple_float_mul_bytecode_module_dylib
SRC
"simple_float_mul.mlir"
C_IDENTIFIER
"samples_simple_vec_mul_simple_float_mul_bytecode_module_dylib"
FLAGS
"-iree-input-type=mhlo"
"-riscv-v-vector-bits-min=512"
"-riscv-v-fixed-length-vector-lmul-max=8"
PUBLIC
)
springbok_bytecode_module(
NAME
simple_int_mul_bytecode_module_dylib
SRC
"simple_int_mul.mlir"
C_IDENTIFIER
"samples_simple_vec_mul_simple_int_mul_bytecode_module_dylib"
FLAGS
"-iree-input-type=mhlo"
"-riscv-v-vector-bits-min=512"
"-riscv-v-fixed-length-vector-lmul-max=8"
PUBLIC
)
#-------------------------------------------------------------------------------
# Binaries to execute the MLIR bytecode modules
#-------------------------------------------------------------------------------
# If the program requires a larger stack size, add
#
# LINKOPTS
# "LINKER:--defsym=__stack_size__=<new stack size>"
#
# to increase it.
iree_cc_binary(
NAME
simple_float_vec_mul_embedded_sync
SRCS
"float_vec.c"
"simple_vec_mul.c"
DEPS
::simple_float_mul_bytecode_module_dylib_c
iree::base
iree::hal
iree::hal::local
iree::hal::local::loaders::embedded_library_loader
iree::hal::local::sync_driver
iree::modules::hal
iree::vm
iree::vm::bytecode_module
samples::device::device_embedded_sync
)
iree_cc_binary(
NAME
simple_int_vec_mul_embedded_sync
SRCS
"int_vec.c"
"simple_vec_mul.c"
DEPS
::simple_int_mul_bytecode_module_dylib_c
iree::base
iree::hal
iree::hal::local
iree::hal::local::loaders::embedded_library_loader
iree::hal::local::sync_driver
iree::modules::hal
iree::vm
iree::vm::bytecode_module
samples::device::device_embedded_sync
)