Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Discussing CUDA support for xeus-cpp #300

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

Open
2 of 6 tasks
kr-2003 opened this issue May 13, 2025 · 1 comment
Open
2 of 6 tasks

Discussing CUDA support for xeus-cpp #300

kr-2003 opened this issue May 13, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@kr-2003
Copy link
Contributor

kr-2003 commented May 13, 2025

These are the PRs that fixed CUDA support in LLVM and CppInterOp by @anutosh491.
[clang-repl] : Fix clang-repl crash with --cuda flag - llvm
Add error propagation to interpreter creation logic - CppInterOp

Support for CUDA in xeus-cpp (Taking inspiration from xeus-clang-repl)

  • Fixing cuda support in clang-repl.
  • -cuda flag is already supported by CppInterOp's createClangInterpreter.
  • We need to pass the cuda flag while calling Cpp::CreateInterpreter to trigger the above.
    return Cpp::CreateInterpreter(ClangArgs/*, {"-cuda"}*/);
  • Need to add the following kernel(It should resemble something like this).
{
  "display_name": "CppInterOp (C++17)",
  "env": {
      "CPLUS_INCLUDE_PATH":"@CMAKE_CPLUS_INCLUDE_PATH@",
      "PATH":"@CMAKE_PATH@",
      "LD_LIBRARY_PATH":"@CMAKE_LD_LIBRARY_PATH@",
      "PYTHONPATH":"@CMAKE_PYTHONPATH@"
  },
  "argv": [
      "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/xcpp",
      "-f",
      "{connection_file}",
      "-cuda",
      "-std=c++17"@CMAKE_OMP@
  ],
  "language": "CUDA"
}

I hope these will bring CUDA support in xeus-cpp. I will be updating if any other changes are required.

@github-actions github-actions bot added the Needs triage Used in auto labelling of new issues label May 13, 2025
@anutosh491 anutosh491 added enhancement New feature or request and removed Needs triage Used in auto labelling of new issues labels May 13, 2025
@anutosh491
Copy link
Collaborator

Thanks for opening this !

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

No branches or pull requests

2 participants