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

NVPTX does not support Julia's address spaces #73

Closed
colbec opened this issue Jun 20, 2017 · 4 comments
Closed

NVPTX does not support Julia's address spaces #73

colbec opened this issue Jun 20, 2017 · 4 comments

Comments

@colbec
Copy link
Contributor

colbec commented Jun 20, 2017

CUDAdrv tests ok, but when I test CUDAnative with:

Julia Version 0.7.0-DEV.665
Commit 401b724fbb (2017-06-20 06:22 UTC)
Platform Info:
  OS: Linux (x86_64-suse-linux)
  CPU: Intel(R) Core(TM) i5-4460  CPU @ 3.20GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
Environment:

Pkg.status("CUDAnative")
 - CUDAnative                    0.3.0+             master

I get the eponymous error related to LLVMAddLowerGCFramePass.
Do I have a version issue here?

@maleadt
Copy link
Member

maleadt commented Jun 20, 2017

Yes, I know, CUDAnative is currently broken on master after JuliaLang/julia#21888. I haven't had the time to fix, please use release-0.6 or v0.6.0 for the time being.

@maleadt maleadt changed the title ccall: could not find function LLVMAddLowerGCFramePass CUDAnative broken on Julia master Jun 20, 2017
@colbec
Copy link
Contributor Author

colbec commented Jun 20, 2017

Now that the final binary has been released for Julia 0.6 I have switched to this for my main work. Since I did not compile from source, is there a way to match up CUDA tools with the binary version of 0.6? Currently the installation calls for the custom compile approach.

@maleadt
Copy link
Member

maleadt commented Jun 20, 2017

The source build is required for LLVM.jl, which builds a custom libLLVM_extra.so. The problem with binary dists is that 1) it doesn't ship the necessary build artifacts (llvm-config, LLVM headers, etc), and 2) there's going to be a compiler mismatch (the one used to build julia's binary LLVM, and the one you're using to build libLLVM_extra). The former you could "fix" by building libLLVM_extra once and caching that .so, the second issue you cannot fix. It might work, but there might be incompatibilities.

@maleadt maleadt changed the title CUDAnative broken on Julia master NVPTX does not support Julia's address spaces Jun 24, 2017
@maleadt
Copy link
Member

maleadt commented Jun 24, 2017

Triaged: after JuliaLang/julia#21888, Julia emits address spaces (on function parameters, loads, addrspacecasts and in the future possibly alloca's) on points in non-generic address spaces. NVPTX's ISEL doesn't support these, and we need to strip them from the IR. LLVM.jl isn't powerful enough for this, as the C API doesn't export any of Utils/CloneFunction, so we'd need to do this as part of base (ref JuliaLang/julia#22414).

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

No branches or pull requests

2 participants