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: an illegal memory access was encountered when >1023 interpolations #7

Open
stefangroha opened this issue Jun 1, 2020 · 0 comments

Comments

@stefangroha
Copy link

Example:

x = torch.tensor([0.2,0.3,0.4,0.5],device=device).float()
y = torch.tensor(np.exp([0.2,0.3,0.4,0.5]),device=device).float()

for i in range(1024):
    Interp1d()(x, y, torch.tensor([0.2,0.3,1.],device=device))

After iteration 1023 I get the following error message:

/opt/conda/lib/python3.7/site-packages/torchinterp1d/interp1d.py in forward(ctx, x, y, xnew, out)
    113         # must be inserted to preserve order. And we want the index of the
    114         # preceeding value.
--> 115         ind -= 1
    116         # we clamp the index, because the number of intervals is x.shape-1,
    117         # and the left neighbour should hence be at most number of intervals

RuntimeError: CUDA error: an illegal memory access was encountered

Thank you for the package and your time!

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

1 participant