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

LLVM error: Cannot cast between two non-generic address spaces #286

Closed
lawless-m opened this issue Jul 11, 2020 · 2 comments
Closed

LLVM error: Cannot cast between two non-generic address spaces #286

lawless-m opened this issue Jul 11, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@lawless-m
Copy link

lawless-m commented Jul 11, 2020

I get lots of these errors when running the pkg tests

It's the Julia pkg as checked out on POP_OS! - Julia 1.4

matt@pop-os: $ uname -a
Linux pop-os 5.4.0-7634-generic #38 1592497129 20.04 9a1ea2e-Ubuntu SMP Fri Jun 19 22:43:37 UTC  x86_64 x86_64 x86_64 GNU/Linux



(@v1.4) pkg> test CUDA

... snip many more, this is the last one in the list ...

Error in testset gpuarrays/mapreduce (old tests):
Error During Test at /home/matt/.julia/packages/GPUArrays/X4SqE/test/testsuite/mapreduce.jl:184
  Test threw exception
  Expression: A == deepcopy(A)
  LLVM error: Cannot cast between two non-generic address spaces
  Stacktrace:
   [1] handle_error(::Cstring) at /home/matt/.julia/packages/LLVM/T8ZBA/src/core/context.jl:105
   [2] macro expansion at /home/matt/.julia/packages/LLVM/T8ZBA/src/util.jl:109 [inlined]
   [3] LLVMTargetMachineEmitToMemoryBuffer(::LLVM.TargetMachine, ::LLVM.Module, ::LLVM.API.LLVMCodeGenFileType, ::Base.RefValue{Cstring}, ::Base.RefValue{Ptr{LLVM.API.LLVMOpaqueMemoryBuffer}}) at /home/matt/.julia/packages/LLVM/T8ZBA/lib/libLLVM_h.jl:3512
   [4] emit(::LLVM.TargetMachine, ::LLVM.Module, ::LLVM.API.LLVMCodeGenFileType) at /home/matt/.julia/packages/LLVM/T8ZBA/src/targetmachine.jl:43
   [5] mcgen at /home/matt/.julia/packages/GPUCompiler/FoVMi/src/mcgen.jl:73 [inlined]
   [6] macro expansion at /home/matt/.julia/packages/TimerOutputs/dVnaw/src/TimerOutput.jl:206 [inlined]
   [7] macro expansion at /home/matt/.julia/packages/GPUCompiler/FoVMi/src/driver.jl:254 [inlined]
   [8] macro expansion at /home/matt/.julia/packages/TimerOutputs/dVnaw/src/TimerOutput.jl:206 [inlined]
   [9] codegen(::Symbol, ::GPUCompiler.CompilerJob{GPUCompiler.PTXCompilerTarget,CUDA.CUDACompilerParams}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, strip::Bool, validate::Bool, only_entry::Bool) at /home/matt/.julia/packages/GPUCompiler/FoVMi/src/driver.jl:250
   [10] compile(::Symbol, ::GPUCompiler.CompilerJob{GPUCompiler.PTXCompilerTarget,CUDA.CUDACompilerParams}; libraries::Bool, deferred_codegen::Bool, optimize::Bool, strip::Bool, validate::Bool, only_entry::Bool) at /home/matt/.julia/packages/GPUCompiler/FoVMi/src/driver.jl:39
   [11] compile at /home/matt/.julia/packages/GPUCompiler/FoVMi/src/driver.jl:35 [inlined]
   [12] _cufunction(::GPUCompiler.FunctionSpec{typeof(CUDA.partial_mapreduce_grid),Tuple{typeof(identity),typeof(&),Bool,CartesianIndices{1,Tuple{Base.OneTo{Int64}}},CartesianIndices{1,Tuple{Base.OneTo{Int64}}},Val{true},CuDeviceArray{Bool,2,CUDA.AS.Global},Base.Broadcast.Broadcasted{CUDA.CuArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(==),Tuple{CuDeviceArray{Bool,1,CUDA.AS.Global},CuDeviceArray{Bool,1,CUDA.AS.Global}}}}}; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/matt/.julia/packages/CUDA/sjcZt/src/compiler/execution.jl:308
   [13] _cufunction at /home/matt/.julia/packages/CUDA/sjcZt/src/compiler/execution.jl:302 [inlined]
   [14] #100 at /home/matt/.julia/packages/GPUCompiler/FoVMi/src/cache.jl:21 [inlined]
   [15] get!(::GPUCompiler.var"#100#101"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},typeof(CUDA._cufunction),GPUCompiler.FunctionSpec{typeof(CUDA.partial_mapreduce_grid),Tuple{typeof(identity),typeof(&),Bool,CartesianIndices{1,Tuple{Base.OneTo{Int64}}},CartesianIndices{1,Tuple{Base.OneTo{Int64}}},Val{true},CuDeviceArray{Bool,2,CUDA.AS.Global},Base.Broadcast.Broadcasted{CUDA.CuArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(==),Tuple{CuDeviceArray{Bool,1,CUDA.AS.Global},CuDeviceArray{Bool,1,CUDA.AS.Global}}}}}}, ::Dict{UInt64,Any}, ::UInt64) at ./dict.jl:452
   [16] macro expansion at ./lock.jl:183 [inlined]
   [17] check_cache(::typeof(CUDA._cufunction), ::GPUCompiler.FunctionSpec{typeof(CUDA.partial_mapreduce_grid),Tuple{typeof(identity),typeof(&),Bool,CartesianIndices{1,Tuple{Base.OneTo{Int64}}},CartesianIndices{1,Tuple{Base.OneTo{Int64}}},Val{true},CuDeviceArray{Bool,2,CUDA.AS.Global},Base.Broadcast.Broadcasted{CUDA.CuArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(==),Tuple{CuDeviceArray{Bool,1,CUDA.AS.Global},CuDeviceArray{Bool,1,CUDA.AS.Global}}}}}, ::UInt64; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/matt/.julia/packages/GPUCompiler/FoVMi/src/cache.jl:19
   [18] + at ./int.jl:53 [inlined]
   [19] hash_64_64 at ./hashing.jl:35 [inlined]
   [20] hash_uint64 at ./hashing.jl:62 [inlined]
   [21] hx at ./float.jl:568 [inlined]
   [22] hash at ./float.jl:571 [inlined]
   [23] cached_compilation(::typeof(CUDA._cufunction), ::GPUCompiler.FunctionSpec{typeof(CUDA.partial_mapreduce_grid),Tuple{typeof(identity),typeof(&),Bool,CartesianIndices{1,Tuple{Base.OneTo{Int64}}},CartesianIndices{1,Tuple{Base.OneTo{Int64}}},Val{true},CuDeviceArray{Bool,2,CUDA.AS.Global},Base.Broadcast.Broadcasted{CUDA.CuArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(==),Tuple{CuDeviceArray{Bool,1,CUDA.AS.Global},CuDeviceArray{Bool,1,CUDA.AS.Global}}}}}, ::UInt64; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/matt/.julia/packages/GPUCompiler/FoVMi/src/cache.jl:0
   [24] cached_compilation(::Function, ::GPUCompiler.FunctionSpec{typeof(CUDA.partial_mapreduce_grid),Tuple{typeof(identity),typeof(&),Bool,CartesianIndices{1,Tuple{Base.OneTo{Int64}}},CartesianIndices{1,Tuple{Base.OneTo{Int64}}},Val{true},CuDeviceArray{Bool,2,CUDA.AS.Global},Base.Broadcast.Broadcasted{CUDA.CuArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(==),Tuple{CuDeviceArray{Bool,1,CUDA.AS.Global},CuDeviceArray{Bool,1,CUDA.AS.Global}}}}}, ::UInt64) at /home/matt/.julia/packages/GPUCompiler/FoVMi/src/cache.jl:37
   [25] cufunction(::Function, ::Type{T} where T; name::Nothing, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/matt/.julia/packages/CUDA/sjcZt/src/compiler/execution.jl:296
   [26] cufunction(::Function, ::Type{T} where T) at /home/matt/.julia/packages/CUDA/sjcZt/src/compiler/execution.jl:291
   [27] macro expansion at /home/matt/.julia/packages/CUDA/sjcZt/src/mapreduce.jl:197 [inlined]
   [28] mapreducedim!(::Function, ::Function, ::CuArray{Bool,1,Nothing}, ::Base.Broadcast.Broadcasted{CUDA.CuArrayStyle{1},Tuple{Base.OneTo{Int64}},typeof(==),Tuple{CuArray{Bool,1,Nothing},CuArray{Bool,1,Nothing}}}; init::Bool) at /home/matt/.julia/packages/CUDA/sjcZt/lib/nvtx/highlevel.jl:83
   [29] _mapreduce(::Function, ::Function, ::CuArray{Bool,1,Nothing}, ::Vararg{CuArray{Bool,1,Nothing},N} where N; dims::Function, init::Nothing) at /home/matt/.julia/packages/GPUArrays/X4SqE/src/host/mapreduce.jl:62
   [30] #mapreduce#25 at /home/matt/.julia/packages/GPUArrays/X4SqE/src/host/mapreduce.jl:28 [inlined]
   [31] mapreduce at /home/matt/.julia/packages/GPUArrays/X4SqE/src/host/mapreduce.jl:28 [inlined]
   [32] ==(::CuArray{Bool,1,Nothing}, ::CuArray{Bool,1,Nothing}) at /home/matt/.julia/packages/GPUArrays/X4SqE/src/host/mapreduce.jl:78
   [33] eval_test(::Expr, ::Expr, ::LineNumberNode, ::Bool) at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:246
   [34] macro expansion at /home/matt/.julia/packages/GPUArrays/X4SqE/test/testsuite/mapreduce.jl:184 [inlined]
   [35] macro expansion at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:1113 [inlined]
   [36] macro expansion at /home/matt/.julia/packages/GPUArrays/X4SqE/test/testsuite/mapreduce.jl:177 [inlined]
   [37] macro expansion at /build/julia-98cBbp/julia-1.4.1+dfsg/usr/share/julia/stdlib/v1.4/Test/src/Test.jl:1113 [inlined]
   [38] (::Main.TestSuite.var"#166#184")(::Type{T} where T) at /home/matt/.julia/packages/GPUArrays/X4SqE/test/testsuite/mapreduce.jl:124
  
ERROR: LoadError: Test run finished with errors
in expression starting at /home/matt/.julia/packages/CUDA/sjcZt/test/runtests.jl:473
ERROR: Package CUDA errored during testing
@lawless-m lawless-m added the bug Something isn't working label Jul 11, 2020
@maleadt
Copy link
Member

maleadt commented Jul 11, 2020

Pop OS must not be using our patched LLVM; that's an unsupported configuration. Please use the official binaries and/or mention to the Pop OS maintainers that they should use our version of LLVM.

@maleadt maleadt closed this as completed Jul 11, 2020
@maleadt
Copy link
Member

maleadt commented Jul 12, 2020

Added a note about that here: 902b53e

Also, please use triple quotes to delimit output when filing an issue, makes everything much more legible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants