Skip to content

Switch to use CUDA driver APIs in Device constructor - #460

Merged
leofang merged 15 commits into
NVIDIA:mainfrom
leofang:reduce_cudart
Jun 7, 2025
Merged

Switch to use CUDA driver APIs in Device constructor#460
leofang merged 15 commits into
NVIDIA:mainfrom
leofang:reduce_cudart

Conversation

@leofang

@leofangleofang commented Feb 21, 2025

Copy link
Copy Markdown
Member

Before this PR:

In [3]: %timeitDevice()
660ns ± 2.01nsperloop (mean ± std. dev. of7runs, 1,000,000loopseach)
In [4]: %timeitDevice(0)
644ns ± 2.05nsperloop (mean ± std. dev. of7runs, 1,000,000loopseach)

With this PR:

In [3]: %timeitDevice()
396ns ± 1.78nsperloop (mean ± std. dev. of7runs, 1,000,000loopseach)
In [4]: %timeitDevice(0)
165ns ± 0.983nsperloop (mean ± std. dev. of7runs, 10,000,000loopseach)

(Bindings are built from the main branch.)

@copy-pr-bot

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@leofangleofang self-assigned this Feb 22, 2025
@leofangleofang added the blocked This task is currently blocked by other tasks label Feb 22, 2025
@leofangleofang added enhancement Any code-related improvements P1 Medium priority - Should do cuda.core Everything related to the cuda.core module and removed blocked This task is currently blocked by other tasks labels Apr 5, 2025
@leofangleofang added this to the cuda.core beta 4 milestone Apr 5, 2025
@leofangleofang changed the title WIP: Switch to use CUDA driver APIs in Device constructorSwitch to use CUDA driver APIs in Device constructorApr 6, 2025
@leofang

Copy link
Copy Markdown
MemberAuthor

/ok to test

@github-actions

This comment has been minimized.

@leofang
leofang marked this pull request as ready for review April 7, 2025 17:39
Comment threadcuda_core/cuda/core/experimental/_device.py
Comment threadcuda_core/cuda/core/experimental/_device.py Outdated
Comment threadcuda_core/cuda/core/experimental/_device.py
@leofang
leofang marked this pull request as draft April 7, 2025 22:19
@leofang
leofang marked this pull request as ready for review May 24, 2025 02:16
@leofang

Copy link
Copy Markdown
MemberAuthor

/ok to test c9fac0b

@leofang

Copy link
Copy Markdown
MemberAuthor

This is ready.

rwgk
rwgk previously approved these changes May 28, 2025
Comment threadcuda_core/cuda/core/experimental/_device.py Outdated
Comment threadcuda_core/cuda/core/experimental/_device.py Outdated
Comment threadcuda_core/cuda/core/experimental/_device.py
Comment threadcuda_core/cuda/core/experimental/_device.py
@leofang

Copy link
Copy Markdown
MemberAuthor

/ok to test d70ec24

Comment threadcuda_core/cuda/core/experimental/_device.py Outdated
Comment threadcuda_core/cuda/core/experimental/_device.py Outdated
Comment threadcuda_core/cuda/core/experimental/_device.py Outdated
@leofang

Copy link
Copy Markdown
MemberAuthor

/ok to test d279e50

@leofang

This comment was marked as resolved.

@leofangleofang added blocked This task is currently blocked by other tasks and removed blocked This task is currently blocked by other tasks labels Jun 7, 2025
@leofang

Copy link
Copy Markdown
MemberAuthor

/ok to test 708fd70

This reverts commit d279e50.
@leofang

Copy link
Copy Markdown
MemberAuthor

/ok to test 4015f9c

@github-project-automationgithub-project-automationBot moved this from Todo to In Review in CCCLJun 7, 2025
@leofang
leofang enabled auto-merge (squash) June 7, 2025 02:41
@leofang
leofang merged commit 0fe2309 into NVIDIA:mainJun 7, 2025
@github-project-automationgithub-project-automationBot moved this from In Review to Done in CCCLJun 7, 2025
@leofang
leofang deleted the reduce_cudart branch June 7, 2025 02:48
@leofang

Copy link
Copy Markdown
MemberAuthor

Thanks, Ralf/Keith!

@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.coreEverything related to the cuda.core moduleenhancementAny code-related improvementsP1Medium priority - Should do

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants

@leofang@rwgk@kkraus14@keenan-simpson