{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/comments/184919852","pull_request_review_id":116206798,"id":184919852,"diff_hunk":"@@ -313,16 +313,22 @@ build_ubuntu_amalgamation_min() {\n build_ubuntu_gpu_cmake_mkldnn() {\n     set -ex\n     cd /work/build\n+    # We need to use generic archtecture. Otherwise, MKLDNN compiled in one\n+    # CPU architecture (e.g., C5) can't run on another architecture (e.g., g3).\n     cmake \\\n         -DUSE_CUDA=1               \\\n         -DUSE_CUDNN=1              \\\n         -DUSE_MKLML_MKL=1          \\\n         -DUSE_MKLDNN=1             \\\n         -DCMAKE_BUILD_TYPE=Release \\\n+        -DARCH_OPT_FLAGS=\"-mtune=generic\" \\\n         -G Ninja                   \\\n         /work/mxnet\n \n     ninja -v\n+    # libmkldnn.so.0 is a link file. We need an actual binary file named libmkldnn.so.0.\n+    cp 3rdparty/mkldnn/src/libmkldnn.so.0 3rdparty/mkldnn/src/libmkldnn.so.0.tmp\n+    mv 3rdparty/mkldnn/src/libmkldnn.so.0.tmp 3rdparty/mkldnn/src/libmkldnn.so.0","path":"ci/docker/runtime_functions.sh","position":19,"original_position":19,"commit_id":"faafd08e013850fbe1f531e21a82dc2d9104e041","original_commit_id":"faafd08e013850fbe1f531e21a82dc2d9104e041","user":{"login":"marcoabreu","id":18629099,"avatar_url":"https://avatars1.githubusercontent.com/u/18629099?v=4","gravatar_id":"","url":"https://api.github.com/users/marcoabreu","html_url":"https://github.com/marcoabreu","followers_url":"https://api.github.com/users/marcoabreu/followers","following_url":"https://api.github.com/users/marcoabreu/following{/other_user}","gists_url":"https://api.github.com/users/marcoabreu/gists{/gist_id}","starred_url":"https://api.github.com/users/marcoabreu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcoabreu/subscriptions","organizations_url":"https://api.github.com/users/marcoabreu/orgs","repos_url":"https://api.github.com/users/marcoabreu/repos","events_url":"https://api.github.com/users/marcoabreu/events{/privacy}","received_events_url":"https://api.github.com/users/marcoabreu/received_events","type":"User","site_admin":false},"body":"This is a no-op. Please elaborate","created_at":"2018-04-30T06:56:58Z","updated_at":"2018-04-30T06:59:41Z","html_url":"https://github.com/apache/incubator-mxnet/pull/10731#discussion_r184919852","pull_request_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/10731","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/comments/184919852"},"html":{"href":"https://github.com/apache/incubator-mxnet/pull/10731#discussion_r184919852"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/10731"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/10731","id":184742918,"html_url":"https://github.com/apache/incubator-mxnet/pull/10731","diff_url":"https://github.com/apache/incubator-mxnet/pull/10731.diff","patch_url":"https://github.com/apache/incubator-mxnet/pull/10731.patch","issue_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/10731","number":10731,"state":"open","locked":false,"title":"Fix a bug in getting MKLDNN memory","user":{"login":"zheng-da","id":70481,"avatar_url":"https://avatars1.githubusercontent.com/u/70481?v=4","gravatar_id":"","url":"https://api.github.com/users/zheng-da","html_url":"https://github.com/zheng-da","followers_url":"https://api.github.com/users/zheng-da/followers","following_url":"https://api.github.com/users/zheng-da/following{/other_user}","gists_url":"https://api.github.com/users/zheng-da/gists{/gist_id}","starred_url":"https://api.github.com/users/zheng-da/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheng-da/subscriptions","organizations_url":"https://api.github.com/users/zheng-da/orgs","repos_url":"https://api.github.com/users/zheng-da/repos","events_url":"https://api.github.com/users/zheng-da/events{/privacy}","received_events_url":"https://api.github.com/users/zheng-da/received_events","type":"User","site_admin":false},"body":"## Description ##\r\nThis is to fix a bug in https://github.com/apache/incubator-mxnet/issues/10580\r\nThe bug happens when an NDArray already has a MKLDNN memory with a special MKLDNN format. In some cases (group convolution), the MKLDNN memory uses 5 dimensions, while the NDArray still uses 4 dimensions. In this case, when GetMKLDNNData is called, SetMKLMem will discard the original MKLDNN memory due to incompatible dimensions between MKLDNN memory and NDArray. This messes up the data in the NDArray.\r\n\r\nThe test code in the PR can actually reproduce the bug in https://github.com/apache/incubator-mxnet/issues/10580\r\n\r\nThis PR also tries to add C++ unit tests to cover all possible combinations with getting MKLDNN memory from an NDArray.\r\n\r\nThank @TaoLv @pengzhao-intel for finding the root cause of this bug.\r\n\r\n## Checklist ##\r\n### Essentials ###\r\nPlease feel free to remove inapplicable items for your PR.\r\n- [ ] The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant [JIRA issue](https://issues.apache.org/jira/projects/MXNET/issues) created (except PRs with tiny changes)\r\n- [ ] Changes are complete (i.e. I finished coding on this PR)\r\n- [ ] All changes have test coverage:\r\n- Unit tests are added for small changes to verify correctness (e.g. adding a new operator)\r\n- Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)\r\n- Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)\r\n- [ ] Code is well-documented: \r\n- For user-facing API changes, API doc string has been updated. \r\n- For new C++ functions in header files, their functionalities and arguments are documented. \r\n- For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable\r\n- Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html\r\n- [ ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change\r\n\r\n### Changes ###\r\n- [ ] Feature1, tests, (and when applicable, API doc)\r\n- [ ] Feature2, tests, (and when applicable, API doc)\r\n\r\n## Comments ##\r\n- If this change is a backward incompatible change, why must this change be made.\r\n- Interesting edge cases to note here\r\n","created_at":"2018-04-27T22:42:21Z","updated_at":"2018-04-30T06:59:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee7dc397218f768076fa6e16a28e85c1bbe8fab0","assignee":null,"assignees":[],"requested_reviewers":[{"login":"szha","id":2626883,"avatar_url":"https://avatars2.githubusercontent.com/u/2626883?v=4","gravatar_id":"","url":"https://api.github.com/users/szha","html_url":"https://github.com/szha","followers_url":"https://api.github.com/users/szha/followers","following_url":"https://api.github.com/users/szha/following{/other_user}","gists_url":"https://api.github.com/users/szha/gists{/gist_id}","starred_url":"https://api.github.com/users/szha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szha/subscriptions","organizations_url":"https://api.github.com/users/szha/orgs","repos_url":"https://api.github.com/users/szha/repos","events_url":"https://api.github.com/users/szha/events{/privacy}","received_events_url":"https://api.github.com/users/szha/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/10731/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/10731/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/10731/comments","statuses_url":"https://api.github.com/repos/apache/incubator-mxnet/statuses/faafd08e013850fbe1f531e21a82dc2d9104e041","head":{"label":"zheng-da:debug_mkldnn2","ref":"debug_mkldnn2","sha":"faafd08e013850fbe1f531e21a82dc2d9104e041","user":{"login":"zheng-da","id":70481,"avatar_url":"https://avatars1.githubusercontent.com/u/70481?v=4","gravatar_id":"","url":"https://api.github.com/users/zheng-da","html_url":"https://github.com/zheng-da","followers_url":"https://api.github.com/users/zheng-da/followers","following_url":"https://api.github.com/users/zheng-da/following{/other_user}","gists_url":"https://api.github.com/users/zheng-da/gists{/gist_id}","starred_url":"https://api.github.com/users/zheng-da/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheng-da/subscriptions","organizations_url":"https://api.github.com/users/zheng-da/orgs","repos_url":"https://api.github.com/users/zheng-da/repos","events_url":"https://api.github.com/users/zheng-da/events{/privacy}","received_events_url":"https://api.github.com/users/zheng-da/received_events","type":"User","site_admin":false},"repo":{"id":103710066,"name":"incubator-mxnet","full_name":"zheng-da/incubator-mxnet","owner":{"login":"zheng-da","id":70481,"avatar_url":"https://avatars1.githubusercontent.com/u/70481?v=4","gravatar_id":"","url":"https://api.github.com/users/zheng-da","html_url":"https://github.com/zheng-da","followers_url":"https://api.github.com/users/zheng-da/followers","following_url":"https://api.github.com/users/zheng-da/following{/other_user}","gists_url":"https://api.github.com/users/zheng-da/gists{/gist_id}","starred_url":"https://api.github.com/users/zheng-da/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zheng-da/subscriptions","organizations_url":"https://api.github.com/users/zheng-da/orgs","repos_url":"https://api.github.com/users/zheng-da/repos","events_url":"https://api.github.com/users/zheng-da/events{/privacy}","received_events_url":"https://api.github.com/users/zheng-da/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zheng-da/incubator-mxnet","description":"Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more","fork":true,"url":"https://api.github.com/repos/zheng-da/incubator-mxnet","forks_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/forks","keys_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/teams","hooks_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/hooks","issue_events_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/events","assignees_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/tags","blobs_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/languages","stargazers_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/stargazers","contributors_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/contributors","subscribers_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/subscribers","subscription_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/subscription","commits_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/merges","archive_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/downloads","issues_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/labels{/name}","releases_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/releases{/id}","deployments_url":"https://api.github.com/repos/zheng-da/incubator-mxnet/deployments","created_at":"2017-09-15T23:39:38Z","updated_at":"2017-11-30T22:16:13Z","pushed_at":"2018-04-28T20:36:28Z","git_url":"git://github.com/zheng-da/incubator-mxnet.git","ssh_url":"git@github.com:zheng-da/incubator-mxnet.git","clone_url":"https://github.com/zheng-da/incubator-mxnet.git","svn_url":"https://github.com/zheng-da/incubator-mxnet","homepage":"http://mxnet.io","size":36437,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":5,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"2e40a16ec077e62e0f6bcba462d6683a1088b78e","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":34864402,"name":"incubator-mxnet","full_name":"apache/incubator-mxnet","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-mxnet","description":"Lightweight, Portable, Flexible Distributed/Mobile Deep Learning with Dynamic, Mutation-aware Dataflow Dep Scheduler; for Python, R, Julia, Scala, Go, Javascript and more","fork":false,"url":"https://api.github.com/repos/apache/incubator-mxnet","forks_url":"https://api.github.com/repos/apache/incubator-mxnet/forks","keys_url":"https://api.github.com/repos/apache/incubator-mxnet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-mxnet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-mxnet/teams","hooks_url":"https://api.github.com/repos/apache/incubator-mxnet/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-mxnet/events","assignees_url":"https://api.github.com/repos/apache/incubator-mxnet/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-mxnet/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-mxnet/tags","blobs_url":"https://api.github.com/repos/apache/incubator-mxnet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-mxnet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-mxnet/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-mxnet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-mxnet/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-mxnet/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-mxnet/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-mxnet/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-mxnet/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-mxnet/subscription","commits_url":"https://api.github.com/repos/apache/incubator-mxnet/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-mxnet/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-mxnet/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-mxnet/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-mxnet/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-mxnet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-mxnet/merges","archive_url":"https://api.github.com/repos/apache/incubator-mxnet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-mxnet/downloads","issues_url":"https://api.github.com/repos/apache/incubator-mxnet/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-mxnet/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-mxnet/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-mxnet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-mxnet/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-mxnet/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-mxnet/deployments","created_at":"2015-04-30T16:21:15Z","updated_at":"2018-04-30T03:46:50Z","pushed_at":"2018-04-30T04:45:45Z","git_url":"git://github.com/apache/incubator-mxnet.git","ssh_url":"git@github.com:apache/incubator-mxnet.git","clone_url":"https://github.com/apache/incubator-mxnet.git","svn_url":"https://github.com/apache/incubator-mxnet","homepage":"http://mxnet.io","size":35610,"stargazers_count":13811,"watchers_count":13811,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5112,"mirror_url":null,"archived":false,"open_issues_count":884,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":5112,"open_issues":884,"watchers":13811,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/10731"},"html":{"href":"https://github.com/apache/incubator-mxnet/pull/10731"},"issue":{"href":"https://api.github.com/repos/apache/incubator-mxnet/issues/10731"},"comments":{"href":"https://api.github.com/repos/apache/incubator-mxnet/issues/10731/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/10731/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-mxnet/pulls/10731/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-mxnet/statuses/faafd08e013850fbe1f531e21a82dc2d9104e041"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"marcoabreu"}}