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",
|
||||
"execution_count": 2,
|
||||
"metadata": {
|
||||
"id": "3CqtR2Fi5-vP"
|
||||
},
|
||||
"execution_count": null,
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os\n",
|
||||
@ -56,10 +53,35 @@
|
||||
"import torchaudio\n",
|
||||
"\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\""
|
||||
]
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
|
||||
30
notebooks/Multilingual_ASR.ipynb
generated
30
notebooks/Multilingual_ASR.ipynb
generated
@ -51,10 +51,33 @@
|
||||
"\n",
|
||||
"\n",
|
||||
"pd.options.display.max_rows = 100\n",
|
||||
"pd.options.display.max_colwidth = 1000\n",
|
||||
"DEVICE = \"cuda\" if torch.cuda.is_available() else \"cpu\""
|
||||
"pd.options.display.max_colwidth = 1000\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"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\""
|
||||
],
|
||||
"metadata": {
|
||||
"collapsed": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
@ -860,8 +883,7 @@
|
||||
"text": [
|
||||
"Importing the dtw module. When using in academic works please cite:\n",
|
||||
" T. Giorgino. Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Package.\n",
|
||||
" J. Stat. Soft., doi:10.18637/jss.v031.i07.\n",
|
||||
"\n"
|
||||
" J. Stat. Soft., doi:10.18637/jss.v031.i07.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user