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

[QST] Consider refactoring above cuda-api-wrappers #426

Open
eyalroz opened this issue Jun 2, 2023 · 2 comments
Open

[QST] Consider refactoring above cuda-api-wrappers #426

eyalroz opened this issue Jun 2, 2023 · 2 comments

Comments

@eyalroz
Copy link

eyalroz commented Jun 2, 2023

I've noticed that MatX needs to include some CUDA-related abstractions and facilities (like error handling) which are actually not specific to matrix/tensor/numeric computations in any way.

I would suggest you consider building MatX on top of the Modern-C++ CUDA API wrappers library.

Benefits:

  • Reduction in the amount of code.
  • No more C-style coding of your use of the CUDA APIs - cleaner codebase for this library.
  • No having to worry about catching errors from CUDA API calls.
  • Less of a hassle when you want to add functionality relying on bits of CUDA you have not yet wrapped/instrumented - avoid artificial de-motivation from doing that.
  • Compatible license: BSD 3-clause.
  • Header-only library, so no need to compile anything
  • Easy to work with - via any of CMake find_package(), CMake FetchContent, just copying ("vendoring") the header files

Detriments:

  • Not an official NVIDIA library
  • Will increase translation unit size somewhat (but does not involve deep TMP voodoo)
@cliffburdick
Copy link
Collaborator

Thanks @eyalroz! We will take a look to see how much code this will save and report back.

@eyalroz
Copy link
Author

eyalroz commented Jun 2, 2023

Wow, I'm surprised to have gotten a positive response, and this quickly... you may want to look at some example programs to see how the library is used. And - feel very free to chat me up about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants