{"action":"created","issue":{"url":"https://api.github.com/repos/Theano/Theano/issues/4744","repository_url":"https://api.github.com/repos/Theano/Theano","labels_url":"https://api.github.com/repos/Theano/Theano/issues/4744/labels{/name}","comments_url":"https://api.github.com/repos/Theano/Theano/issues/4744/comments","events_url":"https://api.github.com/repos/Theano/Theano/issues/4744/events","html_url":"https://github.com/Theano/Theano/pull/4744","id":165732281,"number":4744,"title":"Fix a test failure in GpuCumsum class","user":{"login":"huanzhang12","id":8021844,"avatar_url":"https://avatars.githubusercontent.com/u/8021844?v=3","gravatar_id":"","url":"https://api.github.com/users/huanzhang12","html_url":"https://github.com/huanzhang12","followers_url":"https://api.github.com/users/huanzhang12/followers","following_url":"https://api.github.com/users/huanzhang12/following{/other_user}","gists_url":"https://api.github.com/users/huanzhang12/gists{/gist_id}","starred_url":"https://api.github.com/users/huanzhang12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huanzhang12/subscriptions","organizations_url":"https://api.github.com/users/huanzhang12/orgs","repos_url":"https://api.github.com/users/huanzhang12/repos","events_url":"https://api.github.com/users/huanzhang12/events{/privacy}","received_events_url":"https://api.github.com/users/huanzhang12/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-15T08:03:02Z","updated_at":"2016-07-15T17:23:58Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Theano/Theano/pulls/4744","html_url":"https://github.com/Theano/Theano/pull/4744","diff_url":"https://github.com/Theano/Theano/pull/4744.diff","patch_url":"https://github.com/Theano/Theano/pull/4744.patch"},"body":"If I run the unit test for the GpuCumsum class (using the CUDA backend) I get an assertion failure:\r\n\r\n```\r\n$ THEANO_FLAGS=mode=FAST_RUN,device=cuda0,floatX=float32 bin/theano-nose -s theano/gpuarray/tests/test_extra_ops.py\r\nMapped name None to device cuda0: Tesla K40c\r\n.........F\r\n======================================================================\r\nFAIL: test_infer_shape (theano.gpuarray.tests.test_extra_ops.TestGpuCumsum)\r\n----------------------------------------------------------------------\r\nTraceback (most recent call last):\r\n  File \"/home/hzhang12/projects/Theano/theano/tensor/tests/test_extra_ops.py\", line 157, in test_infer_shape\r\n    self.op_class)\r\n  File \"/home/hzhang12/projects/Theano/theano/tests/unittest_tools.py\", line 249, in _compile_and_check\r\n    assert any(isinstance(t.op, cls) for t in topo_out)\r\nAssertionError\r\n\r\n----------------------------------------------------------------------\r\nRan 10 tests in 30.616s\r\n\r\nFAILED (failures=1)\r\n```\r\n\r\nIt seems in function InferShapeTester._compile_and_check(), it is checking if the operator class is derived from CumsumOp. Currently the GpuCumsum class is derived from class Op, not CumsumOp, so it fails. I am not sure if it is intentional. To make InferShapeTester happy, I changed the base class of GpuCumsum from Op to CumsumOp, and we can pass all the tests now.\r\n\r\nIf this is not the right approach, maybe we need to fix InferShapeTester._compile_and_check()? Or maybe it is a known issue?\r\n\r\nI also noticed that in earlier versions of extra_ops.py, GpuCumsum was inherited from CumsumOp. But it is removed by [commit d87cf8b4](https://github.com/Theano/Theano/commit/d87cf8b458b626da14e548443424c722f0e89c61). @kelvinxu I am not sure why. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Theano/Theano/issues/comments/233013938","html_url":"https://github.com/Theano/Theano/pull/4744#issuecomment-233013938","issue_url":"https://api.github.com/repos/Theano/Theano/issues/4744","id":233013938,"user":{"login":"nouiz","id":180987,"avatar_url":"https://avatars.githubusercontent.com/u/180987?v=3","gravatar_id":"","url":"https://api.github.com/users/nouiz","html_url":"https://github.com/nouiz","followers_url":"https://api.github.com/users/nouiz/followers","following_url":"https://api.github.com/users/nouiz/following{/other_user}","gists_url":"https://api.github.com/users/nouiz/gists{/gist_id}","starred_url":"https://api.github.com/users/nouiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nouiz/subscriptions","organizations_url":"https://api.github.com/users/nouiz/orgs","repos_url":"https://api.github.com/users/nouiz/repos","events_url":"https://api.github.com/users/nouiz/events{/privacy}","received_events_url":"https://api.github.com/users/nouiz/received_events","type":"User","site_admin":false},"created_at":"2016-07-15T17:23:58Z","updated_at":"2016-07-15T17:23:58Z","body":"This isn't the right fix. I don't have time to investigate this error more. My guess is that we move too much or not enough the op to the GPU. This is a recent failure. Could you make a git bisect to find which PR introduced it?"}}
{"actor":{"display_login":"nouiz"}}