Skip to content

feat: add cuVS accelerator support #1271

feat: add cuVS accelerator support

feat: add cuVS accelerator support #1271

# This workflow is used to trigger benchmarks on a PR when a specific comment is added
# to the PR. The workflow runs on all PR comments containing the string 'benchmark'
# and the string '@bench-bot'. The workflow collects some information about the PR
# and then forwards the information to the lance-bench workflow.
#
# The lance-bench repository is a public repository in the lancedb organization which
# runs benchmarks against the Lance repository on a regular basis and stores the results
# in a historical database.
name: Benchmark Comment Trigger
on:
issue_comment:
types: [created]
jobs:
forward-to-bench:
# Only process comments on PRs that mention @bench-bot and contain 'benchmark'
if: |
github.event.issue.pull_request != null &&
contains(github.event.comment.body, '@bench-bot') &&
contains(github.event.comment.body, 'benchmark')
runs-on: ubuntu-latest
steps:
- name: Get PR details
id: pr
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7
with:
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
core.setOutput('head_sha', pr.data.head.sha);
- name: Forward to lance-bench
uses: peter-evans/repository-dispatch@bf47d102fdb849e755b0b0023ea3e81a44b6f570 # v2
with:
token: ${{ secrets.LANCE_BENCH_DISPATCH_TOKEN }}
repository: lancedb/lance-bench
event-type: pr-comment
client-payload: |
{
"comment_body": ${{ toJson(github.event.comment.body) }},
"comment_user": "${{ github.event.comment.user.login }}",
"pr_number": ${{ github.event.issue.number }},
"pr_head_sha": "${{ steps.pr.outputs.head_sha }}",
"repository": "${{ github.repository }}"
}