Title: [BUG] sort_by_key with fp16 values result is incorrect · Issue #3675 · arrayfire/arrayfire · GitHub
Open Graph Title: [BUG] sort_by_key with fp16 values result is incorrect · Issue #3675 · arrayfire/arrayfire
X Title: [BUG] sort_by_key with fp16 values result is incorrect · Issue #3675 · arrayfire/arrayfire
Description: The OpenCL backend test for Min1D0 to Min4D0 and Max1D0 to Max4D0 in sort_by_key.cpp fails for half (fp16) data type due to incorrect results from a call sort0ByKey operation done in opencl/sort_index.cpp . The library used for this oper...
Open Graph Description: The OpenCL backend test for Min1D0 to Min4D0 and Max1D0 to Max4D0 in sort_by_key.cpp fails for half (fp16) data type due to incorrect results from a call sort0ByKey operation done in opencl/sort_in...
X Description: The OpenCL backend test for Min1D0 to Min4D0 and Max1D0 to Max4D0 in sort_by_key.cpp fails for half (fp16) data type due to incorrect results from a call sort0ByKey operation done in opencl/sort_in...
Opengraph URL: https://github.com/arrayfire/arrayfire/issues/3675
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] sort_by_key with fp16 values result is incorrect","articleBody":"The OpenCL backend test for Min1D0 to Min4D0 and Max1D0 to Max4D0 in sort_by_key.cpp fails for half (fp16) data type due to incorrect results from a call sort0ByKey operation done in opencl/sort_index.cpp . The library used for this operation is boost compute which does not officially support fp16 operations [(see issue)](https://github.com/boostorg/compute/issues/756)\n\nDescription\n===========\n* Built Arrayfire commit eaa49caced87c6eb21d612b1d546ab3061d30a73\n* Which backend is experiencing this issue? OpenCL\n* Do you have a workaround? Forcing internatlly cast to float before executing this operation\n* Can the bug be reproduced reliably on your system? Yes\n\nReproducible Code and/or Steps\n------------------------------\nRun test_topk_opencl. Reproducible with CPU, Nvidia, and Intel GPUs","author":{"url":"https://github.com/edwinsolisf","@type":"Person","name":"edwinsolisf"},"datePublished":"2025-06-30T02:57:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/3675/arrayfire/issues/3675"}
| 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:5b1bdf97-0d2b-4fd5-ec74-fd83cd2c713d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AEDA:281ABF:2CC4D8B:3D840E9:6964E94C |
| html-safe-nonce | 8209134818e1289af4161a8040afc395626d50e9f1f041a3b5064a33d2f1c29e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRURBOjI4MUFCRjoyQ0M0RDhCOjNEODQwRTk6Njk2NEU5NEMiLCJ2aXNpdG9yX2lkIjoiMTMwMDAzMDIxMzY0MTc5MTgyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 02156b0beee618b16a2ec4dceebc4979aa6fb59d133288d2a1c0fb9e850bf89f |
| hovercard-subject-tag | issue:3186953623 |
| 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/arrayfire/arrayfire/3675/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f7650cf1803862ea30e06d1925c305ce2848fd430327ee5c807dc725b5de5323/arrayfire/arrayfire/issues/3675 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f7650cf1803862ea30e06d1925c305ce2848fd430327ee5c807dc725b5de5323/arrayfire/arrayfire/issues/3675 |
| og:image:alt | The OpenCL backend test for Min1D0 to Min4D0 and Max1D0 to Max4D0 in sort_by_key.cpp fails for half (fp16) data type due to incorrect results from a call sort0ByKey operation done in opencl/sort_in... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | edwinsolisf |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3c30097417ecb9dfdab6b2e8bc7dc38d73e183d6ad48f94cb69e4a5daa2dbb87 |
| turbo-cache-control | no-preview |
| go-import | github.com/arrayfire/arrayfire git https://github.com/arrayfire/arrayfire.git |
| octolytics-dimension-user_id | 5395442 |
| octolytics-dimension-user_login | arrayfire |
| octolytics-dimension-repository_id | 25889802 |
| octolytics-dimension-repository_nwo | arrayfire/arrayfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 25889802 |
| octolytics-dimension-repository_network_root_nwo | arrayfire/arrayfire |
| 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 | 69fc54a84c74307369dba42af5401200531d116e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width