Skip to content

AMDResearch/intelliperf-action

Repository files navigation

🎼 IntelliPerf Action

License: MIT

Important

This project is intended for research purposes only and is provided by AMD Research and Advanced Development team. This is not a product. Use it at your own risk and discretion.

A GitHub Action wrapper for IntelliPerf.


✨ Features

  • Supports multiple IntelliPerf formulas:
    • atomicContention: Analyzes atomic operation contention
    • memoryAccess: Analyzes memory access patterns
    • bankConflict: Analyzes bank conflicts
    • diagnoseOnly: General diagnostic analysis
  • Supports Docker and Apptainer containers
  • Optional PR creation with analysis results
  • Configurable build, instrument commands and project directory

📦 Usage

name: Example Workflow

on: [push]

jobs:
  run-intelliperf:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout main repo
        uses: actions/checkout@v3

      - name: Checkout intelliperf-action
        uses: actions/checkout@v3
        with:
          repository: AARInternal/intelliperf-action
          token: ${{ secrets.INTELLIPERF_ACTIONS_TOKEN }}
          path: .github/actions/intelliperf-action

      - name: Run IntelliPerf Action
        uses: ./.github/actions/intelliperf-action
        with:
          formula: "atomicContention"  # One of: atomicContention, memoryAccess, bankConflict, diagnoseOnly
          docker_image: "my-default-docker:latest"         # Optional if using Docker
          apptainer_image: "/path/to/default_apptainer.sif" # Optional if using Apptainer
          top_n: "10"                                       # Optional, defaults to 10
          create_pr: "true"                                # Optional, creates PR with changes
          intelliperf_actions_token: ${{ secrets.INTELLIPERF_ACTIONS_TOKEN }}  # Required if create_pr is true
          applications: >-
            [
              { 
                "command": "./build/examples/contention/reduction",
                "build_command": "./scripts/build.sh",
                "instrument_command": "./scripts/build.sh --instrument --clean",
                "project_directory": "./",
                "output_json": "${{ env.OUTPUT_JSON }}"
              }
            ]

Formula Examples

Atomic Contention Analysis

formula: "atomicContention"
applications: >-
  [
    {
      "command": "./build/examples/contention/reduction",
      "build_command": "./scripts/build.sh",
      "instrument_command": "./scripts/build.sh --instrument --clean",
      "project_directory": "./"
    }
  ]

Memory Access Analysis

formula: "memoryAccess"
applications: >-
  [
    {
      "command": "./build/examples/access_pattern/uncoalesced",
      "build_command": "./scripts/build.sh",
      "instrument_command": "./scripts/build.sh --instrument --clean",
      "project_directory": "./"
    }
            ]

Bank Conflict Analysis

formula: "bankConflict"
applications: >-
  [
    {
      "command": "./build/examples/bank_conflict/matrix_transpose",
      "build_command": "./scripts/build.sh",
      "instrument_command": "./scripts/build.sh --instrument --clean",
      "project_directory": "./"
    }
  ]

🔧 Inputs

Input Description Required Default
formula IntelliPerf formula to use. One of: atomicContention, memoryAccess, bankConflict, diagnoseOnly Yes -
applications List of application objects Yes -
docker_image Default Docker image to use No -
apptainer_image Default Apptainer image to use No -
top_n Top N kernels to report No 10
huggingface_token Huggingface token No -
create_pr Whether to create a PR with changes No false
intelliperf_actions_token GitHub token for PR creation (required if create_pr is true) No -

Application Object

Each application in the applications

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published