{"action":"created","issue":{"url":"https://api.github.com/repos/FluxML/CuArrays.jl/issues/13","repository_url":"https://api.github.com/repos/FluxML/CuArrays.jl","labels_url":"https://api.github.com/repos/FluxML/CuArrays.jl/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/FluxML/CuArrays.jl/issues/13/comments","events_url":"https://api.github.com/repos/FluxML/CuArrays.jl/issues/13/events","html_url":"https://github.com/FluxML/CuArrays.jl/issues/13","id":254885565,"number":13,"title":"Fractional powers give LLVM error","user":{"login":"alha02","id":28259800,"avatar_url":"https://avatars0.githubusercontent.com/u/28259800?v=4","gravatar_id":"","url":"https://api.github.com/users/alha02","html_url":"https://github.com/alha02","followers_url":"https://api.github.com/users/alha02/followers","following_url":"https://api.github.com/users/alha02/following{/other_user}","gists_url":"https://api.github.com/users/alha02/gists{/gist_id}","starred_url":"https://api.github.com/users/alha02/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alha02/subscriptions","organizations_url":"https://api.github.com/users/alha02/orgs","repos_url":"https://api.github.com/users/alha02/repos","events_url":"https://api.github.com/users/alha02/events{/privacy}","received_events_url":"https://api.github.com/users/alha02/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-09-03T16:40:53Z","updated_at":"2017-09-04T14:51:05Z","closed_at":null,"author_association":"NONE","body":"```julia\r\n   _       _ _(_)_     |  A fresh approach to technical computing\r\n  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org\r\n   _ _   _| |_  __ _   |  Type \"?help\" for help.\r\n  | | | | | | |/ _` |  |\r\n  | | |_| | | | (_| |  |  Version 0.6.0 (2017-06-19 13:05 UTC)\r\n _/ |\\__'_|_|_|\\__'_|  |  \r\n|__/                   |  x86_64-linux-gnu\r\n```\r\n```julia\r\njulia> using CuArrays\r\n\r\njulia> CuArrays.allowslow(false)\r\nfalse\r\n\r\njulia> x = cu(abs.(randn(10, 10)))\r\n10×10 CuArray{Float64,2}:\r\n 1.01167    0.926641   0.122783   0.433447  0.471071   …  0.641311  0.322102  1.11901    1.08687 \r\n 0.174375   0.902149   0.708563   0.100777  1.17209       0.984024  1.54349   2.31564    1.42121 \r\n 0.880497   0.260067   0.182906   0.321197  0.419981      1.0425    1.03248   2.39686    0.466474\r\n 0.455405   0.189683   0.970617   1.02481   1.20051       0.548943  1.0183    0.922669   0.674622\r\n 1.65143    0.423125   0.199559   0.756164  0.769089      1.65847   0.336149  0.0769364  0.728361\r\n 1.13424    0.463791   0.487644   0.422425  0.642065   …  0.582538  0.699725  0.0974422  0.725078\r\n 1.42058    0.551611   1.55393    1.81143   0.848366      2.38784   0.995038  1.15988    2.07894 \r\n 0.0542946  1.25654    1.99043    1.3079    0.0102366     0.260701  1.28124   0.301421   0.744825\r\n 2.18924    0.345994   1.44563    1.96132   1.38548       1.22024   0.151539  0.120201   0.810535\r\n 1.06216    0.0061378  0.0229676  0.110931  0.036234      0.386171  0.931272  0.23151    0.688115\r\n\r\njulia> x .^ 1.5\r\nERROR: LLVM error: Cannot select: 0x17890df0: f64 = fpow 0x17890990, ConstantFP:f64<1.500000e+00>\r\n  0x17890990: f64,ch = load<LD8[null(addrspace=101)]> 0x18940cc0, TargetExternalSymbol:i64'julia__7_61683_param_0', undef:i64\r\n    0x178908b0: i64 = TargetExternalSymbol'julia__7_61683_param_0'\r\n    0x17890920: i64 = undef\r\n  0x17890d80: f64 = ConstantFP<1.500000e+00>\r\nIn function: julia__7_61683\r\nStacktrace:\r\n [1] handle_error(::Cstring) at /home/alha02/.julia/v0.6/LLVM/src/core/context.jl:96\r\n [2] macro expansion at /home/alha02/.julia/v0.6/LLVM/src/util/logging.jl:102 [inlined]\r\n [3] macro expansion at /home/alha02/.julia/v0.6/LLVM/src/base.jl:18 [inlined]\r\n [4] LLVMTargetMachineEmitToMemoryBuffer(::Ptr{LLVM.API.LLVMOpaqueTargetMachine}, ::Ptr{LLVM.API.LLVMOpaqueModule}, ::UInt32, ::Base.RefValue{Cstring}, ::Base.RefValue{Ptr{LLVM.API.LLVMOpaqueMemoryBuffer}}) at /home/alha02/.julia/v0.6/LLVM/src/../lib/3.9/libLLVM_h.jl:301\r\n [5] emit(::LLVM.TargetMachine, ::LLVM.Module, ::UInt32) at /home/alha02/.julia/v0.6/LLVM/src/targetmachine.jl:39\r\n [6] #mcgen#45(::Bool, ::Function, ::LLVM.Module, ::LLVM.Function, ::VersionNumber) at /home/alha02/.julia/v0.6/CUDAnative/src/jit.jl:303\r\n [7] (::CUDAnative.#kw##mcgen)(::Array{Any,1}, ::CUDAnative.#mcgen, ::LLVM.Module, ::LLVM.Function, ::VersionNumber) at ./<missing>:0\r\n [8] #compile_function#46(::Bool, ::Function, ::Any, ::Any, ::VersionNumber) at /home/alha02/.julia/v0.6/CUDAnative/src/jit.jl:328\r\n [9] cufunction(::CUDAdrv.CuDevice, ::Any, ::Any) at /home/alha02/.julia/v0.6/CUDAnative/src/jit.jl:369\r\n [10] macro expansion at /home/alha02/.julia/v0.6/CUDAnative/src/execution.jl:107 [inlined]\r\n [11] _cuda(::Tuple{Int64,Int64}, ::Int64, ::CUDAdrv.CuStream, ::CuArrays.#broadcast_kernel, ::##7#8, ::CUDAnative.CuDeviceArray{Float64,2,CUDAnative.AS.Global}, ::Tuple{Tuple{Bool,Bool}}, ::Tuple{Tuple{Int64,Int64}}, ::CUDAnative.CuDeviceArray{Float64,2,CUDAnative.AS.Global}, ::Tuple{}) at /home/alha02/.julia/v0.6/CUDAnative/src/execution.jl:80\r\n [12] _broadcast! at /home/alha02/.julia/v0.6/CuArrays/src/broadcast.jl:22 [inlined]\r\n [13] broadcast_t at /home/alha02/.julia/v0.6/CuArrays/src/broadcast.jl:37 [inlined]\r\n [14] broadcast_c at /home/alha02/.julia/v0.6/CuArrays/src/broadcast.jl:58 [inlined]\r\n [15] broadcast(::Function, ::CuArray{Float64,2}) at ./broadcast.jl:434\r\n```\r\nBringing the array to host first works:\r\n```julia\r\njulia> collect(x) .^ 1.5\r\n10×10 Array{Float64,2}:\r\n 1.01756    0.892005    0.0430235   0.285367   …  0.513574  0.182806   1.18373    1.13309 \r\n 0.0728158  0.856875    0.596441    0.0319922     0.976132  1.9176     3.52376    1.69429 \r\n 0.826213   0.132626    0.078224    0.182036      1.06443   1.04911    3.71077    0.318597\r\n 0.307324   0.0826121   0.95625     1.03744       0.406716  1.02758    0.886275   0.554103\r\n 2.12221    0.275235    0.089147    0.657543      2.1358    0.194894   0.0213402  0.621613\r\n 1.20798    0.315852    0.340529    0.274552   …  0.444618  0.585317   0.0304173  0.617415\r\n 1.69316    0.409684    1.93708     2.43799       3.68983   0.992566   1.24916    2.99752 \r\n 0.0126513  1.40853     2.80814     1.49575       0.133111  1.45026    0.165486   0.642808\r\n 3.23921    0.203518    1.73815     2.74676       1.34793   0.0589909  0.0416736  0.729722\r\n 1.09467    0.00048086  0.00348075  0.0369472     0.239977  0.898701   0.111392   0.570809\r\n```\r\nand integer powers works:\r\n```julia\r\njulia> x .^ 2.0\r\n10×10 CuArray{Float64,2}:\r\n 1.02349    0.858663    0.0150756    0.187876   …  0.41128    0.10375   1.25218     1.18129 \r\n 0.0304066  0.813873    0.502062     0.010156      0.968303   2.38237   5.36219     2.01984 \r\n 0.775276   0.067635    0.0334544    0.103167      1.08681    1.06602   5.74494     0.217598\r\n 0.207394   0.0359798   0.942097     1.05023       0.301338   1.03694   0.851318    0.455115\r\n 2.72721    0.179035    0.0398237    0.571784      2.75051    0.112996  0.00591921  0.53051 \r\n 1.28651    0.215102    0.237797     0.178443   …  0.339351   0.489616  0.00949498  0.525738\r\n 2.01804    0.304275    2.4147       3.28127       5.70176    0.9901    1.34532     4.32198 \r\n 0.0029479  1.5789      3.9618       1.71059       0.0679649  1.64158   0.0908546   0.554764\r\n 4.79275    0.119712    2.08985      3.84676       1.48899    0.022964  0.0144482   0.656967\r\n 1.12818    3.76726e-5  0.000527509  0.0123058     0.149128   0.867268  0.0535968   0.473502\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/FluxML/CuArrays.jl/issues/comments/326980794","html_url":"https://github.com/FluxML/CuArrays.jl/issues/13#issuecomment-326980794","issue_url":"https://api.github.com/repos/FluxML/CuArrays.jl/issues/13","id":326980794,"user":{"login":"maleadt","id":383068,"avatar_url":"https://avatars3.githubusercontent.com/u/383068?v=4","gravatar_id":"","url":"https://api.github.com/users/maleadt","html_url":"https://github.com/maleadt","followers_url":"https://api.github.com/users/maleadt/followers","following_url":"https://api.github.com/users/maleadt/following{/other_user}","gists_url":"https://api.github.com/users/maleadt/gists{/gist_id}","starred_url":"https://api.github.com/users/maleadt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maleadt/subscriptions","organizations_url":"https://api.github.com/users/maleadt/orgs","repos_url":"https://api.github.com/users/maleadt/repos","events_url":"https://api.github.com/users/maleadt/events{/privacy}","received_events_url":"https://api.github.com/users/maleadt/received_events","type":"User","site_admin":false},"created_at":"2017-09-04T14:51:05Z","updated_at":"2017-09-04T14:51:05Z","author_association":"COLLABORATOR","body":"A minimal Julia kernel is fine, without the dependency on CuArrays."}}
{"actor":{"display_login":"maleadt"}}