René's URL Explorer Experiment


Title: [FEA]: Faster initialization time for `cuda.core` abstractions · Issue #658 · NVIDIA/cuda-python · GitHub

Open Graph Title: [FEA]: Faster initialization time for `cuda.core` abstractions · Issue #658 · NVIDIA/cuda-python

X Title: [FEA]: Faster initialization time for `cuda.core` abstractions · Issue #658 · NVIDIA/cuda-python

Description: Is this a duplicate? I confirmed there appear to be no duplicate issues for this request and that I agree to the Code of Conduct Area cuda.core Is your feature request related to a problem? Please describe. As mentioned in a previous iss...

Open Graph Description: Is this a duplicate? I confirmed there appear to be no duplicate issues for this request and that I agree to the Code of Conduct Area cuda.core Is your feature request related to a problem? Please ...

X Description: Is this a duplicate? I confirmed there appear to be no duplicate issues for this request and that I agree to the Code of Conduct Area cuda.core Is your feature request related to a problem? Please ...

Opengraph URL: https://github.com/NVIDIA/cuda-python/issues/658

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[FEA]: Faster initialization time for `cuda.core` abstractions","articleBody":"### Is this a duplicate?\n\n- [x] I confirmed there appear to be no [duplicate issues](https://github.com/NVIDIA/cuda-python/issues) for this request and that I agree to the [Code of Conduct](CODE_OF_CONDUCT.md)\n\n### Area\n\ncuda.core\n\n### Is your feature request related to a problem? Please describe.\n\nAs mentioned [in a previous issue](https://github.com/NVIDIA/cuda-python/issues/439), equivalent operations using CuPy can be significantly faster. In this issue, I am requesting that the initialization of `cuda.core` abstractions have less overhead. Specifically, when compared to their CuPy counterparts, the initialization of Device, Stream, and Event abstractions are slower.\n\n```\n>>> timeit.timeit('cp.cuda.Device()', setup='import cupy as cp')\n0.06881106700166129\n>>> timeit.timeit('device = ccx.Device()', setup='import cuda.core.experimental as ccx')\n0.5686513699911302\n```\n\n```\n>>> timeit.timeit('cp.cuda.Stream()', setup='import cupy as cp')\n1.0035127629962517\n>>> timeit.timeit('device.create_stream()', setup='import cuda.core.experimental as ccx; device = ccx.Device(); device.set_current()')\n5.299269804003416\n```\n\n```\n>>> timeit.timeit('cp.cuda.Event()', setup='import cupy as cp')\n0.393913417996373\n>>> timeit.timeit('device.create_event()', setup='import cuda.core.experimental as ccx; device = ccx.Device(); device.set_current()')\n3.1525100879953243\n```\n\nThis has caused noticeable performance regressions in `nvmath-python` when transitioning from `cupy.cuda` to `cuda.core` for our benchmarks for smaller/medium size arrays or on faster devices where python overhead is more significant.\n\nSpecifically, we currently use event recording frequently in order to autoselect algorithms/plans and to wait for computation to complete before returning to the user (for host APIs), and we frequently use the Device constructor to check the current device.\n\n### Describe the solution you'd like\n\nThese init functions should just as fast as or faster than CuPy's abstractions.\n\n### Describe alternatives you've considered\n\n- Refactoring our internal implementation to call `Device()` less often by passing around one `Device` and being careful about context switching.\n- Using less event recording? Trying to reuse the same two `Event`s. I don't think this is feasible.\n\n### Additional context\n\nI doesn't seem like the best long term solution for `nvmath-python` to try to work around these issues. ","author":{"url":"https://github.com/carterbox","@type":"Person","name":"carterbox"},"datePublished":"2025-05-23T23:34:17Z","url":"https://github.com/NVIDIA/cuda-python/issues/658"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:7fa034c6-ea2e-f83d-1f4a-b1fb2a11a1cf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE8F8:B96CC:F0A127:14F54E5:6AF88E6A
html-safe-noncea8ad92e0ba2b71774db2f1eb759bfb6eec870e95a10054755fd5cca786d99a9a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEY4OkI5NkNDOkYwQTEyNzoxNEY1NEU1OjZBRjg4RTZBIiwidmlzaXRvcl9pZCI6IjI4NDE3MjY0MzcwMTI1NzM4MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0a99b38146578045273492fb6b15b055a36f1eede6e52eaf66576123a46eb2b2
hovercard-subject-tagissue:3087719657
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/NVIDIA/cuda-python/658/issue_layout
twitter:imagehttps://opengraph.githubassets.com/361d07604d659dd77b316f17f4101b8b65571cdf301820f6f2460bfd94d02d4d/NVIDIA/cuda-python/issues/658
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/361d07604d659dd77b316f17f4101b8b65571cdf301820f6f2460bfd94d02d4d/NVIDIA/cuda-python/issues/658
og:image:altIs this a duplicate? I confirmed there appear to be no duplicate issues for this request and that I agree to the Code of Conduct Area cuda.core Is your feature request related to a problem? Please ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecarterbox
hostnamegithub.com
expected-hostnamegithub.com
None612d3e6ffd693e7ea8d9fcf452370995872baef31d825b1fedef704cd3d24ac7
turbo-cache-controlno-preview
go-importgithub.com/NVIDIA/cuda-python git https://github.com/NVIDIA/cuda-python.git
octolytics-dimension-user_id1728152
octolytics-dimension-user_loginNVIDIA
octolytics-dimension-repository_id381173759
octolytics-dimension-repository_nwoNVIDIA/cuda-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id381173759
octolytics-dimension-repository_network_root_nwoNVIDIA/cuda-python
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
release072e34035c13c31543fba9f025cbbbda4210dae4
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/NVIDIA/cuda-python/issues/658#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNVIDIA%2Fcuda-python%2Fissues%2F658
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FNVIDIA%2Fcuda-python%2Fissues%2F658
Sign uphttps://github.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=NVIDIA%2Fcuda-python
Reloadhttps://github.com/NVIDIA/cuda-python/issues/658
Reloadhttps://github.com/NVIDIA/cuda-python/issues/658
Reloadhttps://github.com/NVIDIA/cuda-python/issues/658
NVIDIAhttps://github.com/NVIDIA
cuda-pythonhttps://github.com/NVIDIA/cuda-python
Codehttps://github.com/NVIDIA/cuda-python
Issues219 (219)https://github.com/NVIDIA/cuda-python/issues
Pull requests92 (92)https://github.com/NVIDIA/cuda-python/pulls
Discussionshttps://github.com/NVIDIA/cuda-python/discussions
Actionshttps://github.com/NVIDIA/cuda-python/actions
Projectshttps://github.com/NVIDIA/cuda-python/projects
Wikihttps://github.com/NVIDIA/cuda-python/wiki
Security and qualityhttps://github.com/NVIDIA/cuda-python/security
Insightshttps://github.com/NVIDIA/cuda-python/pulse
https://github.com/NVIDIA/cuda-python
New issuehttps://github.com/login?return_to=https://github.com/NVIDIA/cuda-python/issues/658
New issuehttps://github.com/login?return_to=https://github.com/NVIDIA/cuda-python/issues/658
#709https://github.com/NVIDIA/cuda-python/pull/709
[FEA]: Faster initialization time for cuda.core abstractionshttps://github.com/NVIDIA/cuda-python/issues/658#top
#709https://github.com/NVIDIA/cuda-python/pull/709
https://github.com/leofang
https://github.com/emcastillo
P0High priority - Must do!https://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22P0%22
cuda.coreEverything related to the cuda.core modulehttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22cuda.core%22
enhancementAny code-related improvementshttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
cuda.core beta 5https://github.com/NVIDIA/cuda-python/milestone/15
https://github.com/carterbox
carterboxhttps://github.com/carterbox
on May 23, 2025https://github.com/NVIDIA/cuda-python/issues/658#issue-3087719657
duplicate issueshttps://github.com/NVIDIA/cuda-python/issues
Code of Conducthttps://github.com/NVIDIA/cuda-python/issues/CODE_OF_CONDUCT.md
in a previous issuehttps://github.com/NVIDIA/cuda-python/issues/439
github-actionshttps://github.com/apps/github-actions
triageNeeds the team's attentionhttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22triage%22
on May 23, 2025https://github.com/NVIDIA/cuda-python/issues/658#event-17797365329
https://github.com/leofang
leofanghttps://github.com/leofang
on May 24, 2025https://github.com/NVIDIA/cuda-python/issues/658#issuecomment-2906171025
#460https://github.com/NVIDIA/cuda-python/pull/460
leofanghttps://github.com/leofang
awaiting-responseFurther information is requestedhttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22awaiting-response%22
cuda.coreEverything related to the cuda.core modulehttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22cuda.core%22
on May 24, 2025https://github.com/NVIDIA/cuda-python/issues/658#event-17798540725
https://github.com/leofang
leofanghttps://github.com/leofang
on May 26, 2025https://github.com/NVIDIA/cuda-python/issues/658#issuecomment-2908574831
cuda-python/cuda_core/cuda/core/experimental/_device.pyhttps://github.com/NVIDIA/cuda-python/blob/ed884c97a7d5213d520ae9bd9415409b22c10e44/cuda_core/cuda/core/experimental/_device.py#L1058
ed884c9https://github.com/NVIDIA/cuda-python/commit/ed884c97a7d5213d520ae9bd9415409b22c10e44
cuQuantum Pythonhttps://github.com/NVIDIA/cuQuantum/blob/9c05ce7a1655c6d3a6d1b96708ae3945739b20a6/python/cuquantum/_internal/utils.py#L444
nvmath-pythonhttps://github.com/NVIDIA/nvmath-python/blob/02d18a3b88c91432b9a4beef48c116c10121166c/nvmath/_internal/utils.py#L606
cuQuantum Pythonhttps://github.com/NVIDIA/cuQuantum/blob/9c05ce7a1655c6d3a6d1b96708ae3945739b20a6/python/cuquantum/_internal/utils.py#L33
nvmath-pythonhttps://github.com/NVIDIA/nvmath-python/blob/02d18a3b88c91432b9a4beef48c116c10121166c/nvmath/_internal/utils.py#L38
https://github.com/leofang
leofanghttps://github.com/leofang
on May 26, 2025https://github.com/NVIDIA/cuda-python/issues/658#issuecomment-2908577842
https://github.com/carterbox
carterboxhttps://github.com/carterbox
on May 27, 2025https://github.com/NVIDIA/cuda-python/issues/658#issuecomment-2913099847
our performance benchmarkshttps://github.com/NVIDIA/nvmath-python/blob/main/tests/nvmath_tests/linalg/advanced/matmul/test_perf.py
a statistical profilerhttps://github.com/joerick/pyinstrument
https://github.com/carterbox
carterboxhttps://github.com/carterbox
on May 30, 2025https://github.com/NVIDIA/cuda-python/issues/658#issuecomment-2923137473
leofanghttps://github.com/leofang
P0High priority - Must do!https://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22P0%22
on Jun 1, 2025https://github.com/NVIDIA/cuda-python/issues/658#event-17909852307
leofanghttps://github.com/leofang
cuda.core parking lothttps://github.com/NVIDIA/cuda-python/milestone/13
on Jun 1, 2025https://github.com/NVIDIA/cuda-python/issues/658#event-17909852516
https://github.com/leofang
leofanghttps://github.com/leofang
on Jun 4, 2025https://github.com/NVIDIA/cuda-python/issues/658#issuecomment-2938145771
@emcastillohttps://github.com/emcastillo
leofanghttps://github.com/leofang
enhancementAny code-related improvementshttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
awaiting-responseFurther information is requestedhttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22awaiting-response%22
triageNeeds the team's attentionhttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22triage%22
on Jun 4, 2025https://github.com/NVIDIA/cuda-python/issues/658#event-17972847574
https://github.com/emcastillo
emcastillohttps://github.com/emcastillo
on Jun 4, 2025https://github.com/NVIDIA/cuda-python/issues/658#issuecomment-2938928405
#677https://github.com/NVIDIA/cuda-python/pull/677
leofanghttps://github.com/leofang
Cythonize away some perf hot spots #709https://github.com/NVIDIA/cuda-python/pull/709
on Jun 25, 2025https://github.com/NVIDIA/cuda-python/issues/658#event-18307034692
leofanghttps://github.com/leofang
leofanghttps://github.com/leofang
emcastillohttps://github.com/emcastillo
on Jun 30, 2025https://github.com/NVIDIA/cuda-python/issues/658#event-18392944652
https://github.com/leofang
leofanghttps://github.com/leofang
on Jun 30, 2025https://github.com/NVIDIA/cuda-python/issues/658#issuecomment-3020383113
@emcastillohttps://github.com/emcastillo
beta 3 (v0.3.0)https://github.com/user-attachments/assets/56639c0a-55b1-424f-b1df-e8a35e3d4645
beta 4 (v0.4.0)https://github.com/user-attachments/assets/8d666c26-3115-4f07-ab43-1274609d6986
https://private-user-images.githubusercontent.com/5534781/460711585-b7c93d0e-733e-490e-b7ea-2d0079f4bc2a.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTQ2NzQ1ODMsIm5iZiI6MTc5NDY3NDI4MywicGF0aCI6Ii81NTM0NzgxLzQ2MDcxMTU4NS1iN2M5M2QwZS03MzNlLTQ5MGUtYjdlYS0yZDAwNzlmNGJjMmEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTExNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMTRUMTYzODAzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZWQzOGIxZTUwNzU0ZjM2OGZjMzkxZTlkOThhZTMzZjFlOWExYTBhNmViNjQ5M2UxZmI0NzY1MTlkN2FkN2MxNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.EtndQMMekcb6_mNZwNk5fE9UoqmYGksRNRpKFlGgtx8
#677https://github.com/NVIDIA/cuda-python/pull/677
#677https://github.com/NVIDIA/cuda-python/pull/677
#677https://github.com/NVIDIA/cuda-python/pull/677
#709https://github.com/NVIDIA/cuda-python/pull/709
leofanghttps://github.com/leofang
completedhttps://github.com/NVIDIA/cuda-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#709https://github.com/NVIDIA/cuda-python/pull/709
on Jul 1, 2025https://github.com/NVIDIA/cuda-python/issues/658#event-18419208583
leofanghttps://github.com/leofang
cuda.core parking lothttps://github.com/NVIDIA/cuda-python/milestone/13
cuda.core beta 5https://github.com/NVIDIA/cuda-python/milestone/15
on Aug 20, 2025https://github.com/NVIDIA/cuda-python/issues/658#event-19248155251
Sign up for freehttps://github.com/signup?return_to=https://github.com/NVIDIA/cuda-python/issues/658
Sign in to commenthttps://github.com/login?return_to=https://github.com/NVIDIA/cuda-python/issues/658
emcastillohttps://github.com/emcastillo
leofanghttps://github.com/leofang
P0High priority - Must do!https://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22P0%22
cuda.coreEverything related to the cuda.core modulehttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22cuda.core%22
enhancementAny code-related improvementshttps://github.com/NVIDIA/cuda-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
cuda.core beta 5https://github.com/NVIDIA/cuda-python/milestone/15
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.