{"action":"created","issue":{"url":"https://api.github.com/repos/flame/blis/issues/219","repository_url":"https://api.github.com/repos/flame/blis","labels_url":"https://api.github.com/repos/flame/blis/issues/219/labels{/name}","comments_url":"https://api.github.com/repos/flame/blis/issues/219/comments","events_url":"https://api.github.com/repos/flame/blis/issues/219/events","html_url":"https://github.com/flame/blis/issues/219","id":330886097,"node_id":"MDU6SXNzdWUzMzA4ODYwOTc=","number":219,"title":"Using BLIS matrix/vector objects with a different memory allocator (or with supplied memory/structure)","user":{"login":"tonyskjellum","id":916617,"node_id":"MDQ6VXNlcjkxNjYxNw==","avatar_url":"https://avatars2.githubusercontent.com/u/916617?v=4","gravatar_id":"","url":"https://api.github.com/users/tonyskjellum","html_url":"https://github.com/tonyskjellum","followers_url":"https://api.github.com/users/tonyskjellum/followers","following_url":"https://api.github.com/users/tonyskjellum/following{/other_user}","gists_url":"https://api.github.com/users/tonyskjellum/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyskjellum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyskjellum/subscriptions","organizations_url":"https://api.github.com/users/tonyskjellum/orgs","repos_url":"https://api.github.com/users/tonyskjellum/repos","events_url":"https://api.github.com/users/tonyskjellum/events{/privacy}","received_events_url":"https://api.github.com/users/tonyskjellum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-09T13:13:46Z","updated_at":"2018-06-09T19:03:16Z","closed_at":null,"author_association":"NONE","body":"Field, is it currently possible to have BLIS objects use memory that I provide?\r\n\r\nHere is my use case:\r\n\r\nPrimitive matrix type: float type, Array, layout(RM/CM)+strides/offsets/LDA  ---> Light BLIS view/object for a Dense matrix  or vector.\r\n\r\nUse BLIS as is on these specially allocated objects without any problems.\r\n\r\nDeallocation of \"view\" doesn't touch our memory we provided to view. \r\n\r\nIn another scenario, I have to have a submatrix of said object also not allocate or deallocate any memory.\r\n\r\nI fully understand and appreciate the object-based approach used by BLIS. It is my preferred way to do math libraries.  But I want to try to interface it with another library and that library also wants to allocate the objects.  And I need it to be the one that does so.\r\n\r\nWhere could I read more about that if so?    If not, any suggestions I am happy to make my own fork that adds such support.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/flame/blis/issues/comments/395991458","html_url":"https://github.com/flame/blis/issues/219#issuecomment-395991458","issue_url":"https://api.github.com/repos/flame/blis/issues/219","id":395991458,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTk5MTQ1OA==","user":{"login":"tonyskjellum","id":916617,"node_id":"MDQ6VXNlcjkxNjYxNw==","avatar_url":"https://avatars2.githubusercontent.com/u/916617?v=4","gravatar_id":"","url":"https://api.github.com/users/tonyskjellum","html_url":"https://github.com/tonyskjellum","followers_url":"https://api.github.com/users/tonyskjellum/followers","following_url":"https://api.github.com/users/tonyskjellum/following{/other_user}","gists_url":"https://api.github.com/users/tonyskjellum/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyskjellum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyskjellum/subscriptions","organizations_url":"https://api.github.com/users/tonyskjellum/orgs","repos_url":"https://api.github.com/users/tonyskjellum/repos","events_url":"https://api.github.com/users/tonyskjellum/events{/privacy}","received_events_url":"https://api.github.com/users/tonyskjellum/received_events","type":"User","site_admin":false},"created_at":"2018-06-09T19:03:15Z","updated_at":"2018-06-09T19:03:15Z","author_association":"NONE","body":"Field, Just fyi:\n\nCompiling 03obj_view.o\n\n03obj_view.c:72:26: fatal error: expected ';' after expression\n\n        init_dobj_by_cols( &a1 )\n\n\n\nFixed by adding the missing ;\n\nRebuild of all of BLIS was needed to get a clean build of all examples (no\nsurprise there, you added new capability).\n\nThen clean build of all examples again.\n\nTony\n\n\n\n\n\nOn Sat, Jun 9, 2018 at 2:57 PM, Anthony Skjellum <skjellum@gmail.com> wrote:\n\n> Field, that is 100% perfect as a response.  Will follow up.  Thank you for\n> checking in an improvement to help me expedite my learning and use of BLIS\n> as described.\n> Regards,\n> Tony\n>\n>\n> On Sat, Jun 9, 2018 at 2:53 PM, Field G. Van Zee <notifications@github.com\n> > wrote:\n>\n>> Field, is it currently possible to have BLIS objects use memory that I\n>> provide\n>> Primitive matrix type: float type, Array, strides, layout(RM/CM) --->\n>> Light BLIS view/object for a Dense matrix\n>> Use BLIS as is on these specially allocated objects.\n>> Deallocation of view doesn't touch our memory we provided to view.\n>>\n>> Yes. The verbiage we use is that we create a \"bufferless\" object and then\n>> \"attach\" the external buffer. You are responsible for allocating and\n>> freeing this external memory, of course, but it sounds like you already\n>> assumed that.\n>>\n>> The great thing about BLIS is that, unlike libflame, bufferless objects\n>> require no dynamic allocation. They are simply structs (usually allocated\n>> statically on the stack). Another way to think about this is that a regular\n>> (not bufferless) object only performs one allocation: the numerical data\n>> buffer. Thus, if you will be providing that buffer, no allocation is needed.\n>>\n>> In another scenario, I have to have a submatrix of said object also not\n>> allocate or deallocate any memory.\n>>\n>> This is also fine. You would start with the object you set up previously\n>> and then acquire a submatrix into that object. This new object would be\n>> identical to the parent, except that it would have different row/column\n>> offsets and m/n dimensions. These values are then used whenever you access\n>> the data inside. Once again, no dynamic allocation is performed.\n>>\n>> Where could I read more about that if so?\n>>\n>> Walking through the example code in examples/oapi is the best first\n>> step. It's meant as a tutorial, so it's best to step through from the\n>> beginning. It's also meant to be consumed with at least two terminal\n>> windows: one window in which to compile/execute the code (and view output),\n>> and the other in which to read the source code and comments of the\n>> executable whose output you are reading.\n>>\n>> You'll want to pay close attention to the second file, 01obj_attach.c\n>> given your first question. Also, I just added (in 043d0cd\n>> <https://github.com/flame/blis/commit/043d0cd37ef4a27b1901eeb89d40083cfb2a57ba>)\n>> example code for using a new function, bli_acquire_mpart(), which will\n>> allow you to take arbitrary views of an existing matrix object. That new\n>> example code is 03obj_view.c.\n>>\n>> If you have further questions, feel free to ask.\n>>\n>> —\n>> You are receiving this because you authored the thread.\n>> Reply to this email directly, view it on GitHub\n>> <https://github.com/flame/blis/issues/219#issuecomment-395990921>, or mute\n>> the thread\n>> <https://github.com/notifications/unsubscribe-auth/AA38ibKrNmj17OvV8noDv9ndowOElTf3ks5t7BmRgaJpZM4UhVFX>\n>> .\n>>\n>\n>\n>\n> --\n> Anthony Skjellum, PhD\n> skjellum@gmail.com\n> Cell: +1-205-807-4968\n>\n>\n>\n\n\n-- \nAnthony Skjellum, PhD\nskjellum@gmail.com\nCell: +1-205-807-4968\n"}}
{"actor":{"display_login":"tonyskjellum"}}