{"action":"closed","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/26996","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/26996/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/26996/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/26996/events","html_url":"https://github.com/JuliaLang/julia/issues/26996","id":320535156,"number":26996,"title":"stack overflow error using Cuda","user":{"login":"swethmandava","id":17828952,"avatar_url":"https://avatars3.githubusercontent.com/u/17828952?v=4","gravatar_id":"","url":"https://api.github.com/users/swethmandava","html_url":"https://github.com/swethmandava","followers_url":"https://api.github.com/users/swethmandava/followers","following_url":"https://api.github.com/users/swethmandava/following{/other_user}","gists_url":"https://api.github.com/users/swethmandava/gists{/gist_id}","starred_url":"https://api.github.com/users/swethmandava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swethmandava/subscriptions","organizations_url":"https://api.github.com/users/swethmandava/orgs","repos_url":"https://api.github.com/users/swethmandava/repos","events_url":"https://api.github.com/users/swethmandava/events{/privacy}","received_events_url":"https://api.github.com/users/swethmandava/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-05T19:27:09Z","updated_at":"2018-05-05T19:33:26Z","closed_at":"2018-05-05T19:33:26Z","author_association":"NONE","body":"I'm trying to write a radix sort in julia using cuda but I get a stack overflow error. I've got it down to a bare minimum kernel and am not sure what's wrong with it.\r\n\r\n```\r\nfunction increment_with_block_sums(d_predicateScan::CuDeviceMatrix{T}, d_blockSumScan::CuDeviceMatrix{T}, numElems::Integer) where {T}\r\n    id = blockDim().x * (blockIdx().x - 1) + threadIdx().x\r\n\r\n    if (id <= numElems)\r\n        d_predicateScan[id, :] = d_predicateScan[id, :] + d_blockSumScan[blockIdx().x, :]\r\n    end\r\n    return\r\n    \r\nend\r\nfunction gpu_exclusive_scan(input::CuArray{T}) where {T}\r\n\r\n    numElems, num_features = size(input)\r\n    gridSize = trunc(Int64, ceil(numElems/blockSize))\r\n    block_sum = CuArray{T}(gridSize, num_features)\r\n    d_total = CuArray{T}(1, num_features)\r\n\r\n    # @cuda (gridSize, blockSize) partial_exclusive_scan(input, block_sum, numElems)\r\n    # @cuda (1, blockSize) partial_exclusive_scan(block_sum, d_total, gridSize)\r\n    @cuda (gridSize, blockSize) increment_with_block_sums(input, block_sum, numElems)\r\n    return\r\nend\r\n\r\nrows = 5\r\ncols = 4\r\na = rand(Int, rows, cols)\r\ngpu_a = CuArray(a)\r\ngpu_exclusive_scan(gpu_a)\r\n```\r\n\r\n\r\n\r\nJulia Version 0.6.2\r\nCommit d386e40* (2017-12-13 18:08 UTC)\r\nPlatform Info:\r\n  OS: Linux (x86_64-linux-gnu)\r\n  CPU: Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz\r\n  WORD_SIZE: 64\r\n  BLAS: libopenblas (USE64BITINT NO_AFFINITY NEHALEM)\r\n  LAPACK: libopenblas64_\r\n  LIBM: libopenlibm\r\n  LLVM: libLLVM-3.9.1 (ORCJIT, broadwell)\r\n\r\n"}}
{"actor":{"display_login":"fredrikekre"}}