Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/actions/run-inference/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Run one llama-tornado inference pass and write the metrics + sideca

inputs:
backend:
description: 'GPU backend (opencl, ptx, or cuda)'
description: 'GPU backend (opencl, cuda, or metal)'
required: true
model_file:
description: 'Model filename inside $MODELS_DIR (e.g. Llama-3.2-1B-Instruct-F16.gguf)'
Expand Down Expand Up @@ -43,7 +43,7 @@ runs:
METRICS_FILE: ${{ inputs.metrics_file }}
run: |
# Run inference and emit raw metrics JSON via JAVA_TOOL_OPTIONS
# Backend (opencl/ptx/cuda) is auto-detected from $TORNADOVM_HOME/etc/tornado.backend
# Backend (opencl/cuda/metal) is auto-detected from $TORNADOVM_HOME/etc/tornado.backend
./llama-tornado --gpu \
--model $MODELS_DIR/${{ inputs.model_file }} \
--prompt "${{ inputs.prompt }}" \
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/setup-java/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ runs:
using: composite
steps:
- name: Set up Java with SDKMAN
shell: bash
# macOS ships bash 3.2 (Apple keeps it frozen for GPLv3 reasons); SDKMAN's own
# scripts use bash 4+ syntax (${var^^}) and crash under it, so use Homebrew's
# bash on macOS runners instead. Requires `brew install bash` on the runner.
shell: ${{ runner.os == 'macOS' && '/opt/homebrew/bin/bash --noprofile --norc -eo pipefail {0}' || 'bash' }}
run: |
source "$HOME/.sdkman/bin/sdkman-init.sh"
if ! sdk list java | grep -q "${{ inputs.java_version }}"; then
Expand Down
21 changes: 13 additions & 8 deletions .github/actions/setup-tornadovm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@ description: Build TornadoVM develop once per backend and reuse across runs via

inputs:
backend:
description: 'TornadoVM backend to build (opencl, ptx, or cuda)'
description: 'TornadoVM backend to build (opencl, cuda, or metal)'
required: true

# macOS ships bash 3.2 (Apple keeps it frozen for GPLv3 reasons); SDKMAN's own scripts use
# bash 4+ syntax (${var^^}) and crash under it, so every step below uses Homebrew's bash on
# macOS runners instead (requires `brew install bash` on the runner) and plain "bash" on Linux.
# GitHub's action-manifest parser doesn't support YAML anchors, so the expression is repeated
# per step rather than shared via &shell/*shell.
runs:
using: composite
steps:
- name: Get TornadoVM develop SHA
id: tornado_sha
shell: bash
shell: ${{ runner.os == 'macOS' && '/opt/homebrew/bin/bash --noprofile --norc -eo pipefail {0}' || 'bash' }}
run: |
SHA=$(git ls-remote https://github.com/beehive-lab/TornadoVM refs/heads/develop | cut -f1)
echo "sha=$SHA" >> $GITHUB_OUTPUT

- name: Check local build sentinel
id: sentinel
shell: bash
shell: ${{ runner.os == 'macOS' && '/opt/homebrew/bin/bash --noprofile --norc -eo pipefail {0}' || 'bash' }}
run: |
SENTINEL="$TORNADO_ROOT/.built-sha"
if [ -f "$SENTINEL" ] && [ "$(cat $SENTINEL)" = "${{ steps.tornado_sha.outputs.sha }}" ]; then
Expand All @@ -29,7 +34,7 @@ runs:

- name: Clone TornadoVM develop
if: steps.sentinel.outputs.up-to-date != 'true'
shell: bash
shell: ${{ runner.os == 'macOS' && '/opt/homebrew/bin/bash --noprofile --norc -eo pipefail {0}' || 'bash' }}
run: |
rm -rf $TORNADO_ROOT
git clone --depth 1 --branch develop \
Expand All @@ -38,15 +43,15 @@ runs:

- name: Set up Python venv for TornadoVM
if: steps.sentinel.outputs.up-to-date != 'true'
shell: bash
shell: ${{ runner.os == 'macOS' && '/opt/homebrew/bin/bash --noprofile --norc -eo pipefail {0}' || 'bash' }}
run: |
python3 -m venv $TORNADO_ROOT/venv
source $TORNADO_ROOT/venv/bin/activate
python --version

- name: Build TornadoVM
if: steps.sentinel.outputs.up-to-date != 'true'
shell: bash
shell: ${{ runner.os == 'macOS' && '/opt/homebrew/bin/bash --noprofile --norc -eo pipefail {0}' || 'bash' }}
run: |
cd $TORNADO_ROOT
mkdir -p graalJars && cp $GRAAL_JARS/* graalJars/
Expand All @@ -57,7 +62,7 @@ runs:

- name: Find TornadoVM SDK directory
id: find_sdk
shell: bash
shell: ${{ runner.os == 'macOS' && '/opt/homebrew/bin/bash --noprofile --norc -eo pipefail {0}' || 'bash' }}
run: |
SDK_DIR=$(find $TORNADO_ROOT/dist -type d -maxdepth 3 -path "*/tornadovm-*-${{ inputs.backend }}" | head -n 1)
if [ -z "$SDK_DIR" ]; then
Expand All @@ -70,7 +75,7 @@ runs:
# Runs on both fresh build and sentinel hit — sets TORNADOVM_HOME and PATH
# for all subsequent steps in the calling workflow.
- name: Configure TornadoVM environment
shell: bash
shell: ${{ runner.os == 'macOS' && '/opt/homebrew/bin/bash --noprofile --norc -eo pipefail {0}' || 'bash' }}
run: |
FULL_SDK="${{ steps.find_sdk.outputs.sdk_dir }}"
echo "Detected TornadoVM SDK: $FULL_SDK"
Expand Down
Loading
Loading