Title: DBscan dpex_k implementation does not work under compute follows data. · Issue #140 · IntelPython/dpbench · GitHub
Open Graph Title: DBscan dpex_k implementation does not work under compute follows data. · Issue #140 · IntelPython/dpbench
X Title: DBscan dpex_k implementation does not work under compute follows data. · Issue #140 · IntelPython/dpbench
Description: The dpex_k implementation for DBSCAN currently fails execution with a rather cryptic message stating: "Datatypes of array passed to @numba_dpex.kernel has to be the same. Passed datatypes: "... The error message needs fixing and I am wor...
Open Graph Description: The dpex_k implementation for DBSCAN currently fails execution with a rather cryptic message stating: "Datatypes of array passed to @numba_dpex.kernel has to be the same. Passed datatypes: "... The...
X Description: The dpex_k implementation for DBSCAN currently fails execution with a rather cryptic message stating: "Datatypes of array passed to @numba_dpex.kernel has to be the same. Passed datatypes: &qu...
Opengraph URL: https://github.com/IntelPython/dpbench/issues/140
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"DBscan dpex_k implementation does not work under compute follows data.","articleBody":"The dpex_k implementation for DBSCAN currently fails execution with a rather cryptic message stating:\r\n\r\n\u003e \"Datatypes of array passed to @numba_dpex.kernel has to be the same. Passed datatypes: \"...\r\n\r\nThe error message needs fixing and I am working on a dpex PR to address that. \r\n\r\nWhat the error message is really telling is that the implementation does not follow the \"compute follows data\" programming model. Under the compute follows data programming model the execution queue for the kernel should be discoverable from the input array arguments.\r\n\r\nThere are two problems with the current implementation.\r\n\r\n- [x] In the [dpex_k implementation](https://github.com/IntelPython/dpbench/blob/main/dpbench/benchmarks/dbscan/dbscan_numba_dpex_k.py), the arguments to the kernel are `n_samples`, `min_pts`, `assignments`, `sizes`, `indices_list`. Of these, `sizes` and `indices_list` are not allocated in the `initialize` function and therefore are never copied to `usm_ndarray`. The kernel inputs are a mix of `numpy.ndarray` and `dpctl.tensor.usm_ndarray` and there is no way to infer the execution queue using compute follows data. Thus, the dpex error. To fix the issue, the creation of these two arrays need to be moved into the initialize call.\r\n\r\n- [ ] Fixing the first problem will lead to the next issue that is hidden by the first failure right now. Only the `get_neighborhood` function is a kernel. The `compute_cluster` function is a `njit` function. Currently, `njit` functions cannot consume `usm_ndarray` and thus to make it work we will have to copy data back to host after the `get_neighborhood` call. Doing so will mess up the timing measurement. Moreover, implementing `dbscan_dpex_k` in this fashion is inaccurate in terms of comparing the kernel implementation with other implementations as the whole benchmark never runs on a device/GPU. If implemented this way, comparing the timing of kernel with any other implementation is not an apples to apples comparison. We either need to implement `compute_cluster` as a kernel or remove the dbscan_dpek_k module.","author":{"url":"https://github.com/diptorupd","@type":"Person","name":"diptorupd"},"datePublished":"2022-10-06T05:04:32.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/140/dpbench/issues/140"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:47fdf491-eaf4-95a1-0ca3-b6ff915aaa0c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8292:1DFAA9:6C47924:8BFB074:697590A0 |
| html-safe-nonce | 2e53b5434c092183aff0b0a183200736b7e45a74d0f6a0ecbf2b75bf22203be7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjkyOjFERkFBOTo2QzQ3OTI0OjhCRkIwNzQ6Njk3NTkwQTAiLCJ2aXNpdG9yX2lkIjoiMTUyMjQ3ODY0MzA1NTc5MjI4OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 663fe8a6a36fdfb9fff7a425c945794b6c83da717e5bb0fcaff345d31eb1831b |
| hovercard-subject-tag | issue:1398792082 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IntelPython/dpbench/140/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5f118e64b971b9bbeebdc3e2facc3415e286b2f7b99525308cd282fbd9b8cf9b/IntelPython/dpbench/issues/140 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5f118e64b971b9bbeebdc3e2facc3415e286b2f7b99525308cd282fbd9b8cf9b/IntelPython/dpbench/issues/140 |
| og:image:alt | The dpex_k implementation for DBSCAN currently fails execution with a rather cryptic message stating: "Datatypes of array passed to @numba_dpex.kernel has to be the same. Passed datatypes: "... The... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | diptorupd |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/IntelPython/dpbench git https://github.com/IntelPython/dpbench.git |
| octolytics-dimension-user_id | 20491374 |
| octolytics-dimension-user_login | IntelPython |
| octolytics-dimension-repository_id | 333135583 |
| octolytics-dimension-repository_nwo | IntelPython/dpbench |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 333135583 |
| octolytics-dimension-repository_network_root_nwo | IntelPython/dpbench |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width