blob: b4f66db41c0e0fc107e29bfd83ffd05ea9c5092b [file] [log] [blame]
set(IREE_RUNTIME_SOURCE_DIR "${IREE_SOURCE_DIR}/runtime/src/iree")
# use IREE builtin reference ukernel implementation if RVV is off
set(PREFIX_UKERNEL "${IREE_RUNTIME_SOURCE_DIR}/builtins/ukernel")
set(PREFIX_VMVX "${IREE_RUNTIME_SOURCE_DIR}/modules/vmvx")
if (${BUILD_WITH_RVV})
set(PREFIX_UKERNEL "${CMAKE_CURRENT_SOURCE_DIR}")
set(PREFIX_VMVX "${CMAKE_CURRENT_SOURCE_DIR}")
endif()
iree_cc_library(
NAME
ukernel
HDRS
"${IREE_RUNTIME_SOURCE_DIR}/builtins/ukernel/api.h"
SRCS
"${IREE_RUNTIME_SOURCE_DIR}/builtins/ukernel/mmt4d.c"
"${IREE_RUNTIME_SOURCE_DIR}/builtins/ukernel/pack.c"
"${IREE_RUNTIME_SOURCE_DIR}/builtins/ukernel/pack_tile.c"
"${IREE_RUNTIME_SOURCE_DIR}/builtins/ukernel/unpack.c"
"${IREE_RUNTIME_SOURCE_DIR}/builtins/ukernel/unpack_tile.c"
"${IREE_RUNTIME_SOURCE_DIR}/builtins/ukernel/weak.c"
"${PREFIX_UKERNEL}/mmt4d_tile.c"
"${PREFIX_UKERNEL}/query_tile_sizes.c"
DEPS
iree::builtins::ukernel::internal_headers
PUBLIC
)
iree_cc_library(
NAME
vmvx
HDRS
"${IREE_RUNTIME_SOURCE_DIR}/modules/vmvx/module.h"
TEXTUAL_HDRS
"${IREE_RUNTIME_SOURCE_DIR}/modules/vmvx/exports.inl"
SRCS
"${IREE_RUNTIME_SOURCE_DIR}/modules/vmvx/module.c"
"${PREFIX_VMVX}/elementwise.c"
DEFINES
"IREE_HAVE_VMVX_MODULE"
DEPS
::ukernel
PUBLIC
)
iree_cc_library(
NAME
vmvx_module_loader
HDRS
"${IREE_RUNTIME_SOURCE_DIR}/hal/local/loaders/vmvx_module_loader.h"
SRCS
"${IREE_RUNTIME_SOURCE_DIR}/hal/local/loaders/vmvx_module_loader.c"
DEPS
::vmvx
iree::hal::local::executable_loader
iree::vm::bytecode::module
DEFINES
"IREE_HAVE_HAL_EXECUTABLE_LOADER_VMVX_MODULE=1"
PUBLIC
)