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

Added arm64 architecture for onnexruntime vendor #7

Merged
merged 1 commit into from
Feb 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions whisper_onnxruntime_vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
cmake_minimum_required(VERSION 3.8)
project(whisper_onnxruntime_vendor)

# Determine the architecture
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(ARCHITECTURE "x64")
elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
set(ARCHITECTURE "aarch64")
else()
message(FATAL_ERROR "Unsupported architecture: ${CMAKE_SYSTEM_PROCESSOR}")
endif()

# Set variables for the package
set(ONNXRUNTIME_VERSION "1.18.1") # Specify the desired ONNX Runtime version
set(ONNXRUNTIME_URL "https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION}/onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}.tgz")
set(ONNXRUNTIME_URL "https://github.com/microsoft/onnxruntime/releases/download/v${ONNXRUNTIME_VERSION}/onnxruntime-linux-${ARCHITECTURE}-${ONNXRUNTIME_VERSION}.tgz")

# ROS 2 package configuration
find_package(ament_cmake REQUIRED)

# Define a vendor package installation directory
set(ONNXRUNTIME_INSTALL_DIR "${CMAKE_BINARY_DIR}/onnxruntime-linux-x64-${ONNXRUNTIME_VERSION}")
set(ONNXRUNTIME_INSTALL_DIR "${CMAKE_BINARY_DIR}/onnxruntime-linux-${ARCHITECTURE}-${ONNXRUNTIME_VERSION}")

# Add a custom target to download and extract the prebuilt ONNX Runtime
find_program(CURL_EXECUTABLE curl REQUIRED)
Expand Down