-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Support for Devices other than CUDA in Telemetry and Web UI #902
Closed
Closed
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
aa6bf9d
Added build configurations for Intel and AMD hardware
cromefire 5732d7d
Improved rocm build
cromefire 1e05350
Added options for OneAPI and ROCm
cromefire 3496bb9
Build llama using icx
cromefire 6098475
[autofix.ci] apply automated fixes
autofix-ci[bot] 7d38fc4
Fixed rocm image
cromefire 4f90c98
Build ROCm
cromefire c0804cb
Tried to adjust compile flags for SYCL
cromefire 8d56d37
Removed references to oneAPI
cromefire dd72b82
Provide info about the used device for ROCm
cromefire b4a02d1
Added ROCm documentation
cromefire 7b40db6
Addressed review comments
cromefire 55c7884
Refactored to expose generic accelerator information
cromefire cbbdf22
Pull request cleanup
cromefire c2ddb59
Merge branch 'main' into rocm-support
cromefire f80007c
[autofix.ci] apply automated fixes
autofix-ci[bot] dd80a3a
Merge branch 'main' into rocm-support
cromefire b993d5d
Tried to fix most build issues
cromefire 1bc6f48
Fixed the rest of the build issues
cromefire c73b518
Merge branch 'main' into rocm-support
cromefire 94d22c4
Added rocm binary build
cromefire 7e58915
Merge branch 'main' into rocm-support
cromefire b3ef2e2
Added ROCm 6.0 build
cromefire df62a7d
Fixed build and slimmed down container
cromefire 5f6a63d
Merge branch 'main' into rocm-support
cromefire 234f58a
Fixed certificates in docker file
cromefire 28ce9f1
Fixed merge issue
cromefire fd0891b
Fixed merge issue in workflow
cromefire b471554
Merge branch 'main' into rocm-support
cromefire b13bbec
Added support for specifying targets for docker build
cromefire 99f63f3
Fixed docker build
cromefire File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ python | |
**/target | ||
**/node_modules | ||
website | ||
*.log | ||
*.Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Create and publish docker image | ||
name: Create and publish CUDA docker image | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -50,7 +50,10 @@ jobs: | |
|
||
# Workaround: https://github.com/docker/build-push-action/issues/461 | ||
- name: Setup Docker buildx | ||
uses: docker/[email protected] | ||
uses: docker/[email protected] | ||
with: | ||
# Needed to support OCI annotations | ||
version: v0.12.0 | ||
|
||
# Login against a Docker registry except on PR | ||
# https://github.com/docker/login-action | ||
|
@@ -78,7 +81,7 @@ jobs: | |
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
uses: docker/metadata-action@v5.0.0 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
|
@@ -95,13 +98,14 @@ jobs: | |
# https://github.com/docker/build-push-action | ||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@v3.1.1 | ||
uses: docker/build-push-action@v5.1.0 | ||
with: | ||
file: Dockerfile | ||
file: cuda.Dockerfile | ||
push: true | ||
context: . | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
annotations: ${{ steps.meta.outputs.labels }} | ||
cache-from: ${{ steps.cache.outputs.cache-from }} | ||
cache-to: ${{ steps.cache.outputs.cache-to }} | ||
build-args: RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} | ||
|
@@ -112,4 +116,3 @@ jobs: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
repository: tabbyml/tabby | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
name: Create and publish ROCm docker image | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 20 */1 * *' | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | ||
|
||
# If this is enabled it will cancel current running and start latest | ||
cancel-in-progress: true | ||
|
||
env: | ||
RUST_TOOLCHAIN: 1.73.0 | ||
|
||
jobs: | ||
release-docker: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
# This is used to complete the identity challenge | ||
# with sigstore/fulcio when running outside of PRs. | ||
id-token: write | ||
|
||
steps: | ||
- name: Free Disk Space (Ubuntu) | ||
uses: jlumbroso/free-disk-space@main | ||
with: | ||
# this might remove tools that are actually needed, | ||
# if set to "true" but frees about 6 GB | ||
tool-cache: true | ||
|
||
# all of these default to true, but feel free to set to | ||
# "false" if necessary for your workflow | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: false | ||
swap-storage: true | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
# Workaround: https://github.com/docker/build-push-action/issues/461 | ||
- name: Setup Docker buildx | ||
uses: docker/[email protected] | ||
with: | ||
# Needed to support OCI annotations | ||
version: v0.12.0 | ||
|
||
# Login against a Docker registry except on PR | ||
# https://github.com/docker/login-action | ||
- name: Log into GitHub Container registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Log into Docker Hub | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Generate image name | ||
run: | | ||
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV} | ||
|
||
- uses: int128/docker-build-cache-config-action@v1 | ||
id: cache | ||
with: | ||
image: ghcr.io/${{ env.IMAGE_NAME }}/cache | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
ghcr.io/${{ env.IMAGE_NAME }}/rocm | ||
${{ env.IMAGE_NAME }}-rocm | ||
# generate Docker tags based on the following events/attributes | ||
variant: rocm | ||
tags: | | ||
type=raw,value={{branch}}-{{sha}},enable=${{ startsWith(github.ref, 'refs/heads') }} | ||
type=schedule,pattern=nightly | ||
type=schedule,pattern={{date 'YYYYMMDD'}} | ||
type=semver,pattern={{version}} | ||
|
||
# Build and push Docker image with Buildx (don't push on PR) | ||
# https://github.com/docker/build-push-action | ||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/[email protected] | ||
with: | ||
file: rocm.Dockerfile | ||
push: true | ||
context: . | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
annotations: ${{ steps.meta.outputs.labels }} | ||
cache-from: ${{ steps.cache.outputs.cache-from }} | ||
cache-to: ${{ steps.cache.outputs.cache-to }} | ||
build-args: RUST_TOOLCHAIN=${{ env.RUST_TOOLCHAIN }} | ||
|
||
- name: Docker Hub Description | ||
uses: peter-evans/dockerhub-description@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
repository: tabbyml/tabby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ node_modules | |
.DS_Store | ||
.vscode/ | ||
__pycache__ | ||
*.log |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
use juniper::{GraphQLEnum, GraphQLObject}; | ||
use serde::{Deserialize, Serialize}; | ||
use utoipa::ToSchema; | ||
|
||
#[derive(Serialize, Deserialize, GraphQLEnum, ToSchema, PartialEq, Clone, Debug)] | ||
pub enum DeviceType { | ||
Cuda, | ||
Rocm, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, GraphQLObject, ToSchema, Clone, Debug)] | ||
pub struct Accelerator { | ||
/// Universally unique ID of the accelerator, if available | ||
pub uuid: Option<String>, | ||
/// Technical name of the underlying hardware chip, if available | ||
pub chip_name: Option<String>, | ||
/// User readable name for the accelerator | ||
pub display_name: String, | ||
/// Type of the accelerator device | ||
pub device_type: DeviceType, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod accelerator; | ||
pub mod code; | ||
pub mod event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The biggest issue now is whether we can prevent this field from being part of the telemetry. If not, it definitely has to be removed, as it's basically almost equivalent to a serial number. It's nice for tracking a GPU in the accelerators, but it's a huge issue if that data leaves your control.