spcl / spcl/dace

csdfg can not handle torch.rand() tensor in getting_started.ipynb

Open
#1,165 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
593
Forks
163
Avg merge
2d 23h
Merged PRs (30d)
60

Description

**Describe the bug**
I replace `[12] tester = np.random.rand(2000, 4000)` by
```
import torch
tester = torch.rand(2000,4000)
tester
```
and `%timeit csdfg(A=tester, N=np.int32(2000))` by
`%timeit csdfg(A=tester,N=2000)`
which means use torch.tensor() to replace numpy array as input, but we almost get an error of "Kernel Restarting":

**To Reproduce**
Changes the code as I mentioned, then run all cells.

**Expected behavior**
Output the time of `csdfg(A=tester,N=2000)`.

**Screenshots**
Almost we will get an error:
![fe66eb6b68d5142e6f6de24b75193b8](https://user-images.githubusercontent.com/38322329/205055006-3d902409-a43a-4942-a93f-0fd3cbad1c9e.png)

Sometimes we can get expect result (without any code changes):
![056fe4ed6456de44139542e53585d3d](https://user-images.githubusercontent.com/38322329/205054729-d9380268-e229-4d90-a735-9808a1510844.png)

**Desktop (please complete the following information):**
- OS: Linux
- Browser: Chrome
- Version: 106.0.52

**Additional context**
The error also occurs on Windows OS.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.