You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for the codes!
I run into a problem when executing:
import torch
from performer_pytorch import Performer
model = Performer(
dim = 512,
depth = 1,
heads = 8,
causal = True
).cuda()
x = torch.randn(1, 2048, 512).cuda()
y = model(x) # (1, 2048, 512)
x.shape, y.shape
It works fine if I don't use cuda, but when I use cuda it said:
RuntimeError Traceback (most recent call last)
in
10
11 x = torch.randn(1, 2048, 512).cuda()
---> 12 y = model(x) # (1, 2048, 512)
13 x.shape, y.shape
/ext3/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
720 result = self._slow_forward(*input, **kwargs)
721 else:
--> 722 result = self.forward(*input, **kwargs)
723 for hook in itertools.chain(
724 _global_forward_hooks.values(),
/ext3/miniconda3/lib/python3.8/site-packages/performer_pytorch/performer_pytorch.py in forward(self, x, **kwargs)
341
342 def forward(self, x, **kwargs):
--> 343 return self.net(x, **kwargs)
344
345 class PerformerLM(nn.Module):
/ext3/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
720 result = self._slow_forward(*input, **kwargs)
721 else:
--> 722 result = self.forward(*input, **kwargs)
723 for hook in itertools.chain(
724 _global_forward_hooks.values(),
/ext3/miniconda3/lib/python3.8/site-packages/performer_pytorch/reversible.py in forward(self, x, **kwargs)
136
137 for (f, g), (f_args, g_args) in layers_and_args:
--> 138 x = x + f(x, **f_args)
139 x = x + g(x, **g_args)
140 return x
/ext3/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
720 result = self._slow_forward(*input, **kwargs)
721 else:
--> 722 result = self.forward(*input, **kwargs)
723 for hook in itertools.chain(
724 _global_forward_hooks.values(),
/ext3/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
720 result = self._slow_forward(*input, **kwargs)
721 else:
--> 722 result = self.forward(*input, **kwargs)
723 for hook in itertools.chain(
724 _global_forward_hooks.values(),
/ext3/miniconda3/lib/python3.8/site-packages/performer_pytorch/performer_pytorch.py in forward(self, x, context, mask, context_mask)
297 attn_outs.append(out)
298
--> 299 out = torch.cat(attn_outs, dim = 1)
300 out = rearrange(out, 'b h n d -> b n (h d)')
301 out = self.to_out(out)
RuntimeError: CUDA error: no kernel image is available for execution on the device
The text was updated successfully, but these errors were encountered:
I checked that I could run some simple model with cuda. I am not sure if performer requires some certain environment. I am using pytorch==1.6.0 with cuda 10.1
Hi, thanks for the codes!
I run into a problem when executing:
It works fine if I don't use cuda, but when I use cuda it said:
RuntimeError Traceback (most recent call last)
in
10
11 x = torch.randn(1, 2048, 512).cuda()
---> 12 y = model(x) # (1, 2048, 512)
13 x.shape, y.shape
/ext3/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
720 result = self._slow_forward(*input, **kwargs)
721 else:
--> 722 result = self.forward(*input, **kwargs)
723 for hook in itertools.chain(
724 _global_forward_hooks.values(),
/ext3/miniconda3/lib/python3.8/site-packages/performer_pytorch/performer_pytorch.py in forward(self, x, **kwargs)
341
342 def forward(self, x, **kwargs):
--> 343 return self.net(x, **kwargs)
344
345 class PerformerLM(nn.Module):
/ext3/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
720 result = self._slow_forward(*input, **kwargs)
721 else:
--> 722 result = self.forward(*input, **kwargs)
723 for hook in itertools.chain(
724 _global_forward_hooks.values(),
/ext3/miniconda3/lib/python3.8/site-packages/performer_pytorch/reversible.py in forward(self, x, **kwargs)
136
137 for (f, g), (f_args, g_args) in layers_and_args:
--> 138 x = x + f(x, **f_args)
139 x = x + g(x, **g_args)
140 return x
/ext3/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
720 result = self._slow_forward(*input, **kwargs)
721 else:
--> 722 result = self.forward(*input, **kwargs)
723 for hook in itertools.chain(
724 _global_forward_hooks.values(),
/ext3/miniconda3/lib/python3.8/site-packages/performer_pytorch/performer_pytorch.py in forward(self, x, **kwargs)
215 self.fn = fn
216 def forward(self, x, **kwargs):
--> 217 return self.fn(self.norm(x), **kwargs)
218
219 class Chunk(nn.Module):
/ext3/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
720 result = self._slow_forward(*input, **kwargs)
721 else:
--> 722 result = self.forward(*input, **kwargs)
723 for hook in itertools.chain(
724 _global_forward_hooks.values(),
/ext3/miniconda3/lib/python3.8/site-packages/performer_pytorch/performer_pytorch.py in forward(self, x, context, mask, context_mask)
297 attn_outs.append(out)
298
--> 299 out = torch.cat(attn_outs, dim = 1)
300 out = rearrange(out, 'b h n d -> b n (h d)')
301 out = self.to_out(out)
RuntimeError: CUDA error: no kernel image is available for execution on the device
The text was updated successfully, but these errors were encountered: