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

Add HPUs (Intel® Gaudi®) support #2450

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b7069e5
Add initial imports and usage of `wrap_in_hpu_graph`
PiotrBLL Oct 31, 2024
8c3680c
Add requires_hpu marker in tests
PiotrBLL Oct 31, 2024
c7fe328
Add testing hpu file
PiotrBLL Oct 31, 2024
2365157
Update requirements
PiotrBLL Oct 31, 2024
9269b2a
Add HPU support in transcribe and timing + tests
PiotrBLL Oct 31, 2024
52062dd
Add hpu_utils
PiotrBLL Oct 31, 2024
bee2865
Fix importing habana-frameworks library conditionally
PiotrBLL Nov 5, 2024
c479ff3
Add hpu transcribe test
PiotrBLL Nov 5, 2024
6e66088
Add Dockerfile_hpu + README.md section of hpu usage
PiotrBLL Nov 5, 2024
1be8041
Add hpu usage info in jupyter notebook files
PiotrBLL Nov 5, 2024
a49838c
Add Pytorch Docker images info in README.md
PiotrBLL Nov 6, 2024
3825dd0
Rename and Fix Dockerfile.hpu, add .dockerignore, update in README.md
PiotrBLL Nov 7, 2024
9e39365
Add optimum[habana]==1.13.1 in Dockerfile.hpu
PiotrBLL Nov 7, 2024
82a5380
Fix Dockerfile.hpu `ffmpeg` package install, update README.md whisper…
PiotrBLL Nov 8, 2024
2d5a552
Fix hpu device_name typo
PiotrBLL Nov 8, 2024
50adb76
Fix warnings
PiotrBLL Nov 9, 2024
f6ccd01
Wrap model to HPU + update Dockerfile packages
PiotrBLL Nov 11, 2024
32ec355
Upgrade the Dockerfile.hpu ubuntu image
PiotrBLL Nov 11, 2024
e1d4b7b
Add checking sparse tensors in Whisper model
PiotrBLL Nov 11, 2024
d36696f
Add util checking hpu tensor
PiotrBLL Nov 11, 2024
b0cf21b
Add HPU checking in decoding and transcribe handle
PiotrBLL Nov 11, 2024
e1545f4
Fix: compute_device name in Whisper model
PiotrBLL Nov 11, 2024
adaec5a
Add requirements_hpu.txt
PiotrBLL Nov 12, 2024
866fece
Delete redundant linux packages in Dockerfile.hpu + update README.md
PiotrBLL Nov 12, 2024
3e826a2
Delete timestamps test
PiotrBLL Nov 12, 2024
6770610
Update Dockerfile.hpu and README.md files:
PiotrBLL Nov 12, 2024
8c4e659
Add word_timestamps fix in model.transcribe
PiotrBLL Nov 19, 2024
1a42019
Merge pull request #2 from BlueLabelLabs/feat/Add-HPU-support
PiotrBLL Nov 20, 2024
cd48514
Merge branch 'openai:main' into main
PiotrBLL Nov 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add util checking hpu tensor
PiotrBLL committed Nov 11, 2024
commit d36696f808c25e18933fe093db02e38cac968e26
11 changes: 8 additions & 3 deletions whisper/hpu_utils.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import torch
from habana_frameworks.torch.utils.library_loader import load_habana_module

load_habana_module()

def get_x_hpu(x_numpy):
from habana_frameworks.torch.utils.library_loader import load_habana_module

load_habana_module()

x_hpu = torch.from_numpy(x_numpy).to("hpu")
return x_hpu


def is_hpu_device(device: torch.device):
return device in (torch.device("hpu:0"), torch.device("hpu"))