{"action":"created","issue":{"url":"https://api.github.com/repos/lattice/quda/issues/202","labels_url":"https://api.github.com/repos/lattice/quda/issues/202/labels{/name}","comments_url":"https://api.github.com/repos/lattice/quda/issues/202/comments","events_url":"https://api.github.com/repos/lattice/quda/issues/202/events","html_url":"https://github.com/lattice/quda/issues/202","id":53702090,"number":202,"title":"Optimize clover storage and memory traffic","user":{"login":"mikeaclark","id":316771,"avatar_url":"https://avatars.githubusercontent.com/u/316771?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeaclark","html_url":"https://github.com/mikeaclark","followers_url":"https://api.github.com/users/mikeaclark/followers","following_url":"https://api.github.com/users/mikeaclark/following{/other_user}","gists_url":"https://api.github.com/users/mikeaclark/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeaclark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeaclark/subscriptions","organizations_url":"https://api.github.com/users/mikeaclark/orgs","repos_url":"https://api.github.com/users/mikeaclark/repos","events_url":"https://api.github.com/users/mikeaclark/events{/privacy}","received_events_url":"https://api.github.com/users/mikeaclark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-01-08T00:52:01Z","updated_at":"2015-01-21T19:23:06Z","closed_at":null,"body":"There is symmetry in the clover them that is not exploited that could reduce the memory footprint and reduce the memory traffic in the kernels that use the clover term.\r\n\r\nSpecifically, if we consider the 2x2 block form each of chiral block of the clover matrix, we have\r\n```\r\n/ A   B \\\r\n\\ B* -A /\r\n```\r\nWe presently only store B* and don't double store with B, however, we do double store A and -A.  If we only stored A, then the number of real numbers required to store the clover term is reduced from 72 to 54, which represents 25% reduction in both memory footprint and memory traffic.\r\n\r\nI suspect this optimization is of most utility for the twisted clover formulation, since I believe it requires two clover matrices, hence is more memory footprint bound.\r\n\r\nThis symmetry does not hold directly for the clover inverse, so it would only apply to the kernels with the direct clover term.  However, clearly we can use only 54 numbers for the clover inverse, since we could just load the direct matrix (using 54 numbers) and invert on the fly.  This may be too computationally expensive, but more insight may be gained from considering the 2x2 block form of the inverse.\r\n\r\nAnyway, as a first step, we should replace the clover direct matrix using this reduced storage form.  After that is done, we can consider reduced storage options for the inverse.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/lattice/quda/issues/comments/70903401","html_url":"https://github.com/lattice/quda/issues/202#issuecomment-70903401","issue_url":"https://api.github.com/repos/lattice/quda/issues/202","id":70903401,"user":{"login":"AlexVaq","id":3840179,"avatar_url":"https://avatars.githubusercontent.com/u/3840179?v=3","gravatar_id":"","url":"https://api.github.com/users/AlexVaq","html_url":"https://github.com/AlexVaq","followers_url":"https://api.github.com/users/AlexVaq/followers","following_url":"https://api.github.com/users/AlexVaq/following{/other_user}","gists_url":"https://api.github.com/users/AlexVaq/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexVaq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexVaq/subscriptions","organizations_url":"https://api.github.com/users/AlexVaq/orgs","repos_url":"https://api.github.com/users/AlexVaq/repos","events_url":"https://api.github.com/users/AlexVaq/events{/privacy}","received_events_url":"https://api.github.com/users/AlexVaq/received_events","type":"User","site_admin":false},"created_at":"2015-01-21T19:23:06Z","updated_at":"2015-01-21T19:23:06Z","body":"In any case, there are other strong reasons to push the inversion\r\non-the-fly, so I really think we (I) should start working on this seriously.\r\n\r\nEl 21/1/2015, a las 20:21, mikeaclark <notifications@github.com> escribió:\r\n\r\nYes you can recover it trivially for the regular clover matrix, but for the\r\ninverse, it means there is no easy relationship between the upper and lower\r\nblock diagonals. So I believe inversion on the fly is required (happy to be\r\nproven wrong though).\r\n\r\n—\r\nReply to this email directly or view it on GitHub\r\n<https://github.com/lattice/quda/issues/202#issuecomment-70903018>."}}