{"action":"created","issue":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/365","labels_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/365/labels{/name}","comments_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/365/comments","events_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/365/events","html_url":"https://github.com/arrayfire/arrayfire/issues/365","id":55986543,"number":365,"title":"af::sum slows down & is eventually killed via SIGABRT","user":{"login":"jramapuram","id":8204807,"avatar_url":"https://avatars.githubusercontent.com/u/8204807?v=3","gravatar_id":"","url":"https://api.github.com/users/jramapuram","html_url":"https://github.com/jramapuram","followers_url":"https://api.github.com/users/jramapuram/followers","following_url":"https://api.github.com/users/jramapuram/following{/other_user}","gists_url":"https://api.github.com/users/jramapuram/gists{/gist_id}","starred_url":"https://api.github.com/users/jramapuram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jramapuram/subscriptions","organizations_url":"https://api.github.com/users/jramapuram/orgs","repos_url":"https://api.github.com/users/jramapuram/repos","events_url":"https://api.github.com/users/jramapuram/events{/privacy}","received_events_url":"https://api.github.com/users/jramapuram/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/arrayfire/arrayfire/labels/bug","name":"bug","color":"FF0000"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-30T02:20:12Z","updated_at":"2015-02-02T18:34:30Z","closed_at":null,"body":"Using Cuda 7.0 & OSX 10.10 there is quite a big slowdown when consecutively calling af::sum. It then is killed via a SIGABRT. Is there a BUILD_DEBUG option to get better stack trace info?\r\n\r\nExample code:\r\n\r\n    float Autoencoder::l2_error(const Input& output,const Input& pred) {\r\n      Input diff = output - pred;\r\n      return std::sqrtf(af::sum<float>(diff * diff));\r\n    }\r\n\r\nCatching the SIGABRT in lldb:\r\n\r\n    Process 1270 stopped\r\n    * thread #2: tid = 0x618a2, 0x00007fff939a1282 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT\r\n        frame #0: 0x00007fff939a1282 libsystem_kernel.dylib`__pthread_kill + 10\r\n    libsystem_kernel.dylib`__pthread_kill + 10:\r\n    -> 0x7fff939a1282:  jae    0x7fff939a128c            ; __pthread_kill + 20\r\n       0x7fff939a1284:  movq   %rax, %rdi\r\n       0x7fff939a1287:  jmp    0x7fff9399cca3            ; cerror_nocancel\r\n       0x7fff939a128c:  retq\r\n    (lldb) bt\r\n    * thread #2: tid = 0x618a2, 0x00007fff939a1282 libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT\r\n      * frame #0: 0x00007fff939a1282 libsystem_kernel.dylib`__pthread_kill + 10\r\n        frame #1: 0x00007fff8d0894c3 libsystem_pthread.dylib`pthread_kill + 90\r\n        frame #2: 0x00007fff9254eb73 libsystem_c.dylib`abort + 129\r\n        frame #3: 0x00007fff9254ecea libsystem_c.dylib`abort_report_np + 181\r\n        frame #4: 0x00007fff92574dd0 libsystem_c.dylib`__chk_fail + 48\r\n        frame #5: 0x00007fff92574da0 libsystem_c.dylib`__chk_fail_overflow + 16\r\n        frame #6: 0x00007fff925752cc libsystem_c.dylib`__sprintf_chk + 207\r\n        frame #7: 0x000000010a1689ce libgpgpucomp.dylib`ptxparse + 5870\r\n        frame #8: 0x000000010a0d9ff2 libgpgpucomp.dylib`ptxParseInputString + 370\r\n        frame #9: 0x000000010a0c2ed2 libgpgpucomp.dylib`parseInputString(char*, ptxParsingStateRec*) + 82\r\n        frame #10: 0x000000010a1166bd libgpgpucomp.dylib`listTraverse + 45\r\n        frame #11: 0x000000010a0c1c64 libgpgpucomp.dylib`CompileProgram() + 228\r\n        frame #12: 0x000000010a0c7c8a libgpgpucomp.dylib`assemble(unsigned int, char**, char**) + 8330\r\n        frame #13: 0x000000010a0c5ae1 libgpgpucomp.dylib`ptxAssemble + 209\r\n        frame #14: 0x000000010a0b732f libgpgpucomp.dylib`fatBinaryCtl_Compile + 671\r\n        frame #15: 0x00000001098d0940 libcuda_310.41.05_mercury.dylib`cuiDeviceCodeObtainCubin + 1088\r\n        frame #16: 0x00000001098c78c4 libcuda_310.41.05_mercury.dylib`cuiLinkAddFatBinaryOrPtxOrCubinData + 164\r\n        frame #17: 0x00000001098c74a6 libcuda_310.41.05_mercury.dylib`cuiLinkAddData + 326\r\n        frame #18: 0x000000010980553e libcuda_310.41.05_mercury.dylib`cuLinkAddData_v2 + 158\r\n        frame #19: 0x0000000100827ef7 libafcuda.dylib`cuda::getKernel(cuda::JIT::Node*, bool) + 5559\r\n        frame #20: 0x0000000100828dfa libafcuda.dylib`void cuda::evalNodes<float>(cuda::Param<float>&, cuda::JIT::Node*) + 74\r\n        frame #21: 0x0000000100800581 libafcuda.dylib`cuda::Array<float>::eval() + 353\r\n        frame #22: 0x0000000100b9deea libafcuda.dylib`float cuda::reduce_all<(af_op_t)0, float, float>(cuda::Array<float> const&) + 26\r\n        frame #23: 0x00000001008c6d0b libafcuda.dylib`af_sum_all + 315\r\n        frame #24: 0x0000000100902090 libafcuda.dylib`float af::sum<float>(af::array const&) + 32\r\n        frame #25: 0x00000001006baf59 libmylib.dylib`Autoencoder::l2_error(this=0x000000010b00aa00, output=0x000000010b00b640, pred=0x000000010b00b4d0) + 89 at Autoencoder.cpp:175\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/comments/72511054","html_url":"https://github.com/arrayfire/arrayfire/issues/365#issuecomment-72511054","issue_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/365","id":72511054,"user":{"login":"jramapuram","id":8204807,"avatar_url":"https://avatars.githubusercontent.com/u/8204807?v=3","gravatar_id":"","url":"https://api.github.com/users/jramapuram","html_url":"https://github.com/jramapuram","followers_url":"https://api.github.com/users/jramapuram/followers","following_url":"https://api.github.com/users/jramapuram/following{/other_user}","gists_url":"https://api.github.com/users/jramapuram/gists{/gist_id}","starred_url":"https://api.github.com/users/jramapuram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jramapuram/subscriptions","organizations_url":"https://api.github.com/users/jramapuram/orgs","repos_url":"https://api.github.com/users/jramapuram/repos","events_url":"https://api.github.com/users/jramapuram/events{/privacy}","received_events_url":"https://api.github.com/users/jramapuram/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T18:34:30Z","updated_at":"2015-02-02T18:34:30Z","body":"Hmm, I tried a basic example and it seems to work fine. Looks like the problem might be elsewhere. Still trying to narrow this down."}}