Skip to content

Discussing CUDA support for xeus-cpp #300

Open
@kr-2003

Description

@kr-2003

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.

Metadata

Metadata

Assignees

No one assigned

    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