{"action":"created","issue":{"url":"https://api.github.com/repos/BVLC/caffe/issues/6505","repository_url":"https://api.github.com/repos/BVLC/caffe","labels_url":"https://api.github.com/repos/BVLC/caffe/issues/6505/labels{/name}","comments_url":"https://api.github.com/repos/BVLC/caffe/issues/6505/comments","events_url":"https://api.github.com/repos/BVLC/caffe/issues/6505/events","html_url":"https://github.com/BVLC/caffe/issues/6505","id":351940462,"node_id":"MDU6SXNzdWUzNTE5NDA0NjI=","number":6505,"title":"Issue with Deconvolution layers in OpenCL branch","user":{"login":"isloven","id":19420247,"node_id":"MDQ6VXNlcjE5NDIwMjQ3","avatar_url":"https://avatars1.githubusercontent.com/u/19420247?v=4","gravatar_id":"","url":"https://api.github.com/users/isloven","html_url":"https://github.com/isloven","followers_url":"https://api.github.com/users/isloven/followers","following_url":"https://api.github.com/users/isloven/following{/other_user}","gists_url":"https://api.github.com/users/isloven/gists{/gist_id}","starred_url":"https://api.github.com/users/isloven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isloven/subscriptions","organizations_url":"https://api.github.com/users/isloven/orgs","repos_url":"https://api.github.com/users/isloven/repos","events_url":"https://api.github.com/users/isloven/events{/privacy}","received_events_url":"https://api.github.com/users/isloven/received_events","type":"User","site_admin":false},"labels":[{"id":316607017,"node_id":"MDU6TGFiZWwzMTY2MDcwMTc=","url":"https://api.github.com/repos/BVLC/caffe/labels/OpenCL","name":"OpenCL","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":{"login":"naibaf7","id":5577650,"node_id":"MDQ6VXNlcjU1Nzc2NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/5577650?v=4","gravatar_id":"","url":"https://api.github.com/users/naibaf7","html_url":"https://github.com/naibaf7","followers_url":"https://api.github.com/users/naibaf7/followers","following_url":"https://api.github.com/users/naibaf7/following{/other_user}","gists_url":"https://api.github.com/users/naibaf7/gists{/gist_id}","starred_url":"https://api.github.com/users/naibaf7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naibaf7/subscriptions","organizations_url":"https://api.github.com/users/naibaf7/orgs","repos_url":"https://api.github.com/users/naibaf7/repos","events_url":"https://api.github.com/users/naibaf7/events{/privacy}","received_events_url":"https://api.github.com/users/naibaf7/received_events","type":"User","site_admin":false},"assignees":[{"login":"naibaf7","id":5577650,"node_id":"MDQ6VXNlcjU1Nzc2NTA=","avatar_url":"https://avatars0.githubusercontent.com/u/5577650?v=4","gravatar_id":"","url":"https://api.github.com/users/naibaf7","html_url":"https://github.com/naibaf7","followers_url":"https://api.github.com/users/naibaf7/followers","following_url":"https://api.github.com/users/naibaf7/following{/other_user}","gists_url":"https://api.github.com/users/naibaf7/gists{/gist_id}","starred_url":"https://api.github.com/users/naibaf7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naibaf7/subscriptions","organizations_url":"https://api.github.com/users/naibaf7/orgs","repos_url":"https://api.github.com/users/naibaf7/repos","events_url":"https://api.github.com/users/naibaf7/events{/privacy}","received_events_url":"https://api.github.com/users/naibaf7/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-08-19T22:34:39Z","updated_at":"2018-08-27T11:53:41Z","closed_at":null,"author_association":"NONE","body":"### Issue summary\r\nDeconvolution layer seems to crash on OpenCL build of caffe, yet it works fine on the CUDA build.\r\n\r\nThis is what happens on the OpenCL branch:\r\n\r\n```\r\nI0819 18:22:38.602321  2029 layer_factory.cpp:74] Creating layer data\r\nI0819 18:22:38.602342  2029 net.cpp:185] Creating Layer data\r\nI0819 18:22:38.602349  2029 net.cpp:515] data -> data\r\nI0819 18:22:38.602383  2029 net.cpp:515] data -> label\r\nI0819 18:22:38.602442  2029 net.cpp:223] Setting up data\r\nI0819 18:22:38.602452  2029 net.cpp:233] Top shape: 1 3 128 128 (49152)\r\nI0819 18:22:38.602458  2029 net.cpp:233] Top shape: 1 3 128 128 (49152)\r\nI0819 18:22:38.602473  2029 layer_factory.cpp:74] Creating layer layer0\r\nI0819 18:22:38.602489  2029 net.cpp:185] Creating Layer layer0\r\nI0819 18:22:38.602494  2029 net.cpp:549] layer0 <- data\r\nI0819 18:22:38.602507  2029 net.cpp:515] layer0 -> layer0\r\nI0819 18:22:38.605216  2029 net.cpp:223] Setting up layer0\r\nI0819 18:22:38.605252  2029 net.cpp:233] Top shape: 1 1 128 128 (16384)\r\nI0819 18:22:38.605334  2029 layer_factory.cpp:74] Creating layer activate0\r\nI0819 18:22:38.605350  2029 net.cpp:185] Creating Layer activate0\r\nI0819 18:22:38.605356  2029 net.cpp:549] activate0 <- layer0\r\nI0819 18:22:38.605363  2029 net.cpp:502] activate0 -> layer0 (in-place)\r\nI0819 18:22:38.606245  2029 net.cpp:223] Setting up activate0\r\nI0819 18:22:38.606256  2029 net.cpp:233] Top shape: 1 1 128 128 (16384)\r\nI0819 18:22:38.606276  2029 layer_factory.cpp:74] Creating layer layer1\r\nI0819 18:22:38.606290  2029 net.cpp:185] Creating Layer layer1\r\nI0819 18:22:38.606295  2029 net.cpp:549] layer1 <- layer0\r\nI0819 18:22:38.606302  2029 net.cpp:515] layer1 -> layer1\r\nterminate called after throwing an instance of 'std::out_of_range'\r\n  what():  map::at\r\n*** Aborted at 1534717358 (unix time) try \"date -d @1534717358\" if you are using GNU date ***\r\nPC: @     0x7f8ca62cefeb __GI_raise\r\n*** SIGABRT (@0x3e8000007ed) received by PID 2029 (TID 0x7f8caf506440) from PID 2029; stack trace: ***\r\n    @     0x7f8cacd136e9 (unknown)\r\n    @     0x7f8cac3d2fc0 (unknown)\r\n    @     0x7f8ca62cefeb __GI_raise\r\n    @     0x7f8ca62b95c1 __GI_abort\r\n    @     0x7f8ca6c8fa9b (unknown)\r\n    @     0x7f8ca6c95efc (unknown)\r\n    @     0x7f8ca6c95f57 std::terminate()\r\n    @     0x7f8ca6c961b8 __cxa_throw\r\n    @     0x7f8ca6c91a3f (unknown)\r\n    @     0x7f8cae92622c std::map<>::at()\r\n    @     0x7f8cae9271a2 caffe::LibDNNTuner::get_param<>()\r\n    @     0x7f8cae92acc9 caffe::LibDNNTuner::get_param<>()\r\n    @     0x7f8cae4dfe46 _ZN5caffe6LibDNNIffE20generate_accreg_initB5cxx11ESt10shared_ptrINS_11LibDNNTunerEEbbbb\r\n    @     0x7f8cae8131f3 caffe::LibDNNDeconv<>::generate_fw_kernels()\r\n    @     0x7f8cae81c301 caffe::LibDNNDeconv<>::GenerateKernels()\r\n    @     0x7f8cae86b142 caffe::LibDNNDeconv<>::LibDNNDeconv()\r\n    @     0x7f8cae3be916 caffe::LibDNNDeconvolutionLayer<>::Reshape()\r\n    @     0x7f8cae271902 caffe::Layer<>::SetUp()\r\n    @     0x7f8cae94073b caffe::Net<>::Init()\r\n    @     0x7f8cae9421c7 caffe::Net<>::Net()\r\n    @           0x414ac1 time()\r\n    @           0x410984 main\r\n    @     0x7f8ca62bb24b __libc_start_main\r\n    @           0x4112da _start\r\nAborted (core dumped)\r\n```\r\nCrash seems to happen in:\r\n`caffe::LibDNN<float, float>::generate_accreg_init[abi:cxx11](std::shared_ptr<caffe::LibDNNTuner>, bool, bool, bool, bool)`\r\n\r\n### Steps to reproduce\r\nSave the snippet below into network.prototxt and run this:\r\n`caffe time -model network.prototxt -gpu 0 -stage \"deploy\"`\r\n\r\n#### network.prototxt:\r\n```\r\nlayer {\r\n  name: \"data\"\r\n  type: \"Input\"\r\n  top: \"data\"\r\n  top: \"label\"\r\n  input_param { shape: { dim: 1 dim: 3 dim: 128 dim: 128 } }\r\n}\r\nlayer {\r\n\tname: \"layer0\"\r\n\ttype: \"Convolution\"\r\n\tbottom: \"data\"\r\n\ttop: \"layer0\"\r\n\tparam {\r\n\t\tlr_mult: 1\r\n\t\tdecay_mult: 1\r\n\t}\r\n\tconvolution_param {\r\n\t\tnum_output: 1\r\n\t\tkernel_size: 3\r\n\t\tstride: 1\r\n\t\tpad: 1\r\n\t\tbias_term: true\r\n\t}\r\n}\r\nlayer {\r\n\tname: \"activate0\"\r\n\ttype: \"ReLU\"\r\n\tbottom: \"layer0\"\r\n\ttop: \"layer0\"\r\n}\r\nlayer {\r\n\tname: \"layer1\"\r\n\ttype: \"Deconvolution\"\r\n\tbottom: \"layer0\"\r\n\ttop: \"layer1\"\r\n\tparam {\r\n\t\tlr_mult: 1\r\n\t\tdecay_mult: 1\r\n\t}\r\n\tconvolution_param {\r\n\t\tnum_output: 1\r\n\t\tkernel_size: 3\r\n\t\tstride: 2\r\n\t\tpad: 0\r\n\t\tbias_term: true\r\n\t}\r\n}\r\nlayer {\r\n\tname: \"activate1\"\r\n\ttype: \"ReLU\"\r\n\tbottom: \"layer1\"\r\n\ttop: \"layer1\"\r\n}\r\n\r\nlayer {\r\n\tname: \"loss\"\r\n\ttype: \"SoftmaxWithLoss\"\r\n\tbottom: \"layer1\"\r\n\tbottom: \"label\"\r\n\ttop: \"loss\"\r\n\texclude { stage: \"deploy\" }\r\n}\r\nlayer {\r\n\tname: \"accuracy\"\r\n\ttype: \"Accuracy\"\r\n\tbottom: \"layer1\"\r\n\tbottom: \"label\"\r\n\ttop: \"accuracy\"\r\n\tinclude { stage: \"val\" }\r\n}\r\n```\r\n\r\n### Tried solutions\r\nN/A\r\n\r\n### System configuration\r\n\r\n* Operating system: Linux 4.17.12\r\n* Compiler: GCC 8.1.1\r\n* CUDA version (if applicable): \r\n* CUDNN version (if applicable): \r\n* BLAS: OpenBLAS\r\n* Python version (if using pycaffe): \r\n* MATLAB version (if using matcaffe): \r\n"},"comment":{"url":"https://api.github.com/repos/BVLC/caffe/issues/comments/416202142","html_url":"https://github.com/BVLC/caffe/issues/6505#issuecomment-416202142","issue_url":"https://api.github.com/repos/BVLC/caffe/issues/6505","id":416202142,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjIwMjE0Mg==","user":{"login":"Crazytravy07","id":36290415,"node_id":"MDQ6VXNlcjM2MjkwNDE1","avatar_url":"https://avatars3.githubusercontent.com/u/36290415?v=4","gravatar_id":"","url":"https://api.github.com/users/Crazytravy07","html_url":"https://github.com/Crazytravy07","followers_url":"https://api.github.com/users/Crazytravy07/followers","following_url":"https://api.github.com/users/Crazytravy07/following{/other_user}","gists_url":"https://api.github.com/users/Crazytravy07/gists{/gist_id}","starred_url":"https://api.github.com/users/Crazytravy07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Crazytravy07/subscriptions","organizations_url":"https://api.github.com/users/Crazytravy07/orgs","repos_url":"https://api.github.com/users/Crazytravy07/repos","events_url":"https://api.github.com/users/Crazytravy07/events{/privacy}","received_events_url":"https://api.github.com/users/Crazytravy07/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T11:53:41Z","updated_at":"2018-08-27T11:53:41Z","author_association":"NONE","body":"sudo apt-get install libgmp3-dev cmake automake libtool"}}
{"actor":{"display_login":"Crazytravy07"}}