Skip to content
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

kompute: improve backend to pass test_backend_ops #10542

Merged
merged 7 commits into from
Nov 28, 2024

Conversation

slp
Copy link
Collaborator

@slp slp commented Nov 27, 2024

This is a first batch of improvements on the kompute backend to be able to pass test_backend_ops by fixing some bugs and adding some missing features. Tested on Apple Silicon (M1 GPU) and AMD (Vega 8).

The next batch will extend test_backend_ops coverage by adding support for more operations.

Signed-off-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning Kompute https://github.com/KomputeProject/kompute/ labels Nov 27, 2024
@slaren
Copy link
Collaborator

slaren commented Nov 27, 2024

I tried running test-backend-ops under Windows with NVIDIA GPUs. The first GPU passed, but the second one hangs in the first op:

Testing 3 devices

Backend 1/3: Kompute0
  Device description: NVIDIA GeForce RTX 3080
  Device memory: 10053 MB (10053 MB free)
  [...]
  1919/1919 tests passed
  Backend Kompute0: OK

Backend 2/3: Kompute1
  Device description: NVIDIA GeForce RTX 3090 Ti
  Device memory: 24313 MB (24313 MB free)

  ABS(type=f32,ne_a=[128,2,2,2],v=0): not supported [Kompute1]
  ABS(type=f32,ne_a=[5,7,11,13],v=0): not supported [Kompute1]
  SGN(type=f32,ne_a=[128,2,2,2],v=0): not supported [Kompute1]
  SGN(type=f32,ne_a=[5,7,11,13],v=0): not supported [Kompute1]
  NEG(type=f32,ne_a=[128,2,2,2],v=0): not supported [Kompute1]
  NEG(type=f32,ne_a=[5,7,11,13],v=0): not supported [Kompute1]
  STEP(type=f32,ne_a=[128,2,2,2],v=0): not supported [Kompute1]
  STEP(type=f32,ne_a=[5,7,11,13],v=0): not supported [Kompute1]
  TANH(type=f32,ne_a=[128,2,2,2],v=0): not supported [Kompute1]
  TANH(type=f32,ne_a=[5,7,11,13],v=0): not supported [Kompute1]
  ELU(type=f32,ne_a=[128,2,2,2],v=0): not supported [Kompute1]
  ELU(type=f32,ne_a=[5,7,11,13],v=0): not supported [Kompute1]
  RELU(type=f32,ne_a=[128,2,2,2],v=0):

@slp
Copy link
Collaborator Author

slp commented Nov 27, 2024

I tried running test-backend-ops under Windows with NVIDIA GPUs. The first GPU passed, but the second one hangs in the first op:

Thanks for letting me know. I guess the most likely explanation is that the kompute backend has trouble initializing devices other than the first one. I'll try to find some hardware to fix it in a future PR.

@slp slp changed the title kompute: improve backend for pass test_backend_ops kompute: improve backend to pass test_backend_ops Nov 28, 2024
@slp slp merged commit 2025fa6 into ggerganov:master Nov 28, 2024
50 checks passed
@slp slp deleted the kompute-fix-tests branch November 28, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ggml changes relating to the ggml tensor library for machine learning Kompute https://github.com/KomputeProject/kompute/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants