Skip to main content

Creating an Optimization

Learn how to create and configure optimization processes in Artemis for improving your code.

Overview

Creating an optimization involves setting up the optimization process, configuring parameters, and defining goals. This guide walks you through the process of creating your first optimization in Artemis.

Step 1 : Arriving at a Create a new Optimization page

There are three ways you can use to arrive at this page: (1) From the Projects overview page; (2) From within a project; (3) From the Optimisations page.

Here are details for each option.

From the Projects overview page

Once you have imported your codebase to Artemis and have Extracted Targets, an option to Optimise will be available for the project. See image below.

Code opt projects entry point

Click on the Projects tab and click on Optimise to be directed to the page to create an Optimization.

From within a project

If you are currently within a project, where you have finished generating and validating versions, you can use options available within the projects page to be directed to New code optimisation.

See image below for details: Code opt projects entry point

Either of these options should take you to the options to the New code optimisation page.

From the Optimisations page

You can also use the Optimisations page to select from a list of code projects available within Artemis to create a new code optimisation.

See the image below: Code opt projects entry point

Step 2: Choosing the code changes to combine

After arriving at the optimization page, you'll see a "Code changes to combine" section that displays all available code versions for your project.

choosing the versions to optimize

Selecting Code Versions

  1. Review Available Versions: The interface displays a table with all generated code versions, showing:

    • Location: The target path (e.g., C opml/src/opml-gpu/opml-gpu.c)
    • Versions: Different generated versions (Original, A-gen1pop2-bb5c4, A-gen1pop2-f7d56, etc.)
    • Scores: Performance metrics for each version displayed as colored badges
    • Comparison Scores: Relative performance indicators
    • Validation Status: Green checkmarks indicate validated versions
    • Runtime, CPU Time, and Memory: Performance metrics for each version
  2. Select Versions to Include:

    • Check the versions you want to include in the optimization process
    • Uncheck versions that you don't want to consider in the optimization
    • Focus on versions that show good performance metrics (green scores) and have passed validation
  3. Selection Strategy:

    • Keep the Original version as a baseline for comparison
    • Select versions with the best performance scores according to your optimization goals
    • Consider validated versions (those with green checkmarks) for reliability
    • Tip: Only keep the best performing versions according to scores and/or metrics to focus the optimization process

Key Considerations

  • Performance Metrics: Look for versions with green performance badges indicating good scores
  • Validation Status: Prioritize versions that have passed validation (green checkmarks)
  • Memory Usage: Consider memory consumption shown in the rightmost column
  • CPU Time: Review CPU time metrics to balance performance and resource usage

Step 3: Creating a new code optimization

Once you've selected your desired code versions, proceed to create the optimization configuration.

optimization info and creation

Configuration Settings

  1. Project Selection:

    • The project field will be pre-populated
    • This shows which project you're optimizing
  2. Optimization Name:

    • Enter a descriptive name for your optimization
    • Use a name that helps you identify the optimization later
  3. Benchmark Repetitions:

    • Set the number of times each optimization version should run
    • Default is typically 1, but you can increase for better accuracy
    • Note: Higher numbers improve accuracy but take longer to complete
    • The results of performance metrics will be the average of these runs
  4. Choose an Online Runner:

    • Select your preferred runner from the dropdown
    • Ensure your runner is connected and can execute your code
    • A warning may appear if the runner connection needs verification
  5. Runner Connection:

    • Warning: "Please make sure you have connected your runner and can execute your code"
    • Verify your runner is properly set up before proceeding
    • Learn more about runners

Creating the Optimization

After configuring all settings:

  1. Review Configuration: Double-check your settings:

    • Project name is correct
    • Optimization name is descriptive
    • Benchmark repetitions are appropriate
    • Runner is selected and connected
  2. Click "Create Optimisation": Press the blue "Create Optimisation" button to start the process

  3. Optimization Created: The system will create your optimization and redirect you to the optimization management page

created optimization

Post-Creation

Once created, you'll see your optimization listed in the "Project Optimisations" section:

  • Optimization ID: Your optimization will have a unique identifier
  • Status Tracking: The optimization will show its current status
  • Created Timestamp: Shows when the optimization was created (e.g., "Created at 08 Sep 25, 16:53")
  • Optimization Type: Displays "Code Optimisation" with version and worker information
  • Action Buttons:
    • "Optimise" button to start the optimization process
    • Additional management options (copy, delete) available

Next Steps

After creating the optimization, you can:

  1. Click "Optimise" to begin the optimization process
  2. Monitor the progress and results
  3. Review optimization outcomes when complete

Next Steps

After creating an optimization:

  1. Review optimization results
  2. further actions on optimized versions