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

SIGBUS error when run with build tag cuda #254

Open
datastream opened this issue Nov 23, 2018 · 4 comments
Open

SIGBUS error when run with build tag cuda #254

datastream opened this issue Nov 23, 2018 · 4 comments
Labels

Comments

@datastream
Copy link

datastream commented Nov 23, 2018

OS: debian 9.3
Kernal: 4.9.0-4-amd64 #1 SMP Debian 4.9.65-3 (2017-12-03) x86_64 GNU/Linux
CUDA: 9.0
cuDNN: 7.0.5
When i use LispMachine and build program with go build -tags='cuda', I got a "signal SIGBUS" error.
After some debug, it turn out memory alloc failed.

mem, err := op.Get(op.Device, memsize)

+++ b/dual.go
@@ -196,11 +196,12 @@ func dvUnitManaged(v Value, op *ExternalOp) (*dualValue, error) {
        dt := v.Dtype()
        memsize := calcMemSize(dt, s)
        // allocate on device
+       fmt.Println(dt,s,memsize)
        mem, err := op.Get(op.Device, memsize)
        if err != nil {
                return nil, err
        }
+       fmt.Println("----", mem.MemSize())
        d, err := makeValueFromMem(TypeOf(v), s, mem)
        if err != nil {
                return nil, err

it turn out like this.

float32 (79) 316
---- 7897856
float32 (79) 316
2018/11/23 23:55:36 MEMSIZE ERR MemGetAddressRange: InvalidContext
---- 0
float32 (79) 316
2018/11/23 23:55:36 MEMSIZE ERR MemGetAddressRange: InvalidContext
---- 0
float32 () 4
2018/11/23 23:55:36 MEMSIZE ERR MemGetAddressRange: InvalidContext
---- 0
float32 () 4
2018/11/23 23:55:36 MEMSIZE ERR MemGetAddressRange: InvalidContext
---- 0
float32 (79) 316
2018/11/23 23:55:36 MEMSIZE ERR MemGetAddressRange: InvalidContext
---- 0
@chewxy
Copy link
Member

chewxy commented Nov 23, 2018

Hm - do you have an example of your NN?

@chewxy
Copy link
Member

chewxy commented Nov 23, 2018

(the allocator tries occasionally to do stupid "smart" things based on heuristics - so it may be just that)

@datastream
Copy link
Author

I'm using github.com/owulveryck/lstm to handle system log info. The test program is very similar to https://github.com/owulveryck/lstm/blob/master/example/train/train.go.

@owulveryck
Copy link
Member

Maybe a fix for issue #297 will fix this as well?

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

No branches or pull requests

3 participants