René's URL Explorer Experiment


Title: [BUG] createGLBuffer and copyToGLBuffer do not point to the same device · Issue #242 · arrayfire/forge · GitHub

Open Graph Title: [BUG] createGLBuffer and copyToGLBuffer do not point to the same device · Issue #242 · arrayfire/forge

X Title: [BUG] createGLBuffer and copyToGLBuffer do not point to the same device · Issue #242 · arrayfire/forge

Description: If you have more than one display cards, all the examples in forge/examples/opencl will fail. A temporary workaround is to modify createCLGLContext in cl_helpers.h so that cl::Context always use the last device instead of the first devic...

Open Graph Description: If you have more than one display cards, all the examples in forge/examples/opencl will fail. A temporary workaround is to modify createCLGLContext in cl_helpers.h so that cl::Context always use th...

X Description: If you have more than one display cards, all the examples in forge/examples/opencl will fail. A temporary workaround is to modify createCLGLContext in cl_helpers.h so that cl::Context always use th...

Opengraph URL: https://github.com/arrayfire/forge/issues/242

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] createGLBuffer and copyToGLBuffer do not point to the same device","articleBody":"If you have more than one display cards, all the examples in forge/examples/opencl will fail. \r\n\r\nA temporary workaround  is to  modify createCLGLContext in cl_helpers.h so that cl::Context always use the last device instead of the first device.  But it is not a solution at all. \r\n\r\n```\r\nvoid get_devices(const forge::Window \u0026wnd,\r\n                 std::vector\u003ccl::Platform\u003e \u0026platforms_interop,\r\n                 std::vector\u003cDevice\u003e \u0026devices_interop) {\r\n  std::vector\u003ccl::Platform\u003e platforms;\r\n  Platform::get(\u0026platforms);\r\n\r\n  for (auto platform : platforms) {\r\n    std::vector\u003ccl::Device\u003e devices;\r\n    try {\r\n      platform.getDevices(CL_DEVICE_TYPE_GPU, \u0026devices);\r\n      for (auto device : devices) {\r\n        if (checkGLInterop(platform, device, wnd)) {\r\n          devices_interop.push_back(device);\r\n          platforms_interop.push_back(platform);\r\n        }\r\n      }\r\n\r\n    } catch (const cl::Error \u0026err) {\r\n      if (err.err() != CL_DEVICE_NOT_FOUND) {\r\n        std::cout \u003c\u003c \"Platform: \" \u003c\u003c platform.getInfo\u003cCL_PLATFORM_NAME\u003e()\r\n                  \u003c\u003c \" got error = \" \u003c\u003c err.err() \u003c\u003c std::endl;\r\n        throw std::runtime_error(\"Fatal Error!\");\r\n      }\r\n    }\r\n  }\r\n  if (devices_interop.size() == 0)\r\n    throw std::runtime_error(\"No CL-GL sharing contexts found\");\r\n}\r\n\r\ncl::Context createCLGLContext(const forge::Window \u0026wnd, cl::Platform platform,\r\n                              cl::Device device) {\r\n  // std::cout \u003c\u003c \"Platform: \" \u003c\u003c platform.getInfo\u003cCL_PLATFORM_NAME\u003e()\r\n  //           \u003c\u003c std::endl;\r\n  // std::cout \u003c\u003c \"Device: \" \u003c\u003c device.getInfo\u003cCL_DEVICE_NAME\u003e() \u003c\u003c std::endl;\r\n#if defined(OS_MAC)\r\n  CGLContextObj cgl_current_ctx = CGLGetCurrentContext();\r\n  CGLShareGroupObj cgl_share_group = CGLGetShareGroup(cgl_current_ctx);\r\n\r\n  cl_context_properties cps[] = {CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE,\r\n                                 (cl_context_properties)cgl_share_group, 0};\r\n#elif defined(OS_LNX)\r\n  cl_context_properties cps[] = {CL_GL_CONTEXT_KHR,\r\n                                 (cl_context_properties)wnd.context(),\r\n                                 CL_GLX_DISPLAY_KHR,\r\n                                 (cl_context_properties)wnd.display(),\r\n                                 CL_CONTEXT_PLATFORM,\r\n                                 (cl_context_properties)platform(),\r\n                                 0};\r\n#else /* OS_WIN */\r\n  cl_context_properties cps[] = {CL_GL_CONTEXT_KHR,\r\n                                 (cl_context_properties)wnd.context(),\r\n                                 CL_WGL_HDC_KHR,\r\n                                 (cl_context_properties)wnd.display(),\r\n                                 CL_CONTEXT_PLATFORM,\r\n                                 (cl_context_properties)platform(),\r\n                                 0};\r\n#endif\r\n  return cl::Context(device, cps);\r\n}\r\n\r\ncl::Context createCLGLContext(const forge::Window \u0026wnd) {\r\n  std::vector\u003ccl::Platform\u003e platforms;\r\n  std::vector\u003cDevice\u003e devices;\r\n  get_devices(wnd, platforms, devices);\r\n  for (size_t i = devices.size() - 1; i \u003e= 0; i--) {\r\n    // for (size_t i = 0; i \u003c devices.size(); i++) {\r\n    try {\r\n      return createCLGLContext(wnd, platforms[i], devices[i]);\r\n\r\n    } catch (const cl::Error \u0026err) {\r\n      std::cout \u003c\u003c \"[createCLGLContext]Error:\" \u003c\u003c err.err() \u003c\u003c std::endl;\r\n    }\r\n  }\r\n  return cl::Context();\r\n}\r\n```","author":{"url":"https://github.com/3togo","@type":"Person","name":"3togo"},"datePublished":"2023-04-20T03:33:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/242/forge/issues/242"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:70ace9a5-83ea-a870-3b71-87400a1faefd
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idEB26:26B0AA:4D4C3F4:681697F:696E12FB
html-safe-nonce1c2c7b97bec6a4fa60451a0bd3566f214a69fe5da62de1d3bdeeb3005ca1b4ed
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQjI2OjI2QjBBQTo0RDRDM0Y0OjY4MTY5N0Y6Njk2RTEyRkIiLCJ2aXNpdG9yX2lkIjoiNDU1NjExNjk1ODk2NTk3MjQzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd1400d79c94747be64d2aa95f262b471f684742ad715d1a8a3ead787de2e9ac7
hovercard-subject-tagissue:1675942950
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/arrayfire/forge/242/issue_layout
twitter:imagehttps://opengraph.githubassets.com/8229b1d3da1e4555bd5af40a794864c14701c5001cd46e23aa46960926a779b9/arrayfire/forge/issues/242
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/8229b1d3da1e4555bd5af40a794864c14701c5001cd46e23aa46960926a779b9/arrayfire/forge/issues/242
og:image:altIf you have more than one display cards, all the examples in forge/examples/opencl will fail. A temporary workaround is to modify createCLGLContext in cl_helpers.h so that cl::Context always use th...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:username3togo
hostnamegithub.com
expected-hostnamegithub.com
None1a7d6d739bf034e67486b9f97a31887ca30302b72a0acac49b6bcddff34356d7
turbo-cache-controlno-preview
go-importgithub.com/arrayfire/forge git https://github.com/arrayfire/forge.git
octolytics-dimension-user_id5395442
octolytics-dimension-user_loginarrayfire
octolytics-dimension-repository_id35898690
octolytics-dimension-repository_nwoarrayfire/forge
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id35898690
octolytics-dimension-repository_network_root_nwoarrayfire/forge
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release87d7872ec7094ed247923539669aabda9230966f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/arrayfire/forge/issues/242#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Farrayfire%2Fforge%2Fissues%2F242
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Farrayfire%2Fforge%2Fissues%2F242
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=arrayfire%2Fforge
Reloadhttps://patch-diff.githubusercontent.com/arrayfire/forge/issues/242
Reloadhttps://patch-diff.githubusercontent.com/arrayfire/forge/issues/242
Reloadhttps://patch-diff.githubusercontent.com/arrayfire/forge/issues/242
arrayfire https://patch-diff.githubusercontent.com/arrayfire
forgehttps://patch-diff.githubusercontent.com/arrayfire/forge
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Farrayfire%2Fforge
Fork 47 https://patch-diff.githubusercontent.com/login?return_to=%2Farrayfire%2Fforge
Star 237 https://patch-diff.githubusercontent.com/login?return_to=%2Farrayfire%2Fforge
Code https://patch-diff.githubusercontent.com/arrayfire/forge
Issues 18 https://patch-diff.githubusercontent.com/arrayfire/forge/issues
Pull requests 1 https://patch-diff.githubusercontent.com/arrayfire/forge/pulls
Actions https://patch-diff.githubusercontent.com/arrayfire/forge/actions
Projects 0 https://patch-diff.githubusercontent.com/arrayfire/forge/projects
Wiki https://patch-diff.githubusercontent.com/arrayfire/forge/wiki
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/arrayfire/forge/security
Please reload this pagehttps://patch-diff.githubusercontent.com/arrayfire/forge/issues/242
Insights https://patch-diff.githubusercontent.com/arrayfire/forge/pulse
Code https://patch-diff.githubusercontent.com/arrayfire/forge
Issues https://patch-diff.githubusercontent.com/arrayfire/forge/issues
Pull requests https://patch-diff.githubusercontent.com/arrayfire/forge/pulls
Actions https://patch-diff.githubusercontent.com/arrayfire/forge/actions
Projects https://patch-diff.githubusercontent.com/arrayfire/forge/projects
Wiki https://patch-diff.githubusercontent.com/arrayfire/forge/wiki
Security https://patch-diff.githubusercontent.com/arrayfire/forge/security
Insights https://patch-diff.githubusercontent.com/arrayfire/forge/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/arrayfire/forge/issues/242
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/arrayfire/forge/issues/242
[BUG] createGLBuffer and copyToGLBuffer do not point to the same devicehttps://patch-diff.githubusercontent.com/arrayfire/forge/issues/242#top
https://github.com/3togo
https://github.com/3togo
3togohttps://github.com/3togo
on Apr 20, 2023https://github.com/arrayfire/forge/issues/242#issue-1675942950
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.