Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CUDA error: device-side assert triggered #52

Open
kkashleva opened this issue Jun 3, 2022 · 2 comments
Open

CUDA error: device-side assert triggered #52

kkashleva opened this issue Jun 3, 2022 · 2 comments

Comments

@kkashleva
Copy link

Hi!
When I try to parse with

tagged_sent = p.posdep(data, is_sent=True)

I got such an error. My input is a list of strings. Environment is Google Colab.

RuntimeError                              Traceback (most recent call last)
[<ipython-input-17-776a5ac68296>](https://localhost:8080/#) in <module>()
----> 1 tagged_sent = p.posdep(data,is_sent=True)
2 frames
[/usr/local/lib/python3.7/dist-packages/trankit/models/classifiers.py](https://localhost:8080/#) in predict(self, batch, word_reprs, cls_reprs)
    170         unlabeled_scores = self.unlabeled(dep_reprs, dep_reprs).squeeze(3)
    171 
--> 172         diag = torch.eye(batch.head_idxs.size(-1) + 1, dtype=torch.bool).unsqueeze(0).to(self.config.device)
    173         unlabeled_scores.masked_fill_(diag, -float('inf'))
    174 
RuntimeError: CUDA error: device-side assert triggered
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
@nagaraju291990
Copy link

Hi @kkashleva did you fix this error? I am also facing this error.

@nagaraju291990
Copy link

@kkashleva setting
'max_input_length': 1024,
solved my issue.
Hope this might help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants