Error when attempting to run on a P40

#2
by ReXommendation - opened

Traceback (most recent call last):
File "/home/rexommendation/Programs/musicgen-large/musicgen.py", line 10, in
wav = model.generate(descriptions) # generates 3 samples.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/audiocraft/models/musicgen.py", line 144, in generate
return self._generate_tokens(attributes, prompt_tokens, progress)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/audiocraft/models/musicgen.py", line 279, in _generate_tokens
gen_tokens = self.lm.generate(prompt_tokens, attributes, callback=callback, **self.generation_params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/audiocraft/models/lm.py", line 489, in generate
next_token = self._sample_next_token(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/audiocraft/models/lm.py", line 354, in _sample_next_token
all_logits = model(
^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/audiocraft/models/lm.py", line 253, in forward
out = self.transformer(input
, cross_attention_src=cross_attention_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/audiocraft/modules/transformer.py", line 657, in forward
x = self._apply_layer(layer, x, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/audiocraft/modules/transformer.py", line 614, in _apply_layer
return layer(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/audiocraft/modules/transformer.py", line 508, in forward
self._sa_block(self.norm1(x), src_mask, src_key_padding_mask))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/torch/nn/modules/transformer.py", line 581, in _sa_block
x = self.self_attn(x, x, x,
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/audiocraft/modules/transformer.py", line 367, in forward
x = ops.memory_efficient_attention(q, k, v, attn_mask, p=p)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/xformers/ops/fmha/init.py", line 197, in memory_efficient_attention
return _memory_efficient_attention(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/xformers/ops/fmha/init.py", line 293, in _memory_efficient_attention
return _memory_efficient_attention_forward(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/xformers/ops/fmha/init.py", line 309, in _memory_efficient_attention_forward
op = _dispatch_fw(inp)
^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/xformers/ops/fmha/dispatch.py", line 95, in _dispatch_fw
return _run_priority_list(
^^^^^^^^^^^^^^^^^^^
File "/home/rexommendation/.local/lib/python3.11/site-packages/xformers/ops/fmha/dispatch.py", line 70, in _run_priority_list
raise NotImplementedError(msg)
NotImplementedError: No operator found for memory_efficient_attention_forward with inputs:
query : shape=(6, 1, 32, 64) (torch.float16)
key : shape=(6, 1, 32, 64) (torch.float16)
value : shape=(6, 1, 32, 64) (torch.float16)
attn_bias : <class 'NoneType'>
p : 0
flshattF is not supported because:
xFormers wasn't build with CUDA support
requires a GPU with compute capability > 7.5
tritonflashattF is not supported because:
xFormers wasn't build with CUDA support
requires A100 GPU
cutlassF is not supported because:
xFormers wasn't build with CUDA support
smallkF is not supported because:
xFormers wasn't build with CUDA support
dtype=torch.float16 (supported: {torch.float32})
max(query.shape[-1] != value.shape[-1]) > 32
unsupported embed per head: 64

Sign up or log in to comment