Skip to content

CUDA Runtime API support #1171

@irozanova

Description

@irozanova

CUDA Runtime API support

Rationale

Some applications are written on pure CUDA Runtime API without using Driver API. But currently UMF requires to provide cuda context and device from Driver API to create UMF CUDA provider. Runtime API does not have any contexts and device datatype is different.

Description

As a possible solution device and context values can be initialized in umfCUDAMemoryProviderParamsCreate with the "current" values. It will allow to support CUDA Runtime and Driver API at the same time. In this case an application will need just to call umfCUDAMemoryProviderParamsCreate -> umfCUDAMemoryProviderOps -> umfMemoryProviderCreate.

CUresult cuCtxGetCurrent ( CUcontext* pctx )
Returns the CUDA context bound to the calling CPU thread.

CUresult cuCtxGetDevice ( CUdevice* device )
Returns the device handle for the current context.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions