{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/23919","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/23919/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/23919/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/23919/events","html_url":"https://github.com/JuliaLang/julia/issues/23919","id":261411604,"number":23919,"title":"Matrix Multiplication API","user":{"login":"jebej","id":11141558,"avatar_url":"https://avatars2.githubusercontent.com/u/11141558?v=4","gravatar_id":"","url":"https://api.github.com/users/jebej","html_url":"https://github.com/jebej","followers_url":"https://api.github.com/users/jebej/followers","following_url":"https://api.github.com/users/jebej/following{/other_user}","gists_url":"https://api.github.com/users/jebej/gists{/gist_id}","starred_url":"https://api.github.com/users/jebej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebej/subscriptions","organizations_url":"https://api.github.com/users/jebej/orgs","repos_url":"https://api.github.com/users/jebej/repos","events_url":"https://api.github.com/users/jebej/events{/privacy}","received_events_url":"https://api.github.com/users/jebej/received_events","type":"User","site_admin":false},"labels":[{"id":61807486,"url":"https://api.github.com/repos/JuliaLang/julia/labels/linear%20algebra","name":"linear algebra","color":"aa8800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-09-28T18:12:09Z","updated_at":"2017-10-03T00:21:06Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Currently, there is the following line in the sparse matmult code:\r\n\r\nhttps://github.com/JuliaLang/julia/blob/056b374919e11977d5a8d57b446ad1c72f3e6b1d/base/sparse/linalg.jl#L94-L95\r\n\r\nI am assuming that this means we want to have the more general `A_mul_B*!(α,A,B,β,C) = αAB + βC` methods which overwrite `C` (the BLAS `gemm` API) for dense arrays. Is that still the case? (It also seems possible to keep both APIs, i.e. keep the `A_mul_B*!(C,A,B)` methods, which would simply be defined as `A_mul_B*!(C,A,B) = A_mul_B*!(1,A,B,0,C)`.)\r\n\r\nI would personally like to have the `gemm` API defined for all array types (this has been expressed [elsewhere](https://github.com/JuliaLang/julia/issues/5332#issuecomment-40901008)). Implementing these methods for dense arrays seems fairly simple, since they would just directly call `gemm` et al. The sparse case is already implemented. The only real modification would be to the pure julia [generic matmult](https://github.com/JuliaLang/julia/blob/056b374919e11977d5a8d57b446ad1c72f3e6b1d/base/linalg/matmul.jl#L486), which does not accept `α` and `β` arguments.\r\n\r\nThis would lead to generic code that works with any type of array/number. I currently have a simple implementation of expm (after having done the modification to `_generic_matmatmult!`) which works with bigfloats and sparse arrays.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/333702321","html_url":"https://github.com/JuliaLang/julia/issues/23919#issuecomment-333702321","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/23919","id":333702321,"user":{"login":"jebej","id":11141558,"avatar_url":"https://avatars2.githubusercontent.com/u/11141558?v=4","gravatar_id":"","url":"https://api.github.com/users/jebej","html_url":"https://github.com/jebej","followers_url":"https://api.github.com/users/jebej/followers","following_url":"https://api.github.com/users/jebej/following{/other_user}","gists_url":"https://api.github.com/users/jebej/gists{/gist_id}","starred_url":"https://api.github.com/users/jebej/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jebej/subscriptions","organizations_url":"https://api.github.com/users/jebej/orgs","repos_url":"https://api.github.com/users/jebej/repos","events_url":"https://api.github.com/users/jebej/events{/privacy}","received_events_url":"https://api.github.com/users/jebej/received_events","type":"User","site_admin":false},"created_at":"2017-10-03T00:21:06Z","updated_at":"2017-10-03T00:21:06Z","author_association":"CONTRIBUTOR","body":"> Yes. That would be a good start. We need to consider the ordering of the arguments though. Originally, I thought it was more natural to follow the BLAS ordering but we fairly consistent about having output arguments first which is also the case for the current three-argument A_mul_B!. Furthermore and as you have already pointed out, the three-argument version would correspond to the five-argument version with α=1 and β=0 and default value arguments are last. Of course, we don't necessarily have to use the default value syntax for this but it would make sense to use it here.\r\n\r\nSounds good. We can continue the discussion about the actual argument ordering and method renaming in #9930. This is more about just *having* the five-argument version available, so I'll keep the current `Ax_mul_Bx!(α,A,B,β,C)` interface.\r\n\r\n> Why not just introduce a generic gemm function?\r\n\r\nAre you suggesting renaming `_generic_matmatmul!` to `gemm!` in addition to the changes above?"}}
{"actor":{"display_login":"jebej"}}