Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

SegFault for some getindex calls #38

Closed
denizyuret opened this issue Dec 2, 2017 · 9 comments
Closed

SegFault for some getindex calls #38

denizyuret opened this issue Dec 2, 2017 · 9 comments

Comments

@denizyuret
Copy link

Please see denizyuret/Knet.jl#198.

@maleadt
Copy link
Member

maleadt commented Dec 2, 2017

The warning: ignoring debug info with an invalid version (0) in error is because you're running from release-0.6, which isn't supported, but shouldn't break anything. I don't have time to look into it right now, but you could building LLVM with assertions enabled.

@denizyuret
Copy link
Author

denizyuret commented Dec 2, 2017 via email

@ilkerkesen
Copy link
Contributor

That snippet gives me CUDA illegal memory access error,

https://gist.github.com/ilkerkesen/c921d41894b8667d8acc6e71803f04fe

@denizyuret
Copy link
Author

I think the answer to my second question is: https://llvm.org/docs/CMake.html

@vchuravy
Copy link
Member

vchuravy commented Dec 2, 2017

Do build LLVM with assertions enabled you create Make.user file with

FORCE_ASSERTIONS=1
LLVM_ASSERTIONS=1

And the you purge you need to reconfigure your LLVM build or just do a make -C deps distclean-llvm

0.6.0 should work fine.

@maleadt
Copy link
Member

maleadt commented Dec 2, 2017

0.6.0 is supported, 0.6.1 can be buggy. 0.6.2 will be supported, but release-0.6 currently isn't (for version check reasons that do make sense). 0.7 is also supported, but requires a different version of LLVM.jl (tagged, so it should install automatically).

@denizyuret your code triggers an assertion in a Julia pass:

julia> @show summary(a[:,[2,4],2])
julia: julia-0.6/src/llvm-gcroot.cpp:796: void (anonymous namespace)::JuliaGCAllocator::allocate_frame(): Assertion `bb != NULL' failed.

I'll try to investigate next week. Might be caused by CUDAnative generating invalid IR (possibly only invalid with regard to the design of Julia's codegen and passes, undocumented requirements etc).

@MikeInnes
Copy link
Collaborator

But these don't come up in GPUArrays.jl's implementation, right? So just removing the CuArrays kernel should fix this?

@denizyuret
Copy link
Author

I can confirm that as @SimonDanisch suggested commenting out https://github.com/JuliaGPU/CuArrays.jl/blob/master/src/CuArrays.jl#L13, i.e. include("indexing.jl") stopped the error and now the test runs fine.

@MikeInnes
Copy link
Collaborator

Closed with 00276e3, see also JuliaGPU/GPUArrays.jl#90.

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

No branches or pull requests

5 participants