Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove more CUDA runtime API uses when using the driver API mostly #279

Open
eyalroz opened this issue Nov 30, 2021 · 1 comment
Open

Remove more CUDA runtime API uses when using the driver API mostly #279

eyalroz opened this issue Nov 30, 2021 · 1 comment
Assignees
Labels

Comments

@eyalroz
Copy link
Owner

eyalroz commented Nov 30, 2021

While the driver wrappers branch has come a long way, it still uses some CUDA runtime API constants, types, and API calls. Some of this might be unavoidable, but many can still be replaced with no difficulty and others may be replaceable somehow (e.g. cudaSetDevice()?)

@eyalroz eyalroz added the task label Nov 30, 2021
@eyalroz eyalroz self-assigned this Nov 30, 2021
@eyalroz
Copy link
Owner Author

eyalroz commented Dec 6, 2021

So, I've been doing a bunch of work on this, but so far it's all in the form of amending existing commits. Right now, the remaining pieces of runtime code are the following; and I will check them if/when they are removed:

API function calls:

  • Peer-to-peer: cudaDeviceGetP2PAttribute()
  • Device management: cudaSetValidDevices() - currently no driver equivalent
  • Kernel launching: cudaLaunchCooperativeKernel()
  • Version checks: cudaDriverGetVersion()

Types and data structures:

  • Error handling: Use of cudaError_t as cuda::status_t
  • Error handling: Use of Runtime API error constants (not critical, could be allowed in seeing how those should be compatible with using CUresult and Driver API constants.)
  • Device management: cudaDeviceProp

Can't be removed:

  • Functions/kernels and their properties: cudaGetFuncBySymbol() necessary for getting the CUfunction of a __global__
    Type definition & data structure uses:
  • cudaGetSymbolAddress(), cudaGetSymbolSize() - can't be replaced with cuModuleGetGlobal() since we can't access whatever module is used under the hood by NVCC for baked-in kernels and globals.
  • Runtime-based error handling is necessary for other runtime-only API function calls; but we've limited this to a runtime-related namespace and functions which aren't used by default.
  • We allow conversion between the dimensions_t classes and cudaExtent for convenience.

@eyalroz eyalroz changed the title Remove more CUDA runtime API uses from the driver-wrappers branch Remove more CUDA runtime API uses Jun 20, 2022
@eyalroz eyalroz changed the title Remove more CUDA runtime API uses Remove more CUDA runtime API uses when using the driver API mostly Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant