Error when i run a very simple program with gpycnn
- Dominant language
- C++
- Stars
- 19
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
When I try to use gpu, I get a error "Segmentation fault (core dumped)"
My code is here, very simple:
```
#!/usr/bin/python
#coding: utf-8
import gpycnn as G
import pycnn as C
import numpy as np
model = G.Model()
model.add_parameters('w', (2, 2))
w = model['w']
matrix = np.random.uniform(-0.01, 0.01, w.shape())
w.load_array(matrix)
```
My code use the pycnn is ok, but when I convert to gpycnn, it will crash and will catch such problem
"Segmentation fault (core dumped)"
By the way, the line with __load\_ array__ can cause the error.
Did I use gpu model parameters with the wrong function?
Could you help me deal with it?
Thank you!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the minimal gpycnn example from the issue, focusing on gpycnn.Model, model.add_parameters, and w.load_array. Compare that path with the working pycnn version and trace the GPU parameter-loading implementation; done means the example no longer segfaults when loading the generated array.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100