Training without Nvidia GPU / CUDA

The LibriSpeech transducer ASR recipe fails to run with cpu only, i.e.
python train.py hparams/train.yaml --device=cpu

It looks for a CUDA driver.
/home/aviadb/datasets/libispeech/rirs_noises.zip exists. Skipping download
results/CRDNN_BPE_RNNT_LM_100H/1234/save/LM.yaml exists. Skipping download
results/CRDNN_BPE_RNNT_LM_100H/1234/save/tok.model exists. Skipping download
Traceback (most recent call last):
File “train.py”, line 367, in
hparams = load_hyperpyyaml(fin, overrides)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/hyperpyyaml/core.py”, line 182, in load_hyperpyyaml
hparams = yaml.load(yaml_stream, Loader=yaml.Loader)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/yaml/init.py”, line 114, in load
return loader.get_single_data()
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/yaml/constructor.py”, line 51, in get_single_data
return self.construct_document(node)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/yaml/constructor.py”, line 55, in construct_document
data = self.construct_object(node)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/yaml/constructor.py”, line 107, in construct_object
for dummy in generator:
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/yaml/constructor.py”, line 413, in construct_yaml_map
value = self.construct_mapping(node)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/yaml/constructor.py”, line 218, in construct_mapping
return super().construct_mapping(node, deep=deep)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/yaml/constructor.py”, line 143, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/yaml/constructor.py”, line 102, in construct_object
data = constructor(self, tag_suffix, node)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/hyperpyyaml/core.py”, line 429, in construct_object
return callable
(*args, **kwargs)
File “/home/aviadb/tools/speechbrain/recipes/LibriSpeech/LM/pretrained/pretrained.py”, line 113, in init
self.model = self.hparams[“model”].to(self.device)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 612, in to
return self._apply(convert)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 359, in _apply
module._apply(fn)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 359, in _apply
module._apply(fn)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 381, in _apply
param_applied = fn(param)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/torch/nn/modules/module.py”, line 610, in convert
return t.to(device, dtype if t.is_floating_point() else None, non_blocking)
File “/home/aviadb/tools/miniconda/envs/speechbrain/lib/python3.8/site-packages/torch/cuda/init.py”, line 172, in _lazy_init
torch._C._cuda_init()
RuntimeError: The NVIDIA driver on your system is too old

I’d expect to have the possibility to train/test/validate without relying on CUDA and Nvidia GPUs.
For example, evaluating training performance with a small number of epochs.
This option is available in EspNet.

Hey @aviadb, thanks a lot for the feedback. It should run on cpu only, if it doesn’t then there is a mistake somewhere that we have to fix.

Could you please consider posting issues on GitHub instead ? I think we will try to rely on Discourse only for non-code-based discussions (it’s prettier and easier to track on GitHub) :smiley:

You’ll certainly see a fix on this soon.