mirror of
https://github.com/openai/whisper.git
synced 2025-11-24 06:26:03 +00:00
Add hpu usage info in jupyter notebook files
This commit is contained in:
parent
6e66088bd0
commit
1be8041ede
36
notebooks/LibriSpeech.ipynb
generated
36
notebooks/LibriSpeech.ipynb
generated
@ -36,10 +36,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": null,
|
||||||
"metadata": {
|
|
||||||
"id": "3CqtR2Fi5-vP"
|
|
||||||
},
|
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"import os\n",
|
"import os\n",
|
||||||
@ -56,10 +53,35 @@
|
|||||||
"import torchaudio\n",
|
"import torchaudio\n",
|
||||||
"\n",
|
"\n",
|
||||||
"from tqdm.notebook import tqdm\n",
|
"from tqdm.notebook import tqdm\n",
|
||||||
"\n",
|
"\n"
|
||||||
"\n",
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"source": [
|
||||||
|
"# Set the `DEVICE` based on available hardware\n",
|
||||||
|
"### If you're running on a machine with Intel Gaudi support, you can set the DEVICE to \"hpu\"\n",
|
||||||
|
"### This can be done by setting the device to \"hpu\" if Gaudi is available.\n",
|
||||||
|
"### Ensure you have the Habana PyTorch extension installed and properly configured."
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# DEVICE = \"hpu\"\n",
|
||||||
"DEVICE = \"cuda\" if torch.cuda.is_available() else \"cpu\""
|
"DEVICE = \"cuda\" if torch.cuda.is_available() else \"cpu\""
|
||||||
]
|
],
|
||||||
|
"metadata": {
|
||||||
|
"collapsed": false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
|
|||||||
8472
notebooks/Multilingual_ASR.ipynb
generated
8472
notebooks/Multilingual_ASR.ipynb
generated
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user