Skip to content

Conversation

mikepapadim
Copy link
Member

No description provided.

@mikepapadim mikepapadim self-assigned this Oct 9, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds configuration changes and scripts used for a Devoxx Demo presentation. The changes primarily involve adjusting TornadoVM runtime settings, modifying model loader configurations, and adding demo-specific scripts and configuration files.

  • Removes Timer logging from multiple model loaders to improve performance for demo
  • Configures TornadoVM with demo-specific paths and increased GPU memory allocation
  • Adds comprehensive argument files and shell scripts for running multiple AI models

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/main/java/org/beehive/gpullama3/model/loader/Qwen3ModelLoader.java Removes Timer.log wrapper from model loading
src/main/java/org/beehive/gpullama3/model/loader/Phi3ModelLoader.java Removes Timer.log wrapper and adds TornadoVM debug output
src/main/java/org/beehive/gpullama3/model/loader/MistralModelLoader.java Removes Timer.log wrapper from model loading
set_paths Comments out TornadoVM path exports
llama-tornado Updates TornadoVM configuration with demo-specific settings and increased GPU memory
argfile Adds comprehensive JVM argument configuration file for TornadoVM
all.sh Adds shell script for running multiple AI models in sequence

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Override
public Qwen3 loadModel() {
try (var ignored = Timer.log("Load Qwen3 model")) {
try {
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The try-with-resources statement has been changed to a regular try block, but there's no corresponding resource management. This could lead to resource leaks if exceptions occur during model loading.

Copilot uses AI. Check for mistakes.

@Override
public Phi3 loadModel() {
try (var ignored = Timer.log("Load Phi3 model")) {
try {
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The try-with-resources statement has been changed to a regular try block, but there's no corresponding resource management. This could lead to resource leaks if exceptions occur during model loading.

Copilot uses AI. Check for mistakes.

@Override
public Mistral loadModel() {
try (var ignored = Timer.log("Load Mistral model")) {
try {
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The try-with-resources statement has been changed to a regular try block, but there's no corresponding resource management. This could lead to resource leaks if exceptions occur during model loading.

Copilot uses AI. Check for mistakes.

llama-tornado Outdated
"-Dtornado.enable.mathOptimizations=false",
"-Dtornado.enable.nativeFunctions=true",
"-Dtornado.loop.interchange=true",
"-Dtornado.loop.interchange=true -Dtornado.dump.bytecodes.dir=/home/devoxx2025-demo/java-ai-demos/GPULlama3.java",
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line contains two JVM arguments concatenated in a single string. They should be separated into individual array elements for proper argument parsing.

Suggested change
"-Dtornado.loop.interchange=true -Dtornado.dump.bytecodes.dir=/home/devoxx2025-demo/java-ai-demos/GPULlama3.java",
"-Dtornado.loop.interchange=true",
"-Dtornado.dump.bytecodes.dir=/home/devoxx2025-demo/java-ai-demos/GPULlama3.java",

Copilot uses AI. Check for mistakes.

Comment on lines +32 to +34
"-Dtornado.loop.interchange=true -Dtornado.dump.bytecodes.dir=/home/devoxx2025-demo/java-ai-demos/GPULlama3.java"
-Dtornado.eventpool.maxwaitevents=32000
"-Dtornado.opencl.compiler.flags=-cl-denorms-are-zero -cl-no-signed-zeros -cl-finite-math-only"
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multiple JVM arguments are concatenated in a single quoted string. Each argument should be on its own line for proper parsing by the JVM.

Suggested change
"-Dtornado.loop.interchange=true -Dtornado.dump.bytecodes.dir=/home/devoxx2025-demo/java-ai-demos/GPULlama3.java"
-Dtornado.eventpool.maxwaitevents=32000
"-Dtornado.opencl.compiler.flags=-cl-denorms-are-zero -cl-no-signed-zeros -cl-finite-math-only"
-Dtornado.loop.interchange=true
-Dtornado.dump.bytecodes.dir=/home/devoxx2025-demo/java-ai-demos/GPULlama3.java
-Dtornado.eventpool.maxwaitevents=32000
-Dtornado.opencl.compiler.flags=-cl-denorms-are-zero
-cl-no-signed-zeros
-cl-finite-math-only

Copilot uses AI. Check for mistakes.

@mikepapadim mikepapadim merged commit f2ae9cc into main Oct 14, 2025
1 check passed
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

Successfully merging this pull request may close these issues.

1 participant