{"action":"created","issue":{"url":"https://api.github.com/repos/dmlc/dlpack/issues/2","repository_url":"https://api.github.com/repos/dmlc/dlpack","labels_url":"https://api.github.com/repos/dmlc/dlpack/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/dlpack/issues/2/comments","events_url":"https://api.github.com/repos/dmlc/dlpack/issues/2/events","html_url":"https://github.com/dmlc/dlpack/issues/2","id":210175681,"number":2,"title":"Operator Interface","user":{"login":"tqchen","id":2577440,"avatar_url":"https://avatars0.githubusercontent.com/u/2577440?v=3","gravatar_id":"","url":"https://api.github.com/users/tqchen","html_url":"https://github.com/tqchen","followers_url":"https://api.github.com/users/tqchen/followers","following_url":"https://api.github.com/users/tqchen/following{/other_user}","gists_url":"https://api.github.com/users/tqchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tqchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqchen/subscriptions","organizations_url":"https://api.github.com/users/tqchen/orgs","repos_url":"https://api.github.com/users/tqchen/repos","events_url":"https://api.github.com/users/tqchen/events{/privacy}","received_events_url":"https://api.github.com/users/tqchen/received_events","type":"User","site_admin":false},"labels":[{"id":547189991,"url":"https://api.github.com/repos/dmlc/dlpack/labels/discussion","name":"discussion","color":"128A0C","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-02-24T22:30:19Z","updated_at":"2017-02-28T19:39:29Z","closed_at":null,"body":"We have not yet have an example operator interface, I would propose to have a dedicated issue for discussing this. Candidate interface posting is welcomed.\r\n\r\n## Current Consensus in Guideline\r\nThere are three categories of operators\r\n\r\n-  level0: Those that does not requires workspace memory\r\n-  level1: Those that can declare workspace requirement before execution\r\n-  level2:  Those that need a allocator\r\n\r\nThe former ones can be relaxed to the later ones. In general putting operator into the most restrictive types leaves chances for the user to decide what to do with them. e.g. level 0 and 1 allows static memory planning\r\n\r\n## Questions\r\n- Whether allow operator to reject call for given reasons (e.g. I only take compact tensors)\r\n- How to handle context specification and context switch (thread local runtime?)\r\n"},"comment":{"url":"https://api.github.com/repos/dmlc/dlpack/issues/comments/283140923","html_url":"https://github.com/dmlc/dlpack/issues/2#issuecomment-283140923","issue_url":"https://api.github.com/repos/dmlc/dlpack/issues/2","id":283140923,"user":{"login":"tqchen","id":2577440,"avatar_url":"https://avatars0.githubusercontent.com/u/2577440?v=3","gravatar_id":"","url":"https://api.github.com/users/tqchen","html_url":"https://github.com/tqchen","followers_url":"https://api.github.com/users/tqchen/followers","following_url":"https://api.github.com/users/tqchen/following{/other_user}","gists_url":"https://api.github.com/users/tqchen/gists{/gist_id}","starred_url":"https://api.github.com/users/tqchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tqchen/subscriptions","organizations_url":"https://api.github.com/users/tqchen/orgs","repos_url":"https://api.github.com/users/tqchen/repos","events_url":"https://api.github.com/users/tqchen/events{/privacy}","received_events_url":"https://api.github.com/users/tqchen/received_events","type":"User","site_admin":false},"created_at":"2017-02-28T19:39:29Z","updated_at":"2017-02-28T19:39:29Z","body":"Another thing to note is thread-safety issue. If we want something like a kernel(with kernel handle) vs a pure function.\r\n\r\nSometimes is quite useful to call a function from multiple threads as long as it is stateless. This is the place where CUDA  actually has a  better interface than OpenCL. OpenCL's kernel is not thread-safe, and gives that burden to the user.\r\n\r\n"}}
{"actor":{"display_login":"tqchen"}}